org.opencyc.cycobject
Class Guid

java.lang.Object
  |
  +--org.opencyc.cycobject.Guid

public class Guid
extends java.lang.Object

Provides the behavior and attributes of an OpenCyc GUID (Globally Unique IDentifier). Each OpenCyc constant has an associated guid.

Author:
Stephen L. Reed

Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.

the license

www.opencyc.org

OpenCyc at SourceForge

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
 java.lang.String guidString
          The GUID in string form.
static java.lang.String guidXMLTag
          The name of the XML tag for this object.
 
Constructor Summary
Guid(java.lang.String guidString)
          Constructs a new Guid object.
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns true if the object equals this object.
 java.lang.String toString()
          Returns a string representation of the Guid.
 void toXML(XMLWriter xmlWriter, int indent, boolean relative)
          Prints the XML representation of the Guid to an XMLWriter
 java.lang.String toXMLString()
          Returns the XML representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

guidXMLTag

public static final java.lang.String guidXMLTag
The name of the XML tag for this object.

guidString

public java.lang.String guidString
The GUID in string form.
Constructor Detail

Guid

public Guid(java.lang.String guidString)
Constructs a new Guid object.
Method Detail

equals

public boolean equals(java.lang.Object object)
Returns true if the object equals this object.
Overrides:
equals in class java.lang.Object
Returns:
boolean indicating equality of an object with this object.

toString

public java.lang.String toString()
Returns a string representation of the Guid.
Overrides:
toString in class java.lang.Object
Returns:
the Guid formated as a String.

toXMLString

public java.lang.String toXMLString()
                             throws java.io.IOException
Returns the XML representation of this object.
Returns:
the XML representation of this object

toXML

public void toXML(XMLWriter xmlWriter,
                  int indent,
                  boolean relative)
           throws java.io.IOException
Prints the XML representation of the Guid to an XMLWriter
Parameters:
xmlWriter - an XMLWriter
indent - an int that specifies by how many spaces to indent
relative - a boolean; if true indentation is relative, otherwise absolute