org.jscience.ml.openmath
Class OMSymbol

java.lang.Object
  extended by org.jscience.ml.openmath.OMObject
      extended by org.jscience.ml.openmath.OMSymbol
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class OMSymbol
extends OMObject

Models an OpenMath symbol.

See Also:
"The OpenMath standard 2.0, 2.1.1", Serialized Form

Field Summary
 
Fields inherited from class org.jscience.ml.openmath.OMObject
attributes
 
Constructor Summary
OMSymbol()
          Constructor.
OMSymbol(java.lang.String cd, java.lang.String name)
          Constructor.
 
Method Summary
 java.lang.Object clone()
          Clones the object (shallow copy).
 java.lang.Object copy()
          Copies the object (full copy).
 java.lang.String getCd()
          Gets the CD for this OpenMath symbol.
 java.lang.String getCD()
          Deprecated. use the getCd method instead.
 java.lang.String getName()
          Gets the name for this OpenMath symbol.
 java.lang.String getType()
          Gets the type.
 boolean isAtom()
          Is this an atom object.
 boolean isComposite()
          Is this a composite object.
 boolean isSame(OMObject object)
          Determines if this is the same object.
 boolean isValid()
          Determines if this object is valid.
 void setCD(java.lang.String cd)
          Sets the CD for this OpenMath symbol.
 void setName(java.lang.String name)
          Sets the name for this OpenMath symbol.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class org.jscience.ml.openmath.OMObject
getAttribute, getAttributes, removeAttribute, setAttribute, setAttributes
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OMSymbol

public OMSymbol()
Constructor.


OMSymbol

public OMSymbol(java.lang.String cd,
                java.lang.String name)
Constructor.

Parameters:
cd - the CD of the symbol.
name - the name of the symbol.
Method Detail

getCD

public java.lang.String getCD()
Deprecated. use the getCd method instead.

Gets the CD for this OpenMath symbol.

Returns:
the CD of the symbol.

getCd

public java.lang.String getCd()
Gets the CD for this OpenMath symbol.

Returns:
the CD of the symbol, or null if not set.

setCD

public void setCD(java.lang.String cd)
Sets the CD for this OpenMath symbol.

Parameters:
cd - the CD of the symbol.

getName

public java.lang.String getName()
Gets the name for this OpenMath symbol.

Returns:
the name of the symbol, or null if not set.

setName

public void setName(java.lang.String name)
Sets the name for this OpenMath symbol.

Parameters:
name - the name of the symbol.

getType

public java.lang.String getType()
Gets the type.

Specified by:
getType in class OMObject
Returns:
the type of the symbol.

isAtom

public boolean isAtom()
Is this an atom object.

Specified by:
isAtom in class OMObject
Returns:
true if this is an atom object, false if it is not.

isComposite

public boolean isComposite()
Is this a composite object.

Specified by:
isComposite in class OMObject
Returns:
true if this is a composite object, false if it is not.

toString

public java.lang.String toString()
Returns a string representation of the object.

Specified by:
toString in class OMObject
Returns:
the string representation of the object.

clone

public java.lang.Object clone()
Clones the object (shallow copy).

Specified by:
clone in class OMObject
Returns:
the cloned object.

copy

public java.lang.Object copy()
Copies the object (full copy).

Specified by:
copy in class OMObject
Returns:
the copied object.

isSame

public boolean isSame(OMObject object)
Determines if this is the same object.

Specified by:
isSame in class OMObject
Parameters:
object - the object to test against.
Returns:
true if this is semantically the same object, false if it is not.

isValid

public boolean isValid()
Determines if this object is valid.

Specified by:
isValid in class OMObject
Returns:
true if this is a valid object, false if it is not.