Class OMSymbol

java.lang.Object
org.episteme.core.mathematics.loaders.openmath.OMObject
org.episteme.core.mathematics.loaders.openmath.OMSymbol
All Implemented Interfaces:
Serializable, Cloneable

public class OMSymbol extends OMObject
Models an OpenMath symbol.

Version:
$Revision: 1.3 $
Author:
Manfred N. Riem (mriem@manorrock.org)
See Also:
  • Constructor Details

    • OMSymbol

      public OMSymbol()
      Constructor.

    • OMSymbol

      public OMSymbol(String cd, String name)
      Constructor.

      Parameters:
      cd - the CD of the symbol.
      name - the name of the symbol.
  • Method Details

    • getCd

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

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

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

      Parameters:
      cd - the CD of the symbol.
    • getName

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

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

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

      Parameters:
      name - the name of the symbol.
    • getType

      public 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 String toString()
      Returns a string representation of the object.

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

      public Object clone()
      Clones the object (shallow copy).
      Specified by:
      clone in class OMObject
      Returns:
      the cloned object.
    • copy

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