All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class SHOE.Category

java.lang.Object
   |
   +----SHOE.SHOE_Obj
           |
           +----SHOE.Declaration
                   |
                   +----SHOE.Category

public class Category
extends Declaration
This class is used to describe and manipulate a SHOE Category.


Constructor Index

 o Category(SGML_Tag)
Create a category from its SGML tag representation.
 o Category(String, String)
Create a new category claim given the prefixed name of the category and the key of the subject.

Method Index

 o checkFields(SGML_Tag, Vector)
Given an SGML tag representing a SHOE category, determines if it contains the required fields and returns a boolean indicating if there are any errors.
 o getBaseName()
Returns the name of the category as it appears in its originating ontology.
 o getElmtId()
Returns a unique identifier for the category.
 o getForText()
Returns the key of the instance that is classified under the category.
 o getKey()
Returns an identifier for the Category.
 o getName()
Returns the prefixed name of the category.
 o getPredicateText()
Returns a string that formats the category as a predicate, i.e., is-a(subject, catname).
 o getTextBySubject(OntManager)
Returns a phrase suitable for describing the claim given that its subject is already known.
 o isVariable()
Returns true when the category declaration is for a variable.
 o printSGML(PrintStream)
Writes the tag and its contents (if any) in SGML format to the given print stream.
 o readSubTags(HTML_Tokenizer)
Reads and processes the tokens from an HTML_Tokenizer until the appropriate closing tag is encountered.
 o setForText(String)
Sets the subject of the category claim.
 o setName(String)
Sets the prefixed name of the category referred to in this claim.
 o toString()
Returns the string representation of the tag.
 o validate(SHOE_Obj, OntManager)
Checks the claim for errors and updates internal structures.

Constructors

 o Category
 public Category(String name,
                 String for_text)
Create a new category claim given the prefixed name of the category and the key of the subject.

 o Category
 public Category(SGML_Tag sgmltag)
Create a category from its SGML tag representation.

Methods

 o getKey
 public String getKey()
Returns an identifier for the Category. Note this identifier is NOT guaranteed to be unique.

Overrides:
getKey in class SHOE_Obj
 o getForText
 public String getForText()
Returns the key of the instance that is classified under the category.

 o getName
 public String getName()
Returns the prefixed name of the category.

 o getBaseName
 public String getBaseName()
Returns the name of the category as it appears in its originating ontology.

 o getElmtId
 public Unique_Elt getElmtId()
Returns a unique identifier for the category. Additionally, this identifier indicates which ontology the category originates from.

 o getPredicateText
 public String getPredicateText()
Returns a string that formats the category as a predicate, i.e., is-a(subject, catname).

Overrides:
getPredicateText in class Declaration
 o getTextBySubject
 public String getTextBySubject(OntManager ontman)
Returns a phrase suitable for describing the claim given that its subject is already known. (i.e., is-a catname)

Overrides:
getTextBySubject in class Declaration
 o isVariable
 public boolean isVariable()
Returns true when the category declaration is for a variable.

 o setForText
 public void setForText(String forText)
Sets the subject of the category claim.

 o setName
 public void setName(String name)
Sets the prefixed name of the category referred to in this claim.

 o readSubTags
 public Vector readSubTags(HTML_Tokenizer intokens)
Reads and processes the tokens from an HTML_Tokenizer until the appropriate closing tag is encountered.

Overrides:
readSubTags in class SHOE_Obj
 o checkFields
 public boolean checkFields(SGML_Tag sgmltag,
                            Vector errStrings)
Given an SGML tag representing a SHOE category, determines if it contains the required fields and returns a boolean indicating if there are any errors. Specific error messages are appended to the errStrings vector.

 o validate
 public Vector validate(SHOE_Obj parent,
                        OntManager ontman)
Checks the claim for errors and updates internal structures.

 o printSGML
 public void printSGML(PrintStream out)
Writes the tag and its contents (if any) in SGML format to the given print stream.

Overrides:
printSGML in class SHOE_Obj
 o toString
 public String toString()
Returns the string representation of the tag. Any contents or end tags are not included.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index