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.


Constructor Index

 o Comparison(int, RelArg[])
Create a new comparison clause given the type of the operator and an array of two operands.
 o Comparison(SGML_Tag)
Create a new comparsion clause from its SGML tag representation.

Method Index

 o getArg(int)
Return the argument of the comparison with the given position number.
 o getArgs()
Return an array of the operands of the comparison.
 o getKey()
Returns an identifier for the SHOE object.
 o getOperator()
Return the operator type of the comparison.
 o getOperatorName()
 o getPredicateText()
Return a predicate representation of the comparison.
 o getTextBySubject(OntManager)
Return a subject style representation of the comparison.
 o printSGML(PrintStream)
Writes the objects and its components to the given print stream in SGML format.
 o readSubTags(HTML_Tokenizer)
Reads and processes the tokens from an HTML_Tokenizer until the appropriate closing tag is encountered.
 o setArgValue(int, String)
Set the value of the argument at the selected position.
 o toString()
Returns the string representation of the tag.

Constructors

 o Comparison
 public Comparison(int opType,
                   RelArg args[])
Create a new comparison clause given the type of the operator and an array of two operands.

 o Comparison
 public Comparison(SGML_Tag sgmltag)
Create a new comparsion clause from its SGML tag representation.

Methods

 o getKey
 public String getKey()
Returns an identifier for the SHOE object.

Overrides:
getKey in class SHOE_Obj
 o 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.

 o getOperatorName
 public String getOperatorName()
 o 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.

 o getArgs
 public RelArg[] getArgs()
Return an array of the operands of the comparison.

 o getPredicateText
 public String getPredicateText()
Return a predicate representation of the comparison.

Overrides:
getPredicateText in class Declaration
 o getTextBySubject
 public String getTextBySubject(OntManager ontman)
Return a subject style representation of the comparison.

Overrides:
getTextBySubject in class Declaration
 o setArgValue
 public void setArgValue(int pos,
                         String value)
Set the value of the argument at the selected position.

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