|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opencyc.cycobject.CycObject | +--org.opencyc.cycobject.CycSymbol
Provides the behavior and attributes of an OpenCyc symbol, typically used to represent api function names, and non CycConstant parameters.
Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.
THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Field Summary | |
static java.lang.String |
cycSymbolXMLTag
The name of the XML tag for this object. |
java.lang.String |
symbolName
The symbol represented as a String. |
Constructor Summary | |
CycSymbol(java.lang.String symbolName)
Constructs a new CycSymbol object. |
Method Summary | |
int |
compareTo(java.lang.Object object)
Compares this object with the specified object for order. |
boolean |
equals(java.lang.Object object)
Returns true iff some object equals this CycSymbol |
boolean |
isKeyword()
Returns true iff this symbol is a SubL keyword. |
static boolean |
isValidSymbolName(java.lang.String string)
Returns true iff the given string is a valid symbol name. |
java.lang.String |
toString()
Returns the string representation of the CycSymbol |
void |
toXML(XMLWriter xmlWriter,
int indent,
boolean relative)
Prints the XML representation of the CycSymbol to an XMLWriter |
java.lang.String |
toXMLString()
Returns the XML representation of this object. |
Methods inherited from class org.opencyc.cycobject.CycObject |
cyclify |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String cycSymbolXMLTag
public java.lang.String symbolName
Constructor Detail |
public CycSymbol(java.lang.String symbolName)
symbolName
- the String name of the CycSymbol.Method Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- the Object for equality comparisonpublic boolean isKeyword()
public int compareTo(java.lang.Object object)
compareTo
in interface java.lang.Comparable
object
- the reference object with which to compare.public static boolean isValidSymbolName(java.lang.String string)
string
- the name to be testedpublic java.lang.String toXMLString() throws java.io.IOException
public void toXML(XMLWriter xmlWriter, int indent, boolean relative) throws java.io.IOException
XMLWriter
xmlWriter
- an XMLWriterindent
- an int that specifies by how many spaces to indentrelative
- a boolean; if true indentation is relative, otherwise absolute
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |