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.


Constructor Index

 o SHOE_Doc()
Creates a new, empty SHOE document.

Method Index

 o addHtmlTag(String)
Append an HTML tag (with no attributes) to the contents of the document.
 o addInstance(Instance)
Adds a SHOE instance to the document.
 o addNewline()
Append a newline to the contents of the document.
 o addOntology(Ontology)
Adds a SHOE ontology to the document.
 o addString(String)
Append a string to the contents of the document.
 o clear()
Resets the document.
 o deleteSHOEObject(Object)
Removes a SHOE Object from both the list of parsed SHOE objects and the document's content list
 o getHTML()
Returns all (non-SHOE) HTML tokens associated with the document.
 o getParseErrors()
Retrieves error messages for this document and concatenates them into a single string.
 o getPSHOE()
Returns an enumeration of the ontology and/or instance objects contained within the document.
 o getVersion()
Returns the SHOE version number used by the document.
 o hasParseErrors()
Returns true if errors were detected when parsing the document.
 o parse(InputStream)
Given an input stream, creates a vector of SHOE objects (instances and ontologies).
 o printHTML(PrintStream)
Print the HTML text and tokens corresponding to a SHOE Document.
 o 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.
 o validate(OntManager)
Checks the document for SHOE reference errors.

Constructors

 o SHOE_Doc
 public SHOE_Doc()
Creates a new, empty SHOE document.

Methods

 o getPSHOE
 public Enumeration getPSHOE()
Returns an enumeration of the ontology and/or instance objects contained within the document.

 o getHTML
 public Enumeration getHTML()
Returns all (non-SHOE) HTML tokens associated with the document.

 o getVersion
 public float getVersion()
Returns the SHOE version number used by the document.

 o clear
 public void clear()
Resets the document.

 o addInstance
 public void addInstance(Instance inst)
Adds a SHOE instance to the document.

 o addOntology
 public void addOntology(Ontology ont)
Adds a SHOE ontology to the document.

 o deleteSHOEObject
 public void deleteSHOEObject(Object obj)
Removes a SHOE Object from both the list of parsed SHOE objects and the document's content list

 o 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)

 o 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.

 o hasParseErrors
 public boolean hasParseErrors()
Returns true if errors were detected when parsing the document.

 o 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.

 o printHTML
 public void printHTML(PrintStream out)
Print the HTML text and tokens corresponding to a SHOE Document.

 o 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.

 o addHtmlTag
 public void addHtmlTag(String tagname)
Append an HTML tag (with no attributes) to the contents of the document.

 o addString
 public void addString(String text)
Append a string to the contents of the document.

 o addNewline
 public void addNewline()
Append a newline to the contents of the document.


All Packages  Class Hierarchy  This Package  Previous  Next  Index