|
|||||||||
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.CycAssertion
Provides the behavior and attributes of OpenCyc assertions.
Assertions are communicated over the binary API using their Id number (an int). The associated formula, microtheory, truth-value, direction, and remaining attributes are is fetched later.
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 |
cycAssertionXMLTag
The name of the XML tag for this object. |
java.lang.Integer |
id
Assertion id assigned by the local KB server. |
static java.lang.String |
idXMLTag
The name of the XML tag for id objects |
static int |
indentLength
The default indentation for printing objects to XML |
Constructor Summary | |
CycAssertion(java.lang.Integer id)
Constructs an incomplete CycAssertion object given its local KB id. |
Method Summary | |
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)
Indicates whether the object is equal to this object. |
CycList |
getFormula()
Returns the formula for this assertion. |
java.lang.Integer |
getId()
Returns the id for this assertion. |
java.lang.String |
safeToString()
Returns a string representation without causing additional api calls. |
void |
setFormula(CycList formula)
Sets the formula for this assertion. |
java.lang.String |
stringApiValue()
Returns this object in a form suitable for use as an String api expression value. |
java.lang.String |
toString()
Returns a String representation of the CycAssertion. |
void |
toXML(XMLWriter xmlWriter,
int indent,
boolean relative)
Prints the XML representation of the CycAssertion 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 cycAssertionXMLTag
public static int indentLength
public static final java.lang.String idXMLTag
public java.lang.Integer id
Constructor Detail |
public CycAssertion(java.lang.Integer id)
id
- the assertion id assigned by the local KBMethod Detail |
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String safeToString()
public java.lang.String stringApiValue()
public java.lang.Object cycListApiValue()
public CycList getFormula()
public void setFormula(CycList formula)
formula
- the formula for this assertionpublic java.lang.Integer getId()
public 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 |