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.
-
Category(SGML_Tag)
- Create a category from its SGML tag representation.
-
Category(String, String)
- Create a new category claim given the prefixed name of the category
and the key of the subject.
-
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.
-
getBaseName()
- Returns the name of the category as it appears in its originating
ontology.
-
getElmtId()
- Returns a unique identifier for the category.
-
getForText()
- Returns the key of the instance that is classified under the category.
-
getKey()
- Returns an identifier for the Category.
-
getName()
- Returns the prefixed name of the category.
-
getPredicateText()
- Returns a string that formats the category as a predicate, i.e.,
is-a(subject, catname).
-
getTextBySubject(OntManager)
- Returns a phrase suitable for describing the claim given that
its subject is already known.
-
isVariable()
- Returns true when the category declaration is for a variable.
-
printSGML(PrintStream)
- Writes the tag and its contents (if any) in SGML format to the
given print stream.
-
readSubTags(HTML_Tokenizer)
- Reads and processes the tokens from an HTML_Tokenizer until
the appropriate closing tag is encountered.
-
setForText(String)
- Sets the subject of the category claim.
-
setName(String)
- Sets the prefixed name of the category referred to in this claim.
-
toString()
- Returns the string representation of the tag.
-
validate(SHOE_Obj, OntManager)
- Checks the claim for errors and updates internal structures.
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.
Category
public Category(SGML_Tag sgmltag)
- Create a category from its SGML tag representation.
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
getForText
public String getForText()
- Returns the key of the instance that is classified under the category.
getName
public String getName()
- Returns the prefixed name of the category.
getBaseName
public String getBaseName()
- Returns the name of the category as it appears in its originating
ontology.
getElmtId
public Unique_Elt getElmtId()
- Returns a unique identifier for the category. Additionally, this
identifier indicates which ontology the category originates from.
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
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
isVariable
public boolean isVariable()
- Returns true when the category declaration is for a variable.
setForText
public void setForText(String forText)
- Sets the subject of the category claim.
setName
public void setName(String name)
- Sets the prefixed name of the category referred to in this claim.
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
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.
validate
public Vector validate(SHOE_Obj parent,
OntManager ontman)
- Checks the claim for errors and updates internal structures.
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
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