|
|||||||||
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.CycFort | +--org.opencyc.cycobject.CycNart
This class implements the behavior and attributes of a an OpenCyc NART (Non Atomic Reified Term).
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 |
argXMLtag
|
static java.lang.String |
functorXMLtag
|
static int |
indentLength
XML serialization indentation. |
static java.lang.String |
natXMLtag
XML serialization tags. |
Fields inherited from class org.opencyc.cycobject.CycFort |
idXMLTag |
Constructor Summary | |
CycNart()
Constructs a new incomplete CycNart object. |
|
CycNart(CycFort functor,
CycList arguments)
Constructs a new CycNart object from the given functor and argument list. |
|
CycNart(CycFort functor,
java.lang.Object argument)
Constructs a new unary CycNart object from the functor and argument. |
|
CycNart(CycFort functor,
java.lang.Object argument1,
java.lang.Object argument2)
Constructs a new binary CycNart object from the functor and the two arguments. |
|
CycNart(CycList cycList)
Constructs a new CycNart object from the CycList object. |
Method Summary | |
static CycNart |
coerceToCycNart(java.lang.Object object)
Returns the given object if it is a CycNart, otherwise the object is expected to be a CycList and a CycNart object is returned using the given CycList representation. |
java.lang.String |
cyclify()
Returns a cyclified string representation of the OpenCyc NART. |
java.lang.Object |
cycListApiValue()
Returns this object in a form suitable for use as an CycList api expression value. |
boolean |
equals(java.lang.Object object)
Returns true some object equals this CycNart |
java.util.List |
getArguments()
Returns the arguments of the CycNart. |
CycFort |
getFunctor()
Returns the functor of the CycNart. |
boolean |
hasFunctorAndArgs()
Returns true if the functor and arguments are instantiated. |
int |
hashCode()
Return a hash value for this object. |
java.lang.String |
metaGuid()
Returns a string representation of the |
java.lang.String |
metaName()
Returns a metaName representation of the CycNart. |
java.lang.String |
safeToString()
Returns a string representation without causing additional api calls to determine constant names. |
void |
setArguments(CycList arguments)
Sets the arguments of the CycNart. |
void |
setFunctor(CycFort functor)
Sets the functor of the CycNart. |
java.lang.String |
stringApiValue()
Returns this object in a form suitable for use as an String api expression value. |
CycList |
toCycList()
Returns a list representation of the OpenCyc NART. |
java.lang.String |
toString()
Returns a string representation of the OpenCyc NART. |
void |
toXML(XMLWriter xmlWriter,
int indent,
boolean relative)
Prints the XML representation of the |
java.lang.String |
toXMLString()
Returns the XML representation of this object. |
Methods inherited from class org.opencyc.cycobject.CycFort |
compareTo, getId, setId |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
compareTo |
Field Detail |
public static final java.lang.String natXMLtag
public static final java.lang.String functorXMLtag
public static final java.lang.String argXMLtag
public static int indentLength
Constructor Detail |
public CycNart()
public CycNart(CycFort functor, CycList arguments)
functor
- a CycFort which is the functor of this
CycNart object.arguments
- a CycList of the functor's arguments which
are cyc objectspublic CycNart(CycFort functor, java.lang.Object argument)
functor
- a CycFort which is the functor of this
CycNart object.argument
- an Object most typically a CycConstant
which is the single argument of this CycNart object.public CycNart(CycFort functor, java.lang.Object argument1, java.lang.Object argument2)
functor
- a CycFort which is the functor of this
CycNart object.argument1
- an Object most typically a CycConstantargument2
- an Object most typically a CycConstant
which is the single argument of this CycNart object.public CycNart(CycList cycList)
cycList
- a list representation of the CycNartMethod Detail |
public static CycNart coerceToCycNart(java.lang.Object object)
object
- the object to be coerced into a CycNartpublic CycFort getFunctor()
public void setFunctor(CycFort functor)
functor
- the CycFort functor object of the CycNartpublic java.util.List getArguments()
public void setArguments(CycList arguments)
arguments
- the arguments of the CycNartpublic java.lang.String toXMLString() throws java.io.IOException
public void toXML(XMLWriter xmlWriter, int indent, boolean relative) throws java.io.IOException
The parameter [int indent] specifies by how many spaces the XML output should be indented.bd58a976-9c29-11b1-9dad-c379636f7270 FruitFn bd58c19d-9c29-11b1-9dad-c379636f7270 AppleTree
The parameter [boolean relative] specifies whether the indentation should be absolute -- indentation with respect to the beginning of a new line, relative = false -- or relative to the indentation currently specified in the indent_string field of the xml_writer object, relative = true.
toXML
in class CycFort
public CycList toCycList()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String cyclify()
cyclify
in class CycFort
public java.lang.String safeToString()
safeToString
in class CycFort
public java.lang.String stringApiValue()
stringApiValue
in class CycFort
public java.lang.Object cycListApiValue()
cycListApiValue
in class CycFort
public java.lang.String metaGuid()
public java.lang.String metaName()
public int hashCode()
hashCode
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 hasFunctorAndArgs()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |