All Packages Class Hierarchy This Package Previous Next Index
Class SHOE.Comparison
java.lang.Object
|
+----SHOE.SHOE_Obj
|
+----SHOE.Declaration
|
+----SHOE.Comparison
- public class Comparison
- extends Declaration
A class that describes a comparison clause for an inference rule. A
comparison consists of an operator and two operands (also called
arguments.
-
Comparison(int, RelArg[])
- Create a new comparison clause given the type of the operator and
an array of two operands.
-
Comparison(SGML_Tag)
- Create a new comparsion clause from its SGML tag representation.
-
getArg(int)
- Return the argument of the comparison with the given position number.
-
getArgs()
- Return an array of the operands of the comparison.
-
getKey()
- Returns an identifier for the SHOE object.
-
getOperator()
- Return the operator type of the comparison.
-
getOperatorName()
-
-
getPredicateText()
- Return a predicate representation of the comparison.
-
getTextBySubject(OntManager)
- Return a subject style representation of the comparison.
-
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.
-
setArgValue(int, String)
- Set the value of the argument at the selected position.
-
toString()
- Returns the string representation of the tag.
Comparison
public Comparison(int opType,
RelArg args[])
- Create a new comparison clause given the type of the operator and
an array of two operands.
Comparison
public Comparison(SGML_Tag sgmltag)
- Create a new comparsion clause from its SGML tag representation.
getKey
public String getKey()
- Returns an identifier for the SHOE object.
- Overrides:
- getKey in class SHOE_Obj
getOperator
public int getOperator()
- Return the operator type of the comparison. This is either
C_EQUAL, C_NOT_EQUAL, C_GREATER, C_GREATER_OR_EQUAL, C_LESS,
or C_LESS_OR_EQUAL.
getOperatorName
public String getOperatorName()
getArg
public RelArg getArg(int pos)
- Return the argument of the comparison with the given position number.
The LHS is position 1 and the RHS is position 2.
getArgs
public RelArg[] getArgs()
- Return an array of the operands of the comparison.
getPredicateText
public String getPredicateText()
- Return a predicate representation of the comparison.
- Overrides:
- getPredicateText in class Declaration
getTextBySubject
public String getTextBySubject(OntManager ontman)
- Return a subject style representation of the comparison.
- Overrides:
- getTextBySubject in class Declaration
setArgValue
public void setArgValue(int pos,
String value)
- Set the value of the argument at the selected position.
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
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