All Packages Class Hierarchy This Package Previous Next Index
Class SHOE.SHOE_Doc
java.lang.Object
|
+----SHOE.SHOE_Doc
- public class SHOE_Doc
- extends Object
A SHOE document. The document can be initialized by parsing an
input stream or by manually adding instances and ontologies. There
are methods to write the document back out in HTML form or as
a summary of the SHOE objects.
-
SHOE_Doc()
- Creates a new, empty SHOE document.
-
addHtmlTag(String)
- Append an HTML tag (with no attributes) to the contents of
the document.
-
addInstance(Instance)
- Adds a SHOE instance to the document.
-
addNewline()
- Append a newline to the contents of the document.
-
addOntology(Ontology)
- Adds a SHOE ontology to the document.
-
addString(String)
- Append a string to the contents of the document.
-
clear()
- Resets the document.
-
deleteSHOEObject(Object)
- Removes a SHOE Object from both the list of parsed SHOE objects and the
document's content list
-
getHTML()
- Returns all (non-SHOE) HTML tokens associated with the document.
-
getParseErrors()
- Retrieves error messages for this document and concatenates them
into a single string.
-
getPSHOE()
- Returns an enumeration of the ontology and/or instance objects
contained within the document.
-
getVersion()
- Returns the SHOE version number used by the document.
-
hasParseErrors()
- Returns true if errors were detected when parsing the document.
-
parse(InputStream)
- Given an input stream, creates a vector of SHOE objects
(instances and ontologies).
-
printHTML(PrintStream)
- Print the HTML text and tokens corresponding to a SHOE Document.
-
printSummary(PrintStream)
- If the document contains any instances, for each instance prints it's
information, including use ontologies and claims in the Subject View
format.
-
validate(OntManager)
- Checks the document for SHOE reference errors.
SHOE_Doc
public SHOE_Doc()
- Creates a new, empty SHOE document.
getPSHOE
public Enumeration getPSHOE()
- Returns an enumeration of the ontology and/or instance objects
contained within the document.
getHTML
public Enumeration getHTML()
- Returns all (non-SHOE) HTML tokens associated with the document.
getVersion
public float getVersion()
- Returns the SHOE version number used by the document.
clear
public void clear()
- Resets the document.
addInstance
public void addInstance(Instance inst)
- Adds a SHOE instance to the document.
addOntology
public void addOntology(Ontology ont)
- Adds a SHOE ontology to the document.
deleteSHOEObject
public void deleteSHOEObject(Object obj)
- Removes a SHOE Object from both the list of parsed SHOE objects and the
document's content list
parse
public void parse(InputStream instream) throws IOException
- Given an input stream, creates a vector of SHOE objects
(instances and ontologies). Creates an HTML tokenizer using
the input stream and uses this to pull out each SGML tag.
Creates pSHOE (a vector of SHOE_obj) and contents (a vector
of the documents contents)
validate
public void validate(OntManager ontman)
- Checks the document for SHOE reference errors. These are
permanently stored in the parseErrs vector. Both instances and
ontologies are validated. Since any errors are merely added to
the internal list of errors, it should only be called once per
document.
hasParseErrors
public boolean hasParseErrors()
- Returns true if errors were detected when parsing the document.
getParseErrors
public String getParseErrors()
- Retrieves error messages for this document and concatenates them
into a single string. If the validate() method has been called then
validation errors will be returned in addition to syntatic errors.
printHTML
public void printHTML(PrintStream out)
- Print the HTML text and tokens corresponding to a SHOE Document.
printSummary
public void printSummary(PrintStream out)
- If the document contains any instances, for each instance prints it's
information, including use ontologies and claims in the Subject View
format.
addHtmlTag
public void addHtmlTag(String tagname)
- Append an HTML tag (with no attributes) to the contents of
the document.
addString
public void addString(String text)
- Append a string to the contents of the document.
addNewline
public void addNewline()
- Append a newline to the contents of the document.
All Packages Class Hierarchy This Package Previous Next Index