All Packages Class Hierarchy This Package Previous Next Index
Class SHOE.Def_Arg
java.lang.Object
|
+----SHOE.SHOE_Obj
|
+----SHOE.Def_Arg
- public class Def_Arg
- extends SHOE_Obj
This class implements facilities for defining an argument to a SHOE
relation.
-
CATEGORY
- Constant for identifying a type that is identified by a category.
-
DATE
- Constant for identifying a date type.
-
NUMBER
- Constant for identifying a numerical type.
-
STRING
- Constant for identifying a string type.
-
TRUTH
- Constant for identifying a truth data type (i.e., YES/NO)
-
UNDEFINED
- Constant for identifying an unknown type.
-
Def_Arg(int, String)
- Create a new argument definition given its position in the relation
and type.
-
Def_Arg(int, String, String)
- Create a new argument definition given its position in the relation,
type, and a short phrase.
-
Def_Arg(SGML_Tag)
- Create a new argument definition given its SGML tag representation.
-
getKey()
- Return a string that distinguishes the argument from other
arguments in the same relation.
-
getLabel()
- If the argument has a SHORT name, it is returned, otherwise the
name of the type is returned
-
getPhrase()
- Return a short phrase that describes the argument.
-
getPosition()
- Return the sequence number of the argument in the relation.
-
getType()
- Return the prefixed name of the argument's type.
-
getTypeClass()
- Return the class of the argument's type.
-
getTypeId()
- If the argument is of the type of an object defined in an ontology,
returns the unique identifier for that object, otherwise returns
null.
-
printSGML(PrintStream)
- Writes the objects and its components to the given print
stream in SGML format.
-
readSubTags(HTML_Tokenizer)
- Reads and processes the tokens from an HTML_Tokenizer until
the appropriate closing tag is encountered.
-
setType(String)
- Given a type name, sets the argument definitions type to it.
-
toString()
- Returns the string representation of the tag.
-
validate(SHOE_Obj, OntManager)
- Resolves the type of each argument to make sure it is the name of a
Def_Category or Def_Constant and assigns the corresponding id.
UNDEFINED
public static final int UNDEFINED
- Constant for identifying an unknown type.
NUMBER
public static final int NUMBER
- Constant for identifying a numerical type.
STRING
public static final int STRING
- Constant for identifying a string type.
DATE
public static final int DATE
- Constant for identifying a date type.
TRUTH
public static final int TRUTH
- Constant for identifying a truth data type (i.e., YES/NO)
CATEGORY
public static final int CATEGORY
- Constant for identifying a type that is identified by a category.
Def_Arg
public Def_Arg(int pos,
String type)
- Create a new argument definition given its position in the relation
and type.
Def_Arg
public Def_Arg(int pos,
String type,
String short_phrase)
- Create a new argument definition given its position in the relation,
type, and a short phrase.
Def_Arg
public Def_Arg(SGML_Tag sgmltag)
- Create a new argument definition given its SGML tag representation.
getKey
public String getKey()
- Return a string that distinguishes the argument from other
arguments in the same relation.
- Overrides:
- getKey in class SHOE_Obj
getPhrase
public String getPhrase()
- Return a short phrase that describes the argument.
getPosition
public int getPosition()
- Return the sequence number of the argument in the relation.
getType
public String getType()
- Return the prefixed name of the argument's type.
getTypeClass
public int getTypeClass()
- Return the class of the argument's type. The class can be
NUMBER, STRING, DATE, TRUTH or CATEGORY, each of which is
represented by a constant.
getTypeId
public Unique_Elt getTypeId()
- If the argument is of the type of an object defined in an ontology,
returns the unique identifier for that object, otherwise returns
null.
getLabel
public String getLabel()
- If the argument has a SHORT name, it is returned, otherwise the
name of the type is returned
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
validate
public Vector validate(SHOE_Obj parent,
OntManager ontman)
- Resolves the type of each argument to make sure it is the name of a
Def_Category or Def_Constant and assigns the corresponding id.
setType
public void setType(String data_type)
- Given a type name, sets the argument definitions type to it.
printSGML
public void printSGML(PrintStream out)
- Writes the objects and its components to the given print
stream in SGML format.
- 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