org.opencyc.api
Class CycAccess

java.lang.Object
  |
  +--org.opencyc.api.CycAccess
Direct Known Subclasses:
CycAssertionsFactory

public class CycAccess
extends java.lang.Object

Provides wrappers for the OpenCyc API.

Collaborates with the CycConnection class which manages the api connections.

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.


Inner Class Summary
protected  class CycAccess.TraceWithNamesInfo
           
 
Field Summary
static CycConstant and
          Convenient reference to #$and.
protected  org.apache.oro.util.Cache askCache
          Least Recently Used Cache of ask results.
static CycConstant baseKB
          Convenient reference to #$BaseKb.
static CycConstant binaryPredicate
          Convenient reference to #$binaryPredicate.
static CycConstant bookkeepingMt
          Convenient reference to #$bookkeepingMt.
static CycConstant collection
          Convenient reference to #$Collection.
static CycConstant comment
          Convenient reference to #$comment.
protected  int communicationMode
           
protected  org.apache.oro.util.Cache countAllInstancesCache
          Least Recently Used Cache of countAllInstances results.
static java.util.HashMap cycAccessInstances
          Dictionary of CycAccess instances, indexed by thread so that the application does not have to keep passing around a CycAccess object reference.
protected  CycConnectionInterface cycConnection
          Reference to CycConnection object which manages the api connection to the OpenCyc server.
static boolean DEFAULT_CONNECTION
          Default value indicating that the OpenCyc api should use one TCP socket for the entire session.
 boolean deferObjectCompletion
          Parameter indicating whether the OpenCyc binary api defers the completion of CycConstant attributes until used for the first time.
static CycConstant different
          Convenient reference to #$different.
static CycConstant elementOf
          Convenient reference to #$elementOf.
static CycConstant genlMt
          Convenient reference to #$genlMt.
static CycConstant genls
          Convenient reference to #$genls.
protected  java.lang.String hostName
           
static CycConstant inferencePSC
          Convenient reference to #$InferencePSC.
static CycConstant isa
          Convenient reference to #$isa.
protected  org.apache.oro.util.Cache isCollectionCache
          Least Recently Used Cache of isCollection results.
protected  org.apache.oro.util.Cache isGenlOfCache
          Least Recently Used Cache of isGenlOf results.
 int messagingMode
          Parameter indicating the serial or concurrent messaging mode to the OpenCyc server.
static CycConstant not
          Convenient reference to #$not.
static CycConstant numericallyEqual
          Convenient reference to #$numericallyEqual.
protected static java.lang.Integer OK_RESPONSE_CODE
           
static CycConstant or
          Convenient reference to #$or.
static boolean PERSISTENT_CONNECTION
          Value indicating that the OpenCyc api should use one TCP socket for the entire session.
 boolean persistentConnection
          Parameter indicating whether the OpenCyc api should use one TCP socket for the entire session, or if the socket is created and then closed for each api call.
static CycConstant plusFn
          Convenient reference to #$PlusFn.
protected  int port
           
protected  int saveTrace
          Parameter that, when true, causes a trace of the messages to and from the server.
static CycAccess sharedCycAccessInstance
          Shared CycAccess instance when thread synchronization is entirely handled by the application.
static CycConstant thing
          Convenient reference to #$Thing.
 boolean traceWithNames
          When true performs tracing of binary mode messages with constant names displayed, which involves recursive api requests.
protected  java.util.Stack traceWithNamesStack
          Stack to prevent tracing of recursive api calls whose sole purpose is to obtain names for traceWithNames.
static boolean TRANSIENT_CONNECTION
          Value indicating that the OpenCyc api socket is created and then closed for each api call.
static CycConstant universalVocabularyMt
          Convenient reference to #$UniversalVocabularyMt.
 
Constructor Summary
CycAccess()
          Constructs a new CycAccess object.
CycAccess(java.lang.String hostName)
          Constructs a new CycAccess object given a host name.
CycAccess(java.lang.String hostName, int basePort, int communicationMode, boolean persistentConnection)
          Constructs a new CycAccess object given a host name, port, communication mode and persistence indicator.
CycAccess(java.lang.String hostName, int basePort, int communicationMode, boolean persistentConnection, int messagingMode)
          Constructs a new CycAccess object given a host name, port, communication mode, persistence indicator, and messaging mode
CycAccess(java.lang.String myAgentName, java.lang.String cycProxyAgentName, int agentCommunity)
          Constructs a new CycAccess object to the given CycProxyAgent in the given agent community.
 
Method Summary
 boolean areAssertedCoextensional(CycFort collection1, CycFort collection2)
          Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are asserted coextensional.
 boolean areAssertedCoextensional(CycFort collection1, CycFort collection2, CycFort mt)
          Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are asserted coextensional.
 boolean areDisjoint(CycFort collection1, CycFort collection2)
          Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are disjoint.
 boolean areDisjoint(CycFort collection1, CycFort collection2, CycFort mt)
          Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are disjoint.
 boolean areHierarchical(CycFort collection1, CycFort collection2)
          Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are in a hierarchy.
 boolean areHierarchical(CycFort collection1, CycFort collection2, CycFort mt)
          Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are in a hierarchy.
 boolean areIntersecting(CycFort collection1, CycFort collection2)
          Returns true if CycFort COLLECION1 and CycFort COLLECTION2 intersect with regard to all-specs.
 boolean areIntersecting(CycFort collection1, CycFort collection2, CycFort mt)
          Returns true if CycFort COLLECION1 and CycFort COLLECTION2 intersect with regard to all-specs.
 boolean areTacitCoextensional(CycFort collection1, CycFort collection2)
          Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are tacitly coextensional via mutual genls of each other.
 boolean areTacitCoextensional(CycFort collection1, CycFort collection2, CycFort mt)
          Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are tacitly coextensional via mutual genls of each other.
 CycList askWithVariable(CycList query, CycVariable variable, CycFort mt)
          Returns a list of bindings for a query with a single unbound variable.
 CycList askWithVariables(CycList query, java.util.ArrayList variables, CycFort mt)
          Returns a list of bindings for a query with unbound variables.
 void assertArg1FormatSingleEntry(CycFort relation)
          Assert an argument contraint for the given relation and argument position.
 void assertArg1Genl(CycFort relation, CycFort argGenl)
          Assert an argument one genls contraint for the given relation.
 void assertArg2Genl(CycFort relation, CycFort argGenl)
          Assert an argument two genls contraint for the given relation.
 void assertArg3Genl(CycFort relation, CycFort argGenl)
          Assert an argument three genls contraint for the given relation.
 void assertArgFormat(CycFort relation, int argPosition, CycFort argNFormat)
          Assert an argument format contraint for the given relation and argument position.
 void assertArgIsa(CycFort relation, int argPosition, CycFort argNIsa)
          Assert an argument isa contraint for the given relation and argument position.
 void assertComment(CycFort cycFort, java.lang.String comment, CycFort mt)
          Assert a comment for the specified CycFort in the specified microtheory.
 void assertComment(java.lang.String cycConstantName, java.lang.String comment, java.lang.String mtName)
          Assert a comment for the specified CycConstant in the specified microtheory MT.
 void assertConceptuallyRelated(CycFort term1, CycFort term2, CycFort mt)
          Assert that term1 is conceptually related to term2 in the specified microtheory.
 void assertGaf(CycFort mt, CycConstant predicate, CycFort arg1, CycFort arg2, CycFort arg3)
          Asserts a ground atomic formula (gaf) in the specified microtheory MT.
 void assertGaf(CycFort mt, CycConstant predicate, CycFort arg1, CycList arg2)
          Asserts a ground atomic formula (gaf) in the specified microtheory MT.
 void assertGaf(CycFort mt, CycConstant predicate, CycFort arg1, int arg2)
          Asserts a ground atomic formula (gaf) in the specified microtheory MT.
 void assertGaf(CycFort mt, CycFort predicate, CycFort arg1, CycFort arg2)
          Asserts a ground atomic formula (gaf) in the specified microtheory MT.
 void assertGaf(CycFort mt, CycFort predicate, CycFort arg1, java.lang.Double arg2)
          Asserts a ground atomic formula (gaf) in the specified microtheory.
 void assertGaf(CycFort mt, CycFort predicate, CycFort arg1, java.lang.Integer arg2)
          Asserts a ground atomic formula (gaf) in the specified microtheory.
 void assertGaf(CycFort mt, CycFort predicate, CycFort arg1, java.lang.String arg2)
          Asserts a ground atomic formula (gaf) in the specified microtheory MT.
 void assertGaf(CycList gaf, CycFort mt)
          Asserts a ground atomic formula (gaf) in the specified microtheory MT.
 void assertGenFormat(CycFort relation, java.lang.String genFormatString, CycList genFormatList)
          Assert a paraphrase format for the specified CycFort in the #$EnglishParaphraseMt.
 void assertGenlMt(CycFort specMt, CycFort genlsMt)
          Assert that the more general micortheory is a genlMt of the more specialized microtheory, asserted in the UniversalVocabularyMt The operation will be added to the KB transcript for replication and archive.
 void assertGenlMt(java.lang.String specMtName, java.lang.String genlsMtName)
          Assert that the more general micortheory is a genlMt of the more specialized microtheory, asserted in the UniversalVocabularyMt The operation will be added to the KB transcript for replication and archive.
 void assertGenlPreds(CycFort specPred, CycFort genlPred)
          Assert that the more general predicate is a genlPreds of the more specialized predicate, asserted in the UniversalVocabularyMt The operation will be added to the KB transcript for replication and archive.
 void assertGenlPreds(java.lang.String specPredName, java.lang.String genlPredName)
          Assert that the more general predicate is a genlPreds of the more specialized predicate, asserted in the UniversalVocabularyMt The operation will be added to the KB transcript for replication and archive.
 void assertGenls(CycFort specCollection, CycFort genlsCollection)
          Assert that the genlsCollection is a genls of specCollection, in the UniveralVocabularyMt.
 void assertGenls(CycFort specCollection, CycFort genlsCollection, CycFort mt)
          Assert that the genlsCollection is a genls of specCollection, in the specified defining microtheory MT.
 void assertGenls(java.lang.String specCollectionName, java.lang.String genlsCollectionName)
          Assert that the genlsCollection is a genls of specCollection, in the UniversalVocabularyMt The operation will be added to the KB transcript for replication and archive.
 void assertGenls(java.lang.String specCollectionName, java.lang.String genlsCollectionName, java.lang.String mtName)
          Assert that the genlsCollection is a genls of specCollection, in the specified defining microtheory MT.
 void assertGenPhraseCountNounPlural(CycFort cycTerm, java.lang.String phrase)
          Asserts a preferred name string for the given term using lexical singular count noun assumptions.
 void assertGenPhraseCountNounSingular(CycFort cycTerm, java.lang.String phrase)
          Asserts a preferred name string for the given term using lexical singular count noun assumptions.
 void assertIsa(CycFort cycFort, CycFort aCollection)
          Assert that the cycFort is a collection, in the UniversalVocabularyMt.
 void assertIsa(CycFort cycFort, CycFort aCollection, CycFort mt)
          Assert that the cycFort is a collection, in the specified defining microtheory MT.
 void assertIsa(java.lang.String cycFortName, java.lang.String collectionName)
          Assert that the cycFort is a collection in the UniversalVocabularyMt.
 void assertIsa(java.lang.String cycFortName, java.lang.String collectionName, java.lang.String mtName)
          Assert that the cycFort is a collection, in the specified defining microtheory MT.
 void assertIsaBinaryPredicate(CycFort cycFort)
          Assert that the specified CycConstant is a #$BinaryPredicate in the specified defining microtheory.
 void assertIsaBinaryPredicate(CycFort cycFort, CycFort mt)
          Assert that the specified CycConstant is a #$BinaryPredicate in the specified defining microtheory.
 void assertIsaCollection(CycFort cycFort)
          Assert that the specified CycConstant is a collection in the UniversalVocabularyMt.
 void assertIsaCollection(CycFort cycFort, CycFort mt)
          Assert that the specified CycConstant is a collection in the specified defining microtheory MT.
 void assertIsas(java.util.ArrayList forts, CycFort collection)
          Asserts each of the given list of forts to be instances of the given collection in the UniversalVocabularyMt
 void assertIsas(java.util.ArrayList fortNames, java.lang.String collectionName)
          Asserts each of the given list of forts to be instances of the given collection in the UniversalVocabularyMt
 void assertNameString(CycFort cycFort, java.lang.String nameString, CycFort mt)
          Assert a name string for the specified CycFort in the specified microtheory.
 void assertNameString(java.lang.String cycConstantName, java.lang.String nameString, java.lang.String mtName)
          Assert a nameString for the specified CycConstant in the specified lexical microtheory.
 void assertResultGenl(CycFort denotationalFunction, CycFort resultGenl)
          Assert the genls result contraint for the given denotational function.
 void assertResultIsa(CycFort denotationalFunction, CycFort resultIsa)
          Assert the isa result contraint for the given denotational function.
 void assertSynonymousExternalConcept(CycFort cycTerm, CycFort informationSource, java.lang.String externalConcept, CycFort mt)
          Asserts that the given DAML imported term is mapped to the given Cyc term.
 void assertSynonymousExternalConcept(java.lang.String cycTerm, java.lang.String informationSource, java.lang.String externalConcept, java.lang.String mt)
          Asserts that the given DAML imported term is mapped to the given Cyc term.
 void assertWithTranscript(CycList sentence, CycFort mt)
          Asserts the given sentence, and then places it on the transcript queue.
 void assertWithTranscript(java.lang.String sentence, CycFort mt)
          Asserts the given sentence, and then places it on the transcript queue.
 void assertWithTranscriptAndBookkeeping(CycList sentence, CycFort mt)
          Asserts the given sentence, and then places it on the transcript queue.
 void assertWithTranscriptAndBookkeeping(java.lang.String sentence, CycFort mt)
          Asserts the given sentence, and then places it on the transcript queue.
 void close()
          Closes the CycConnection object.
protected  void commonInitialization()
          Provides common local and remote CycAccess object initialization.
 CycAssertion completeCycAssertion(CycAssertion cycAssertion)
          Completes the instantiation of a CycAssertion returned by the binary api.
 CycConstant completeCycConstant(CycConstant cycConstant)
          Completes the instantiation of CycConstant returned by the binary api.
 CycList completeCycList(CycList cycList)
          Completes the instantiation of objects contained in the given CycList.
 CycNart completeCycNart(CycNart cycNart)
          Completes the instantiation of a CycNart returned by the binary api.
 CycVariable completeCycVariable(CycVariable cycVariable)
          Completes the instantiation of HL CycVariable returned by the binary api.
 java.lang.Object completeObject(java.lang.Object object)
          Completes the instantiation of objects contained in the given CycList.
 CycConstant constantNameCaseCollision(java.lang.String name)
          Returns a constant whose name differs from the given name only by case.
protected  java.lang.Object[] converse(java.lang.Object command)
          Converses with Cyc to perform an API command.
 boolean converseBoolean(java.lang.Object command)
          Converses with Cyc to perform an API command whose result is returned as a boolean.
 int converseInt(java.lang.Object command)
          Converses with Cyc to perform an API command whose result is returned as an int.
 CycList converseList(java.lang.Object command)
          Converses with Cyc to perform an API command whose result is returned as a list.
 java.lang.Object converseObject(java.lang.Object command)
          Converses with Cyc to perform an API command whose result is returned as an object.
 java.lang.String converseString(java.lang.Object command)
          Converses with Cyc to perform an API command whose result is returned as a String.
 void converseVoid(java.lang.Object command)
          Converses with Cyc to perform an API command whose result is void.
 int countAllInstances_Cached(CycFort collection, CycFort mt)
          Returns the count of the instances of the given collection, implements a cache to avoid asking the same question twice from the KB.
 int countAllInstances(CycFort collection, CycFort mt)
          Returns the count of the instances of the given collection.
 int countUsingBestIndex(CycList formula, CycFort mt)
          Returns the count of the assertions indexed according to the given pattern, using the best index (from among the predicate and argument indices).
 CycConstant createBinaryPredicate(java.lang.String predicateName, CycFort predicateType, java.lang.String comment, CycFort arg1Isa, CycFort arg2Isa, CycFort arg1Format, CycFort arg2Format, CycFort genlPreds, java.lang.String genFormatString, CycList genFormatList)
          Creates a new binary predicate term.
 CycConstant createBinaryPredicate(java.lang.String predicateName, java.lang.String predicateTypeName, java.lang.String comment, java.lang.String arg1IsaName, java.lang.String arg2IsaName, java.lang.String arg1FormatName, java.lang.String arg2FormatName, java.lang.String genlPredsName, java.lang.String genFormatString, java.lang.String genFormatList)
          Creates a new binary predicate term.
 CycFort createCollection(CycFort collection, java.lang.String comment, CycFort commentMt, CycFort isa, CycFort genls)
          Creates a new collection term.
 CycFort createCollection(java.lang.String collectionName, java.lang.String comment, CycFort commentMt, CycFort isa, CycFort genls)
          Creates a new collection term.
 CycConstant createCollection(java.lang.String collectionName, java.lang.String comment, java.lang.String commentMtName, java.lang.String isaName, java.lang.String genlsName)
          Creates a new collection term.
 CycFort createCollectionDenotingBinaryFunction(CycFort binaryFunction, java.lang.String comment, CycFort commentMt, CycFort arg1Isa, CycFort arg2Isa, CycFort arg1Genls, CycFort arg2Genls, CycFort resultIsa)
          Creates a new collection-denoting reifiable binary function term.
 CycFort createCollectionDenotingBinaryFunction(java.lang.String binaryFunction, java.lang.String comment, java.lang.String commentMt, java.lang.String arg1IsaName, java.lang.String arg2IsaName, java.lang.String arg1GenlsName, java.lang.String arg2GenlsName, java.lang.String resultIsa)
          Creates a new collection-denoting reifiable binary function term.
 CycFort createCollectionDenotingUnaryFunction(CycFort unaryFunction, java.lang.String comment, CycFort commentMt, CycFort arg1Isa, CycFort arg1Genl, CycFort resultIsa, CycFort resultGenl)
          Creates a new collection-denoting reifiable unary function term.
 CycFort createCollectionDenotingUnaryFunction(java.lang.String unaryFunction, java.lang.String comment, java.lang.String commentMt, java.lang.String arg1Isa, java.lang.String arg1GenlName, java.lang.String resultIsa, java.lang.String resultGenlName)
          Creates a new collection-denoting reifiable unary function term.
 CycConstant createCollectorMt(java.lang.String mtName, java.lang.String comment, java.util.ArrayList genlMts)
          Creates a new Collector microtheory and links it more general mts.
 CycFort createIndivDenotingUnaryFunction(CycFort unaryFunction, java.lang.String comment, CycFort commentMt, CycFort arg1Isa, CycFort resultIsa)
          Creates a new individual-denoting reifiable unary function term.
 CycFort createIndivDenotingUnaryFunction(java.lang.String unaryFunction, java.lang.String comment, java.lang.String commentMt, java.lang.String arg1Isa, java.lang.String resultIsa)
          Creates a new individual-denoting reifiable unary function term.
 CycFort createIndividual(java.lang.String IndividualName, java.lang.String comment, CycFort commentMt, CycFort isa)
          Creates a new individual term.
 CycFort createIndividual(java.lang.String IndividualName, java.lang.String comment, java.lang.String commentMt, java.lang.String isa)
          Creates a new individual term.
 CycConstant createKbSubsetCollection(java.lang.String constantName, java.lang.String comment)
          Creates a new KB subset collection term.
 CycConstant createMicrotheory(java.lang.String mtName, java.lang.String comment, CycFort isaMt, java.util.ArrayList genlMts)
          Create a microtheory MT, with a comment, isa and CycFort genlMts.
 CycConstant createMicrotheory(java.lang.String mtName, java.lang.String comment, java.lang.String isaMtName, java.util.ArrayList genlMts)
          Create a microtheory MT, with a comment, isa and CycFort genlMts.
 CycConstant[] createMicrotheorySystem(java.lang.String mtRootName, java.lang.String comment, java.util.ArrayList genlMts)
          Create a microtheory system for a new mt.
 CycConstant createNewPermanent(java.lang.String constantName)
          Creates a new permanent Cyc constant in the KB with the specified name.
 CycConstant createSpindleMt(java.lang.String spindleMtName, java.lang.String comment, CycFort spindleHeadMt, CycFort spindleCollectorMt)
          Creates a new spindle microtheory in the given spindle system.
 CycConstant createSpindleMt(java.lang.String spindleMtName, java.lang.String comment, java.lang.String spindleHeadMtName, java.lang.String spindleCollectorMtName)
          Creates a new spindle microtheory in the given spindle system.
static CycAccess current()
          Returns the CycAccess object for this thread.
 void ensureWffConstraints(CycFort cycFort, CycFort isaConstraint, CycFort genlsConstraint)
          Ensures that the given term meets the given isa and genl wff constraints in the UniversalVocabularyMt.
 void ensureWffConstraints(java.lang.String cycFort, java.lang.String isaConstraintName, java.lang.String genlsConstraintName)
          Ensures that the given term meets the given isa and genl wff constraints in the UniversalVocabularyMt.
 CycConstant find(java.lang.String constantName)
          Finds a Cyc constant in the KB with the specified name
 java.lang.Integer findNartId(CycNart cycNart)
          Finds the id of a CycNart given its formula.
 CycConstant findOrCreate(java.lang.String constantName)
          Finds or creates a Cyc constant in the KB with the specified name.
 CycList generateDisambiguationPhraseAndTypes(CycList objects)
          Returns a list of disambiguation expressions, corresponding to each of the terms in the given list of objects.
 CycList getAllDependentSpecs(CycFort cycFort)
          Gets the list of all of the dependent specs for a CycFort collection.
 CycList getAllDependentSpecs(CycFort cycFort, CycFort mt)
          Gets the list of all of the dependent specs for a CycFort collection.
 CycList getAllGenlPreds(CycConstant predicate)
          Gets the list of all of the genlPreds for a CycConstant predicate, using an upward closure.
 CycList getAllGenlPreds(CycConstant predicate, CycFort mt)
          Gets the list of all of the genlPreds for a CycConstant predicate, using an upward closure.
 CycList getAllGenls(CycFort cycFort)
          Gets the list of all of the direct and indirect genls for the given CycFort collection.
 CycList getAllGenls(CycFort cycFort, CycFort mt)
          Gets the list of all of the direct and indirect genls for a CycFort collection given a relevant microtheory.
 CycList getAllGenlsWrt(CycFort spec, CycFort genl)
          Gets the list of all of the direct and indirect genls for a CycFort SPEC which are also specs of CycFort GENL.
 CycList getAllGenlsWrt(CycFort spec, CycFort genl, CycFort mt)
          Gets the list of all of the direct and indirect genls for a CycFort SPEC which are also specs of CycFort GENL.
 CycList getAllInstances(CycFort cycFort)
          Gets a list of all the direct and indirect instances (individuals) for a CycFort collection.
 CycList getAllInstances(CycFort cycFort, CycFort mt)
          Gets a list of all the direct and indirect instances (individuals) for a CycFort collection in the given microtheory.
 java.util.HashSet getAllInstancesHashSet(CycFort cycFort)
          Gets a hashset of all the direct and indirect instances (individuals) for a CycFort collection in the given microtheory.
 java.util.HashSet getAllInstancesHashSet(CycFort cycFort, CycFort mt)
          Gets a hashset of all the direct and indirect instances (individuals) for a CycFort collection in the given microtheory.
 CycList getAllIsa(CycFort cycFort)
          Gets the list of the collections of which the CycFort is directly and indirectly an instance.
 CycList getAllIsa(CycFort cycFort, CycFort mt)
          Gets the list of the collections of which the CycFort is directly and indirectly an instance.
 CycList getAllSpecInverses(CycFort cycFort)
          Gets the list of all of the direct and indirect specs-inverses for the given predicate in all microtheories.
 CycList getAllSpecInverses(CycFort cycFort, CycFort mt)
          Gets the list of all of the direct and indirect specs-inverses for the given predicate in the given microtheory.
 java.util.HashSet getAllSpecInversesHashSet(CycFort cycFort)
          Gets the hashset of all of the direct and indirect specs-inverses for the given predicate in all microtheories.
 java.util.HashSet getAllSpecInversesHashSet(CycFort cycFort, CycFort mt)
          Gets the hashset of all of the direct and indirect specs-inverses for the given predicate in the given microtheory.
 CycList getAllSpecMts(CycFort mt)
          Gets the list of all of the direct and indirect specs-mts for the given microtheory in *mt-mt* (currently #$UniversalVocabularyMt).
 java.util.HashSet getAllSpecMtsHashSet(CycFort mt)
          Gets the hashset of all of the direct and indirect specs-mts for the given microtheory in *mt-mt* (currently #$UniversalVocabularyMt).
 CycList getAllSpecPreds(CycFort cycFort)
          Gets the list of all of the direct and indirect specs-preds for the given predicate in all microtheories.
 CycList getAllSpecPreds(CycFort cycFort, CycFort mt)
          Gets the list of all of the direct and indirect specs-preds for the given predicate in the given microtheory.
 java.util.HashSet getAllSpecPredsHashSet(CycFort cycFort)
          Gets the hashset of all of the direct and indirect specs-preds for the given predicate in all microtheories.
 java.util.HashSet getAllSpecPredsHashSet(CycFort cycFort, CycFort mt)
          Gets the hashset of all of the direct and indirect specs-preds for the given predicate in the given microtheory.
 CycList getAllSpecs(CycFort cycFort)
          Gets a list of all of the direct and indirect specs for a CycFort collection.
 CycList getAllSpecs(CycFort cycFort, CycFort mt)
          Gets the list of all of the direct and indirect specs for the given collection in the given microtheory.
 java.util.HashSet getAllSpecsHashSet(CycFort cycFort)
          Gets a hashset of all of the direct and indirect specs for a CycFort collection.
 java.util.HashSet getAllSpecsHashSet(CycFort cycFort, CycFort mt)
          Gets the hashset of all of the direct and indirect specs for the given collection in the given microtheory.
 CycList getApplicableBinaryPredicates(CycList kbSubsetCollections)
          Returns the list of applicable binary predicates which are elements of any of the given list of KBSubsetCollections.
 CycList getArg1Formats(CycConstant predicate)
          Gets a list of the arg1Formats for a CycConstant predicate.
 CycList getArg1Formats(CycConstant predicate, CycFort mt)
          Gets a list of the arg1Formats for a CycConstant predicate.
 CycList getArg1Isas(CycConstant predicate)
          Gets a list of the arg1Isas for a CycConstant predicate.
 CycList getArg1Isas(CycConstant predicate, CycFort mt)
          Gets the list of the arg1Isas for a CycConstant predicate given an mt.
 CycList getArg1s(CycFort predicate, CycFort arg2, CycFort mt)
          Returns the list of arg1 terms from gafs having the specified predicate and arg2 values.
 CycList getArg1s(java.lang.String predicate, java.lang.String arg2, java.lang.String mt)
          Returns the list of arg1 terms from gafs having the specified predicate and arg2 values.
 java.lang.Object getArg2(CycFort predicate, CycFort arg1, CycFort mt)
          Returns the first arg2 term from gafs having the specified predicate and arg1 values.
 java.lang.Object getArg2(CycFort predicate, java.lang.Object arg1)
          Returns the single (first) arg2 value of a binary gaf, given the predicate and arg0, looking in all microtheories.
 java.lang.Object getArg2(java.lang.String predicate, CycFort arg1, CycFort mt)
          Returns the first arg2 term from gafs having the specified predicate and arg1 values.
 java.lang.Object getArg2(java.lang.String predicate, java.lang.String arg1, java.lang.String mt)
          Returns the first arg2 term from gafs having the specified predicate and arg1 values.
 CycList getArg2Formats(CycConstant predicate)
          Gets a list of the arg2Formats for a CycConstant predicate.
 CycList getArg2Formats(CycConstant predicate, CycFort mt)
          Gets a list of the arg2Formats for a CycConstant predicate.
 CycList getArg2Isas(CycConstant predicate)
          Gets a list of the arg2Isas for a CycConstant predicate.
 CycList getArg2Isas(CycConstant predicate, CycFort mt)
          Gets the list of the arg2Isas for a CycConstant predicate given an mt.
 CycList getArg2s(CycFort predicate, CycFort arg1, CycFort mt)
          Returns the list of arg2 terms from gafs having the specified predicate and arg1 values.
 CycList getArg2s(CycFort predicate, java.lang.Object arg1)
          Returns the list of arg2 values of binary gafs, given the predicate and arg1, looking in all microtheories.
 CycList getArg2s(java.lang.String predicate, java.lang.String arg1, java.lang.String mt)
          Returns the list of arg2 terms from gafs having the specified predicate and arg1 values.
 CycList getArg3Isas(CycConstant predicate)
          Gets a list of the arg3Isas for a CycConstant predicate.
 CycList getArg3Isas(CycConstant predicate, CycFort mt)
          Gets the list of the arg3Isas for a CycConstant predicate given an mt.
 CycList getArg4Isas(CycConstant predicate)
          Gets a list of the arg4Isas for a CycConstant predicate.
 CycList getArg4Isas(CycConstant predicate, CycFort mt)
          Gets the list of the arg4Isas for a CycConstant predicate given an mt.
 CycList getArgNGenls(CycConstant predicate, int argPosition)
          Gets the list of the argNGenls for a CycConstant predicate.
 CycList getArgNGenls(CycConstant predicate, int argPosition, CycFort mt)
          Gets the list of the argNGenls for a CycConstant predicate.
 CycList getArgNIsas(CycConstant predicate, int argPosition)
          Gets a list of the argNIsas for a CycConstant predicate.
 CycList getArgNIsas(CycConstant predicate, int argPosition, CycFort mt)
          Gets the list of the argNIsas for a CycConstant predicate given an mt.
 int getArity(CycFort predicate)
          Returns the arity of the given predicate.
 CycAssertion getAssertionById(java.lang.Integer id)
          Gets a CycAssertion by using its id.
 CycList getBackchainImplicationRules(CycConstant predicate, CycList formula, CycFort mt)
          Gets a list of the backchaining implication rules which might apply to the given rule.
 CycList getBackchainRules(CycConstant predicate, CycFort mt)
          Gets a list of the backchaining implication rules which might apply to the given predicate.
 CycList getCoExtensionals(CycFort cycFort)
          Gets a list of the coExtensionals for a CycFort.
 CycList getCoExtensionals(CycFort cycFort, CycFort mt)
          Gets a list of the coExtensionals for a CycFort.
 CycList getCollectionLeaves(CycFort cycFort)
          Gets the list of the collection leaves (most specific of the all-specs) for a CycFort collection.
 CycList getCollectionLeaves(CycFort cycFort, CycFort mt)
          Gets the list of the collection leaves (most specific of the all-specs) for a CycFort collection.
 java.lang.String getComment(CycFort cycFort)
          Gets the comment for a CycFort.
 java.lang.String getComment(CycFort cycFort, CycFort mt)
          Gets the comment for a CycFort in the relevant mt.
 int getCommunicationMode()
          Returns the communication mode.
 CycConstant getConstantByGuid(Guid guid)
          Gets a CycConstant by using its GUID.
 CycConstant getConstantById(java.lang.Integer id)
          Gets a CycConstant by using its ID.
 CycConstant getConstantByName(java.lang.String constantName)
          Gets a CycConstant by using its constant name.
 Guid getConstantGuid(CycConstant cycConstant)
          Gets the Guid for the given CycConstant, raising an exception if the constant does not exist.
 Guid getConstantGuid(java.lang.Integer id)
          Gets the Guid for the given constant id.
 Guid getConstantGuid(java.lang.String constantName)
          Gets the Guid for the given constant name, raising an exception if the constant does not exist.
 java.lang.Integer getConstantId(CycConstant cycConstant)
          Gets the ID for the given CycConstant.
 java.lang.Integer getConstantId(java.lang.String constantName)
          Gets the ID for the given constant name.
 java.lang.String getConstantName(java.lang.Integer id)
          Gets the name for the given constant id.
 CycConnectionInterface getCycConnection()
          Returns the CycConnection object.
 CycNart getCycNartById(java.lang.Integer id)
          Gets a CycNart by using its id.
 CycNart getCycNartFromCons(CycList elCons)
          Gets the CycNart object from a Cons object that lists the names of its functor and its arguments.
 CycList getDisjointWiths(CycFort cycFort)
          Gets a list of the disjointWiths for a CycFort.
 CycList getDisjointWiths(CycFort cycFort, CycFort mt)
          Gets a list of the disjointWiths for a CycFort.
 CycList getForwardChainRules(CycConstant predicate, CycFort mt)
          Gets a list of the forward chaining implication rules which might apply to the given predicate.
 CycList getForwardChainRules(CycConstant predicate, CycList formula, CycFort mt)
          Gets a list of the forward chaining implication rules which might apply to the given rule.
 CycList getGafs(CycFort cycFort, CycFort predicate)
          Returns the list of gafs in which the predicate is the given predicate and in which the given term appears in the first argument position.
 CycList getGafs(CycFort cycFort, CycFort predicate, CycFort mt)
          Returns the list of gafs in which the predicate is the given predicate and in which the given term appears in the first argument position.
 CycList getGafs(CycFort cycFort, CycList predicates)
          Returns the list of gafs in which the predicate is a element of the given list of predicates and in which the given term appears in the first argument position.
 CycList getGafs(CycFort cycFort, CycList predicates, CycFort mt)
          Returns the list of gafs in which the predicate is a element of the given list of predicates and in which the given term appears in the first argument position.
 java.lang.String getGeneratedPhrase(CycFort cycFort)
          Gets the default generated phrase for a CycFort (intended for predicates).
 CycList getGenlPreds(CycConstant predicate)
          Gets the list of the genlPreds for a CycConstant predicate.
 CycList getGenlPreds(CycConstant predicate, CycFort mt)
          Gets the list of the genlPreds for a CycConstant predicate.
 CycList getGenls(CycFort cycFort)
          Gets the list of the directly asserted true genls for the given CycFort collection.
 CycList getGenls(CycFort cycFort, CycFort mt)
          Gets the list of the directly asserted true genls for the given CycFort collection.
 CycList getGenlSiblings(CycFort cycFort)
          Gets the list of the direct genls of the direct specs for the given CycFort collection.
 CycList getGenlSiblings(CycFort cycFort, CycFort mt)
          Gets the list of the direct genls of the direct specs for the given CycFort collection.
 java.lang.String getImpreciseParaphrase(CycList assertion)
          Gets the imprecise paraphrase for a Cyc assertion.
 java.lang.String getImpreciseParaphrase(java.lang.String assertionString)
          Gets the imprecise paraphrase for a Cyc assertion.
 java.lang.String getImprecisePluralGeneratedPhrase(CycFort cycFort)
          Gets the imprecise plural generated phrase for a CycFort (intended for collections).
 java.lang.String getImpreciseSingularGeneratedPhrase(CycFort cycFort)
          Gets the imprecise singular generated phrase for a CycFort (intended for individuals).
 CycList getInstances(CycFort cycFort)
          Gets the list of the instances (who are individuals) of a CycFort collection.
 CycList getInstances(CycFort cycFort, CycFort mt)
          Gets the list of the instances (who are individuals) of a CycFort collection.
 CycList getInstanceSiblings(CycFort cycFort)
          Gets the list of the instance siblings of a CycFort, for all collections of which it is an instance.
 CycList getInstanceSiblings(CycFort cycFort, CycFort mt)
          Gets the list of the instance siblings of a CycFort, for all collections of which it is an instance.
 CycList getInterArgIsa1_2_forArg2(CycConstant predicate, CycFort arg1)
          Gets the list of the interArgIsa1-2 isa constraints for arg2, given the predicate and arg1.
 CycList getInterArgIsa1_2_forArg2(CycConstant predicate, CycFort arg1, CycFort mt)
          Gets the list of the interArgIsa1-2 isa constraints for arg2, given the predicate and arg1.
 CycList getInterArgIsa1_2s(CycConstant predicate)
          Gets the list of the interArgIsa1-2 isa constraint pairs for the given predicate.
 CycList getInterArgIsa1_2s(CycConstant predicate, CycFort mt)
          Gets the list of the interArgIsa1-2 isa constraint pairs for the given predicate.
 CycList getIsas(CycFort cycFort)
          Gets the list of the isas for the given CycFort.
 CycList getIsas(CycFort cycFort, CycFort mt)
          Gets the list of the isas for the given CycFort.
 CycList getKbSubset(CycFort cycKbSubsetCollection)
          Gets a list of the elements of the given CycKBSubsetCollection.
 CycConstant getKnownConstantByGuid(Guid guid)
          Gets a known CycConstant by using its GUID.
 CycConstant getKnownConstantByGuid(java.lang.String guidString)
          Gets a known CycConstant by using its GUID string.
 CycConstant getKnownConstantByName(java.lang.String constantName)
          Gets a known CycConstant by using its constant name.
 CycList getLocalDisjointWith(CycFort cycFort)
          Gets the list of the collections asserted to be disjoint with a CycFort collection.
 CycList getLocalDisjointWith(CycFort cycFort, CycFort mt)
          Gets the list of the collections asserted to be disjoint with a CycFort collection.
 CycList getMaxSpecs(CycFort cycFort)
          Gets the list of the least specific specs for the given CycFort collection.
 CycList getMaxSpecs(CycFort cycFort, CycFort mt)
          Gets the list of the least specific specs for the given CycFort collection.
 CycFort getMinCol(CycList collections)
          Returns the single most specific collection from the given list of collectons.
 CycList getMinGenls(CycFort cycFort)
          Gets a list of the minimum (most specific) genls for a CycFort collection.
 CycList getMinGenls(CycFort cycFort, CycFort mt)
          Gets a list of the minimum (most specific) genls for a CycFort collection.
 CycList getMinIsas(CycFort cycFort)
          Gets the list of the most specific collections (having no subsets) which contain a CycFort term.
 CycList getMinIsas(CycFort cycFort, CycFort mt)
          Gets the list of the most specific collections (having no subsets) which contain a CycFort term.
 CycList getNameStrings(CycFort cycFort, CycFort mt)
          Gets the list of name strings for the given CycFort.
 java.lang.String getParaphrase(CycList assertion)
          Gets the paraphrase for a Cyc assertion.
 java.lang.String getPluralGeneratedPhrase(CycFort cycFort)
          Gets the plural generated phrase for a CycFort (intended for collections).
 CycList getPublicConstants()
          Gets a list of the public Cyc constants.
 CycList getResultIsas(CycConstant function)
          Gets the list of the resultIsa for a CycConstant function.
 CycList getResultIsas(CycConstant function, CycFort mt)
          Gets the list of the resultIsa for a CycConstant function.
 CycList getSampleLeafSpecs(CycFort cycFort, int numberOfSamples)
          Gets the list with the specified number of sample specs of the given CycFort collection.
 CycList getSampleLeafSpecs(CycFort cycFort, int numberOfSamples, CycFort mt)
          Gets the list with the specified number of sample specs of the given CycFort collection.
 CycList getSiblings(CycFort cycFort)
          Gets the list of the siblings (direct specs of the direct genls) for the given CycFort collection.
 CycList getSiblings(CycFort cycFort, CycFort mt)
          Gets the list of the siblings (direct specs of the direct genls) for the given CycFort collection.
 java.lang.String getSingularGeneratedPhrase(CycFort cycFort)
          Gets the singular generated phrase for a CycFort (intended for individuals).
 CycList getSpecs(CycFort cycFort)
          Gets the list of the directly asserted true specs for the given CycFort collection.
 CycList getSpecs(CycFort cycFort, CycFort mt)
          Gets the list of the directly asserted true specs for the given CycFort collection.
 CycList getSpecSiblings(CycFort cycFort)
          Gets the list of the siblings (direct specs of the direct genls) for the given CycFort collection.
 CycList getSpecSiblings(CycFort cycFort, CycFort mt)
          Gets the list of the siblings (direct specs of the direct genls) for the given CycFort collection.
 java.lang.Object getSymbolValue(CycSymbol cycSymbol)
          Gets the value of a given KB symbol.
 CycList getSynonymousExternalConcepts(CycFort informationSource, CycFort mt)
          Gets the list of mappings from the specified information source given the inference microtheory.
 CycList getSynonymousExternalConcepts(java.lang.String informationSource, java.lang.String mt)
          Gets the list of mappings from the specified information source given the inference microtheory.
 java.lang.String getVariableName(java.lang.Integer id)
          Gets the name for the given variable id.
 CycList getWhyCollectionsIntersect(CycFort collection1, CycFort collection2)
          Gets the list of the justifications of why CycFort COLLECTION1 and a CycFort COLLECTION2 intersect.
 CycList getWhyCollectionsIntersect(CycFort collection1, CycFort collection2, CycFort mt)
          Gets the list of the justifications of why CycFort COLLECTION1 and a CycFort COLLECTION2 intersect.
 java.util.ArrayList getWhyCollectionsIntersectParaphrase(CycFort collection1, CycFort collection2)
          Gets the English parapharse of the justifications of why CycFort COLLECTION1 and a CycFort COLLECTION2 intersect.
 java.util.ArrayList getWhyCollectionsIntersectParaphrase(CycFort collection1, CycFort collection2, CycFort mt)
          Gets the English parapharse of the justifications of why CycFort COLLECTION1 and a CycFort COLLECTION2 intersect.
 CycList getWhyGenl(CycFort spec, CycFort genl)
          Gets the list of the justifications of why CycFort SPEC is a SPEC of CycFort GENL.
 CycList getWhyGenl(CycFort spec, CycFort genl, CycFort mt)
          Gets the list of the justifications of why CycFort SPEC is a SPEC of CycFort GENL.
 java.util.ArrayList getWhyGenlParaphrase(CycFort spec, CycFort genl)
          Gets the English parapharse of the justifications of why CycFort SPEC is a SPEC of CycFort GENL.
 java.util.ArrayList getWhyGenlParaphrase(CycFort spec, CycFort genl, CycFort mt)
          Gets the English parapharse of the justifications of why CycFort SPEC is a SPEC of CycFort GENL.
 CycList getWhyIsa(CycFort spec, CycFort genl)
          Gets the list of the justifications of why CycFort TERM is an instance of CycFort COLLECTION.
 CycList getWhyIsa(CycFort spec, CycFort genl, CycFort mt)
          Gets the list of the justifications of why CycFort TERM is an instance of CycFort COLLECTION.
 java.util.ArrayList getWhyIsaParaphrase(CycFort spec, CycFort genl)
          Gets the English parapharse of the justifications of why CycFort TERM is an instance of CycFort COLLECTION.
 java.util.ArrayList getWhyIsaParaphrase(CycFort spec, CycFort genl, CycFort mt)
          Gets the English parapharse of the justifications of why CycFort TERM is an instance of CycFort COLLECTION.
 boolean hasSomePredicateUsingTerm(CycConstant predicate, CycFort term, java.lang.Integer argumentPosition, CycFort mt)
          Returns true iff any ground formula instances exist having the given predicate, and the given term in the given argument position.
 int importMucExpression(CycList mucExpression, java.lang.String mtName)
          Imports a MUC (Message Understanding Conference) formatted symbolic expression into cyc via the function which parses the expression and creates assertions for the contained concepts and relations between them.
 boolean isa(CycFort term, CycFort collection)
          Returns true if CycFort TERM is a instance of CycFort COLLECTION, defaulting to all microtheories.
 boolean isa(CycFort term, CycFort collection, CycFort mt)
          Returns true if CycFort TERM is a instance of CycFort COLLECTION, using the given microtheory.
 boolean isa(CycFort term, java.lang.String collectionName)
          Returns true if CycFort TERM is a instance of CycFort COLLECTION, defaulting to all microtheories.
 boolean isBackchainDiscouraged(CycConstant predicate, CycFort mt)
          Returns true iff backchain inference on the given predicate is discouraged.
 boolean isBackchainEncouraged(CycConstant predicate, CycFort mt)
          Returns true iff backchain inference on the given predicate is encouraged.
 boolean isBackchainForbidden(CycConstant predicate, CycFort mt)
          Returns true iff backchain inference on the given predicate is forbidden.
 boolean isBackchainRequired(CycConstant predicate, CycFort mt)
          Returns true iff backchain inference on the given predicate is required.
 boolean isBinaryPredicate(CycConstant cycConstant)
          Returns true if cycConstant is a BinaryPredicate.
 boolean isCollection_Cached(CycFort cycFort)
          Returns true if cycConstant is a Collection, implements a cache to avoid asking the same question twice from the KB.
 boolean isCollection(CycFort cycFort)
          Returns true if cycConstant is a Collection.
 boolean isConstantNameAvailable(java.lang.String candidateName)
          Returns true if the candidate name is an available CycConstant name, case insensitive.
 boolean isCycLNonAtomicReifableTerm(CycList formula)
          Returns true if formula is well-formed Non Atomic Reifable Term.
 boolean isCycLNonAtomicUnreifableTerm(CycList formula)
          Returns true if formula is well-formed Non Atomic Un-reifable Term.
 boolean isEvaluatablePredicate(CycConstant predicate)
          Returns true if cycConstant is an evaluatable predicate.
 boolean isFormulaWellFormed(CycList formula, CycFort mt)
          Returns true if formula is well-formed in the relevant mt.
 boolean isFunction(CycConstant cycConstant)
          Returns true if cycConstant is a Function.
 boolean isGenlInverseOf(CycFort genlPred, CycFort specPred)
          Returns true if CycFort GENLPRED is a genl-inverse of CycFort SPECPRED in any MT.
 boolean isGenlInverseOf(CycFort genlPred, CycFort specPred, CycFort mt)
          Returns true if CycFort GENLPRED is a genl-inverse of CycFort SPECPRED in MT.
 boolean isGenlMtOf(CycFort genlMt, CycFort specMt)
          Returns true if CycFort GENLMT is a genl-mt of CycFort SPECPRED in *mt-mt* (currently #$UniversalVocabularyMt).
 boolean isGenlOf_Cached(CycFort genl, CycFort spec)
          Returns true if CycFort GENL is a genl of CycFort SPEC, implements a cache to avoid asking the same question twice from the KB.
 boolean isGenlOf(CycFort genl, CycFort spec)
          Returns true if CycFort GENL is a genl of CycFort SPEC.
 boolean isGenlOf(CycFort genl, CycFort spec, CycFort mt)
          Returns true if CycFort GENL is a genl of CycFort SPEC in MT.
 boolean isGenlPredOf(CycFort genlPred, CycFort specPred)
          Returns true if CycFort GENLPRED is a genl-pred of CycFort SPECPRED in any MT.
 boolean isGenlPredOf(CycFort genlPred, CycFort specPred, CycFort mt)
          Returns true if CycFort GENLPRED is a genl-pred of CycFort SPECPRED in MT.
 boolean isIndividual(CycFort cycFort)
          Returns true if cycConstant is an Individual.
 boolean isIrreflexivePredicate(CycConstant predicate, CycFort mt)
          Returns true iff the predicate has the irreflexive property: (#$isa ?PRED #$IrreflexsiveBinaryPredicate).
 boolean isMicrotheory(CycFort cycFort)
          Returns true if cycConstant is a microtheory.
 boolean isOpenCyc()
          Returns true if this KB is OpenCyc.
 boolean isPredicate(CycFort cycFort)
          Returns true if cycFort is a Predicate.
 boolean isPublicConstant(CycConstant cycConstant)
          Returns true if cycConstant is a PublicConstant.
 boolean isQueryTrue_Cached(CycList query, CycFort mt)
          Returns true iff the query is true in the knowledge base, implements a cache to avoid asking the same question twice from the KB.
 boolean isQueryTrue(CycList query, CycFort mt)
          Returns true iff the ground query is true in the knowledge base.
 boolean isQuotedCollection(CycFort cycFort)
          Returns true if term is a quotedCollection, in any microtheory
 boolean isQuotedCollection(CycFort cycFort, CycFort mt)
          Returns true if term is a quotedCollection is a quotedCollection.
 boolean isSpecOf(CycFort spec, CycFort genl)
          Returns true if CycFort SPEC is a spec of CycFort GENL.
 boolean isSpecOf(CycFort spec, CycFort genl, CycFort mt)
          Returns true if CycFort SPEC is a spec of CycFort GENL.
 boolean isUnaryPredicate(CycConstant cycConstant)
          Returns true if cycConstant is a UnaryPredicate.
 boolean isValidConstantName(java.lang.String candidateName)
          Returns true if the candidate name uses valid CycConstant characters.
 boolean isWellFormedFormula(CycList cycList)
          Returns true iff CycList represents a well formed formula.
 void kill(java.util.ArrayList cycConstants)
          Kills the given Cyc constants.
 void kill(CycConstant cycConstant)
          Kills a Cyc constant.
 void kill(CycConstant[] cycConstants)
          Kills the given Cyc constants.
 void kill(CycFort cycFort)
          Kills a Cyc NART (Non Atomic Reified Term).
 CycConstant makeCycConstant(java.lang.String name)
          Returns a new CycConstant object using the constant name, recording bookkeeping information and archiving to the Cyc transcript.
 CycList makeCycList(java.lang.String string)
          Constructs a new CycList object by parsing a string.
 boolean predicateRelates(CycConstant binaryPredicate, CycFort arg1, CycFort arg2)
          Returns true if CycConstant BINARYPREDICATE relates CycFort ARG1 and CycFort ARG2.
 boolean predicateRelates(CycConstant binaryPredicate, CycFort arg1, CycFort arg2, CycFort mt)
          Returns true if CycConstant BINARYPREDICATE relates CycFort ARG1 and CycFort ARG2.
 CycList rkfPhraseReader(java.lang.String text, CycFort parsingMt, CycFort domainMt)
          Returns a list of parsing expressions, each consisting of a parsing span expression, and a list of parsed terms.
 void setCyclist(CycConstant cyclist)
          Sets the value of the Cyclist, whose identity will be attached via #$myCreator bookkeeping assertions to new KB entities created in this session.
 void setCyclist(java.lang.String cyclistName)
          Sets the value of the Cyclist, whose identity will be attached via #$myCreator bookkeeping assertions to new KB entities created in this session.
 void setKePurpose(CycConstant project)
          Sets the value of the KE purpose, whose project name will be attached via #$myCreationPurpose bookkeeping assertions to new KB entities created in this session.
 void setKePurpose(java.lang.String projectName)
          Sets the value of the KE purpose, whose project name will be attached via #$myCreationPurpose bookkeeping assertions to new KB entities created in this session.
 void setReadableNarts()
          Sets the *print-readable-narts* feature on.
static void setSharedCycAccessInstance(CycAccess sharedCycAccessInstance)
          Sets the shared CycAccess instance.
 void setSymbolValue(CycSymbol cycSymbol, java.lang.Object value)
          Sets a KB symbol to have the specified value.
 java.lang.String toString()
          Returns a string representation of this object.
 void traceNamesOff()
          Turns on the diagnostic trace of messages with constant names looked up via recursive api request.
 void traceNamesOn()
          Turns on the diagnostic trace of messages with constant names looked up via recursive api request.
 void traceOff()
          Turns off the diagnostic trace of socket messages.
 void traceOn()
          Turns on the diagnostic trace of socket messages.
 void traceOnDetailed()
          Turns on the detailed diagnostic trace of socket messages.
 void unassertGaf(CycList gaf, CycFort mt)
          Unasserts the given ground atomic formula (gaf) in the specified microtheory MT.
protected  java.lang.String withBookkeepingInfo()
          Returns a with-bookkeeping-info macro expresssion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cycAccessInstances

public static java.util.HashMap cycAccessInstances
Dictionary of CycAccess instances, indexed by thread so that the application does not have to keep passing around a CycAccess object reference.

sharedCycAccessInstance

public static CycAccess sharedCycAccessInstance
Shared CycAccess instance when thread synchronization is entirely handled by the application. Use of the CycAccess.current() method returns this reference if the lookup by process thread fails.

traceWithNames

public boolean traceWithNames
When true performs tracing of binary mode messages with constant names displayed, which involves recursive api requests.

traceWithNamesStack

protected java.util.Stack traceWithNamesStack
Stack to prevent tracing of recursive api calls whose sole purpose is to obtain names for traceWithNames.

TRANSIENT_CONNECTION

public static final boolean TRANSIENT_CONNECTION
Value indicating that the OpenCyc api socket is created and then closed for each api call.

PERSISTENT_CONNECTION

public static final boolean PERSISTENT_CONNECTION
Value indicating that the OpenCyc api should use one TCP socket for the entire session.

DEFAULT_CONNECTION

public static final boolean DEFAULT_CONNECTION
Default value indicating that the OpenCyc api should use one TCP socket for the entire session.

deferObjectCompletion

public boolean deferObjectCompletion
Parameter indicating whether the OpenCyc binary api defers the completion of CycConstant attributes until used for the first time.

persistentConnection

public boolean persistentConnection
Parameter indicating whether the OpenCyc api should use one TCP socket for the entire session, or if the socket is created and then closed for each api call.

messagingMode

public int messagingMode
Parameter indicating the serial or concurrent messaging mode to the OpenCyc server.

hostName

protected java.lang.String hostName

port

protected int port

communicationMode

protected int communicationMode

OK_RESPONSE_CODE

protected static final java.lang.Integer OK_RESPONSE_CODE

saveTrace

protected int saveTrace
Parameter that, when true, causes a trace of the messages to and from the server. This variable preserves the value of the CycConnection trace between instantiations when the connection is transient.

baseKB

public static CycConstant baseKB
Convenient reference to #$BaseKb.

isa

public static CycConstant isa
Convenient reference to #$isa.

genls

public static CycConstant genls
Convenient reference to #$genls.

genlMt

public static CycConstant genlMt
Convenient reference to #$genlMt.

comment

public static CycConstant comment
Convenient reference to #$comment.

collection

public static CycConstant collection
Convenient reference to #$Collection.

binaryPredicate

public static CycConstant binaryPredicate
Convenient reference to #$binaryPredicate.

elementOf

public static CycConstant elementOf
Convenient reference to #$elementOf.

and

public static CycConstant and
Convenient reference to #$and.

or

public static CycConstant or
Convenient reference to #$or.

not

public static CycConstant not
Convenient reference to #$not.

numericallyEqual

public static CycConstant numericallyEqual
Convenient reference to #$numericallyEqual.

plusFn

public static CycConstant plusFn
Convenient reference to #$PlusFn.

different

public static CycConstant different
Convenient reference to #$different.

thing

public static CycConstant thing
Convenient reference to #$Thing.

inferencePSC

public static CycConstant inferencePSC
Convenient reference to #$InferencePSC.

universalVocabularyMt

public static CycConstant universalVocabularyMt
Convenient reference to #$UniversalVocabularyMt.

bookkeepingMt

public static CycConstant bookkeepingMt
Convenient reference to #$bookkeepingMt.

askCache

protected org.apache.oro.util.Cache askCache
Least Recently Used Cache of ask results.

countAllInstancesCache

protected org.apache.oro.util.Cache countAllInstancesCache
Least Recently Used Cache of countAllInstances results.

isCollectionCache

protected org.apache.oro.util.Cache isCollectionCache
Least Recently Used Cache of isCollection results.

isGenlOfCache

protected org.apache.oro.util.Cache isGenlOfCache
Least Recently Used Cache of isGenlOf results.

cycConnection

protected CycConnectionInterface cycConnection
Reference to CycConnection object which manages the api connection to the OpenCyc server.
Constructor Detail

CycAccess

public CycAccess()
          throws java.io.IOException,
                 java.net.UnknownHostException,
                 CycApiException
Constructs a new CycAccess object.
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

CycAccess

public CycAccess(java.lang.String myAgentName,
                 java.lang.String cycProxyAgentName,
                 int agentCommunity)
          throws java.io.IOException,
                 CycApiException
Constructs a new CycAccess object to the given CycProxyAgent in the given agent community.
Parameters:
myAgentName - the name of the local agent
cycProxyAgentName - the name of the cyc proxy agent
agentCommunity - the agent community to which the cyc proxy agent belongs
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

CycAccess

public CycAccess(java.lang.String hostName)
          throws java.io.IOException,
                 java.net.UnknownHostException,
                 CycApiException
Constructs a new CycAccess object given a host name.
Parameters:
hostName - the host name
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

CycAccess

public CycAccess(java.lang.String hostName,
                 int basePort,
                 int communicationMode,
                 boolean persistentConnection)
          throws java.io.IOException,
                 java.net.UnknownHostException,
                 CycApiException
Constructs a new CycAccess object given a host name, port, communication mode and persistence indicator.
Parameters:
hostName - the host name
basePort - the base (HTML serving) TCP socket port number
communicationMode - either ASCII_MODE or BINARY_MODE
persistentConnection - when true keep a persistent socket connection with the OpenCyc server
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

CycAccess

public CycAccess(java.lang.String hostName,
                 int basePort,
                 int communicationMode,
                 boolean persistentConnection,
                 int messagingMode)
          throws java.io.IOException,
                 java.net.UnknownHostException,
                 CycApiException
Constructs a new CycAccess object given a host name, port, communication mode, persistence indicator, and messaging mode
Parameters:
hostName - the host name
basePort - the base (HTML serving) TCP socket port number
communicationMode - either ASCII_MODE or BINARY_MODE
persistentConnection - when true keep a persistent socket connection with the OpenCyc server
messagingMode - either SERIAL_MESSAGING_MODE or CONCURRENT_MESSAGING_MODE
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error
Method Detail

commonInitialization

protected void commonInitialization()
                             throws java.io.IOException,
                                    CycApiException
Provides common local and remote CycAccess object initialization.
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

toString

public java.lang.String toString()
Returns a string representation of this object.
Overrides:
toString in class java.lang.Object
Returns:
a string representation of this object

current

public static CycAccess current()
Returns the CycAccess object for this thread.
Returns:
the CycAccess object for this thread

setSharedCycAccessInstance

public static void setSharedCycAccessInstance(CycAccess sharedCycAccessInstance)
Sets the shared CycAccess instance.
Parameters:
the - shared CycAccess instance

traceOn

public void traceOn()
Turns on the diagnostic trace of socket messages.

traceOnDetailed

public void traceOnDetailed()
Turns on the detailed diagnostic trace of socket messages.

traceOff

public void traceOff()
Turns off the diagnostic trace of socket messages.

traceNamesOn

public void traceNamesOn()
Turns on the diagnostic trace of messages with constant names looked up via recursive api request.

traceNamesOff

public void traceNamesOff()
Turns on the diagnostic trace of messages with constant names looked up via recursive api request.

getCycConnection

public CycConnectionInterface getCycConnection()
Returns the CycConnection object.
Returns:
the CycConnection object

close

public void close()
Closes the CycConnection object.

getCommunicationMode

public int getCommunicationMode()
Returns the communication mode.
Returns:
the communication mode

converse

protected java.lang.Object[] converse(java.lang.Object command)
                               throws java.io.IOException,
                                      java.net.UnknownHostException,
                                      CycApiException
Converses with Cyc to perform an API command. Creates a new connection for this command if the connection is not persistent.
Parameters:
command - the command string or CycList
Returns:
the result as an object array of two objects
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

converseObject

public java.lang.Object converseObject(java.lang.Object command)
                                throws java.io.IOException,
                                       java.net.UnknownHostException,
                                       CycApiException
Converses with Cyc to perform an API command whose result is returned as an object.
Parameters:
command - the command string or CycList
Returns:
the result of processing the API command
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

converseList

public CycList converseList(java.lang.Object command)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Converses with Cyc to perform an API command whose result is returned as a list. The symbol nil is returned as the empty list.
Parameters:
command - the command string or CycList
Returns:
the result of processing the API command
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

converseString

public java.lang.String converseString(java.lang.Object command)
                                throws java.io.IOException,
                                       java.net.UnknownHostException,
                                       CycApiException
Converses with Cyc to perform an API command whose result is returned as a String.
Parameters:
command - the command string or CycList
Returns:
the result of processing the API command
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

converseBoolean

public boolean converseBoolean(java.lang.Object command)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Converses with Cyc to perform an API command whose result is returned as a boolean.
Parameters:
command - the command string or CycList
Returns:
the result of processing the API command
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

converseInt

public int converseInt(java.lang.Object command)
                throws java.io.IOException,
                       java.net.UnknownHostException,
                       CycApiException
Converses with Cyc to perform an API command whose result is returned as an int.
Parameters:
command - the command string or CycList
Returns:
the result of processing the API command
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

converseVoid

public void converseVoid(java.lang.Object command)
                  throws java.io.IOException,
                         java.net.UnknownHostException,
                         CycApiException
Converses with Cyc to perform an API command whose result is void.
Parameters:
command - the command string or CycList
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

setReadableNarts

public void setReadableNarts()
                      throws java.io.IOException,
                             java.net.UnknownHostException,
                             CycApiException
Sets the *print-readable-narts* feature on.
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getKnownConstantByName

public CycConstant getKnownConstantByName(java.lang.String constantName)
                                   throws java.io.IOException,
                                          java.net.UnknownHostException,
                                          CycApiException
Gets a known CycConstant by using its constant name.
Parameters:
constantName - the name of the constant to be instantiated
Returns:
the complete CycConstant if found, otherwise throw an exception

getConstantByName

public CycConstant getConstantByName(java.lang.String constantName)
                              throws java.io.IOException,
                                     java.net.UnknownHostException,
                                     CycApiException
Gets a CycConstant by using its constant name.
Parameters:
constantName - the name of the constant to be instantiated
Returns:
the complete CycConstant if found, otherwise return null
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getConstantId

public java.lang.Integer getConstantId(CycConstant cycConstant)
                                throws java.io.IOException,
                                       java.net.UnknownHostException,
                                       CycApiException
Gets the ID for the given CycConstant.
Parameters:
cycConstant - the CycConstant object for which the id is sought
Returns:
the ID for the given CycConstant, or null if the constant does not exist.
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getConstantId

public java.lang.Integer getConstantId(java.lang.String constantName)
                                throws java.io.IOException,
                                       java.net.UnknownHostException,
                                       CycApiException
Gets the ID for the given constant name.
Parameters:
constantName - the name of the constant object for which the id is sought
Returns:
the ID for the given constant name, or null if the constant does not exist.
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getConstantGuid

public Guid getConstantGuid(CycConstant cycConstant)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Gets the Guid for the given CycConstant, raising an exception if the constant does not exist.
Parameters:
cycConstant - the CycConstant object for which the id is sought
Returns:
the Guid for the given CycConstant
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getConstantGuid

public Guid getConstantGuid(java.lang.String constantName)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Gets the Guid for the given constant name, raising an exception if the constant does not exist.
Parameters:
constantName - the name of the constant object for which the Guid is sought
Returns:
the Guid for the given CycConstant
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getConstantGuid

public Guid getConstantGuid(java.lang.Integer id)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Gets the Guid for the given constant id.
Parameters:
id - the id of the CycConstant whose guid is sought
Returns:
the Guid for the given CycConstant
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getConstantById

public CycConstant getConstantById(java.lang.Integer id)
                            throws java.io.IOException,
                                   java.net.UnknownHostException,
                                   CycApiException
Gets a CycConstant by using its ID.
Parameters:
id - the id of the CycConstant sought
Returns:
the CycConstant if found or null if not found
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getConstantName

public java.lang.String getConstantName(java.lang.Integer id)
                                 throws java.io.IOException,
                                        java.net.UnknownHostException,
                                        CycApiException
Gets the name for the given constant id.
Parameters:
id - the id of the constant object for which the name is sought
Returns:
the name for the given CycConstant
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getVariableName

public java.lang.String getVariableName(java.lang.Integer id)
                                 throws java.io.IOException,
                                        java.net.UnknownHostException,
                                        CycApiException
Gets the name for the given variable id.
Parameters:
id - the id of the variable object for which the name is sought
Returns:
the name for the given CycVariable
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getKnownConstantByGuid

public CycConstant getKnownConstantByGuid(java.lang.String guidString)
                                   throws java.io.IOException,
                                          java.net.UnknownHostException,
                                          CycApiException
Gets a known CycConstant by using its GUID string.
Parameters:
guid - the globally unique ID string of the constant to be instantiated
Returns:
the complete CycConstant if found, otherwise throw an exception
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getKnownConstantByGuid

public CycConstant getKnownConstantByGuid(Guid guid)
                                   throws java.io.IOException,
                                          java.net.UnknownHostException,
                                          CycApiException
Gets a known CycConstant by using its GUID.
Parameters:
guid - the globally unique ID of the constant to be instantiated
Returns:
the complete CycConstant if found, otherwise throw an exception
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getConstantByGuid

public CycConstant getConstantByGuid(Guid guid)
                              throws java.io.IOException,
                                     java.net.UnknownHostException,
                                     CycApiException
Gets a CycConstant by using its GUID.
Parameters:
guid - the GUID from which to find the constant
Returns:
the complete CycConstant if found, otherwise return null
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

completeObject

public java.lang.Object completeObject(java.lang.Object object)
                                throws java.io.IOException,
                                       java.net.UnknownHostException,
                                       CycApiException
Completes the instantiation of objects contained in the given CycList. The binary api sends only constant ids, and the constant names and guids must be retrieved if the constant is not cached.
Parameters:
object - the CycConstant to be completed, or the Object whose embedded constants are to be completed
Returns:
the completed object, or a reference to a cached instance
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

completeCycConstant

public CycConstant completeCycConstant(CycConstant cycConstant)
                                throws java.io.IOException,
                                       java.net.UnknownHostException,
                                       CycApiException
Completes the instantiation of CycConstant returned by the binary api. The binary api sends only constant ids, and the constant names and guids must be retrieved if the constant is not cached.
Parameters:
cycConstant - the CycConstant whose name and guid are to be completed
Returns:
the completed CycConstant object, or a reference to the previously cached instance
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

completeCycVariable

public CycVariable completeCycVariable(CycVariable cycVariable)
                                throws java.io.IOException,
                                       java.net.UnknownHostException,
                                       CycApiException
Completes the instantiation of HL CycVariable returned by the binary api. The binary api sends only HL variable ids, and the variable name must be retrieved if the variable is not cached. The variable id is not used when sending variables to the binary api, instead the variable is output as a symbol. In the case where an EL variable is returned by the binary api, then then variable name is already present.
Parameters:
cycVariable - the CycVariable whose name is to be completed
Returns:
the completed CycVariable object, or a reference to the previously cached instance
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

completeCycList

public CycList completeCycList(CycList cycList)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Completes the instantiation of objects contained in the given CycList. The binary api sends only constant ids, and the constant names and guids must be retrieved if the constant is not cached.
Parameters:
cycList - the CycList whose constants are to be completed
the - completed CycList object
Returns:
the given list with completed objects
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

completeCycNart

public CycNart completeCycNart(CycNart cycNart)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Completes the instantiation of a CycNart returned by the binary api. The binary api sends only constant ids, and the constant names and guids must be retrieved if the constant is not cached. Also finds the id of the CycNart if the functor and arguments are instantiated.
Parameters:
cycNart - the CycNart whose constants are to be completed
the - completed CycNart object
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

completeCycAssertion

public CycAssertion completeCycAssertion(CycAssertion cycAssertion)
                                  throws java.io.IOException,
                                         java.net.UnknownHostException,
                                         CycApiException
Completes the instantiation of a CycAssertion returned by the binary api. The binary api sends only constant ids, and the constant names and guids must be retrieved if the constant is not cached.
Parameters:
cycAssertion - the CycAssertion whose constants are to be completed
the - completed CycAssertion object
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

findNartId

public java.lang.Integer findNartId(CycNart cycNart)
                             throws java.io.IOException,
                                    java.net.UnknownHostException,
                                    CycApiException
Finds the id of a CycNart given its formula.
Parameters:
cycNart - the CycNart object with functor and arguments instantiated
Returns:
the id of the nart if found in the KB, otherwise null
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getCycNartById

public CycNart getCycNartById(java.lang.Integer id)
                       throws java.io.IOException,
                              java.net.UnknownHostException,
                              CycApiException
Gets a CycNart by using its id.
Parameters:
id - the nart id (local to the KB)
Returns:
the CycNart
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAssertionById

public CycAssertion getAssertionById(java.lang.Integer id)
                              throws java.io.IOException,
                                     java.net.UnknownHostException,
                                     CycApiException
Gets a CycAssertion by using its id.
Parameters:
id - the assertion id (which is local to the given KB).
Returns:
the assertion
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getCycNartFromCons

public CycNart getCycNartFromCons(CycList elCons)
Gets the CycNart object from a Cons object that lists the names of its functor and its arguments.
Parameters:
elCons - the given list which names the functor and arguments
Returns:
a CycNart object from a Cons object that lists the names of its functor and its arguments

predicateRelates

public boolean predicateRelates(CycConstant binaryPredicate,
                                CycFort arg1,
                                CycFort arg2)
                         throws java.io.IOException,
                                java.net.UnknownHostException,
                                CycApiException
Returns true if CycConstant BINARYPREDICATE relates CycFort ARG1 and CycFort ARG2.
Parameters:
binaryPredicate - the predicate
arg1 - the first argument related by the predicate
arg2 - the second argument related by the predicate
Returns:
true if CycConstant BINARYPREDICATE relates CycFort ARG1 and CycFort ARG2 otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

predicateRelates

public boolean predicateRelates(CycConstant binaryPredicate,
                                CycFort arg1,
                                CycFort arg2,
                                CycFort mt)
                         throws java.io.IOException,
                                java.net.UnknownHostException,
                                CycApiException
Returns true if CycConstant BINARYPREDICATE relates CycFort ARG1 and CycFort ARG2.
Parameters:
binaryPredicate - the predicate
arg1 - the first argument related by the predicate
arg2 - the second argument related by the predicate
mt - the relevant mt
Returns:
true if CycConstant BINARYPREDICATE relates CycFort ARG1 and CycFort ARG2 otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getImprecisePluralGeneratedPhrase

public java.lang.String getImprecisePluralGeneratedPhrase(CycFort cycFort)
                                                   throws java.io.IOException,
                                                          java.net.UnknownHostException,
                                                          CycApiException
Gets the imprecise plural generated phrase for a CycFort (intended for collections).
Parameters:
cycFort - the term for paraphrasing
Returns:
the imprecise plural generated phrase for a CycFort
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getPluralGeneratedPhrase

public java.lang.String getPluralGeneratedPhrase(CycFort cycFort)
                                          throws java.io.IOException,
                                                 java.net.UnknownHostException,
                                                 CycApiException
Gets the plural generated phrase for a CycFort (intended for collections).
Parameters:
cycFort - the term for paraphrasing
Returns:
the plural generated phrase for a CycFort
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getImpreciseSingularGeneratedPhrase

public java.lang.String getImpreciseSingularGeneratedPhrase(CycFort cycFort)
                                                     throws java.io.IOException,
                                                            java.net.UnknownHostException,
                                                            CycApiException
Gets the imprecise singular generated phrase for a CycFort (intended for individuals).
Parameters:
cycFort - the term for paraphrasing
Returns:
the singular generated phrase for a CycFort
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getSingularGeneratedPhrase

public java.lang.String getSingularGeneratedPhrase(CycFort cycFort)
                                            throws java.io.IOException,
                                                   java.net.UnknownHostException,
                                                   CycApiException
Gets the singular generated phrase for a CycFort (intended for individuals).
Parameters:
cycFort - the term for paraphrasing
Returns:
the singular generated phrase for a CycFort
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getGeneratedPhrase

public java.lang.String getGeneratedPhrase(CycFort cycFort)
                                    throws java.io.IOException,
                                           java.net.UnknownHostException,
                                           CycApiException
Gets the default generated phrase for a CycFort (intended for predicates).
Parameters:
cycFort - the predicate term for paraphrasing
Returns:
the default generated phrase for a CycFort
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getParaphrase

public java.lang.String getParaphrase(CycList assertion)
                               throws java.io.IOException,
                                      java.net.UnknownHostException,
                                      CycApiException
Gets the paraphrase for a Cyc assertion.
Parameters:
assertion - the assertion formula
Returns:
the paraphrase for a Cyc assertion
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getImpreciseParaphrase

public java.lang.String getImpreciseParaphrase(java.lang.String assertionString)
                                        throws java.io.IOException,
                                               java.net.UnknownHostException,
                                               CycApiException
Gets the imprecise paraphrase for a Cyc assertion.
Parameters:
assertionString - the assertion formula
Returns:
the imprecise paraphrase for a Cyc assertion
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getImpreciseParaphrase

public java.lang.String getImpreciseParaphrase(CycList assertion)
                                        throws java.io.IOException,
                                               java.net.UnknownHostException,
                                               CycApiException
Gets the imprecise paraphrase for a Cyc assertion.
Parameters:
assertion - the assertion formula
Returns:
the imprecise paraphrase for a Cyc assertion
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getComment

public java.lang.String getComment(CycFort cycFort)
                            throws java.io.IOException,
                                   java.net.UnknownHostException,
                                   CycApiException
Gets the comment for a CycFort. Embedded quotes are replaced by spaces.
Parameters:
cycFort - the term for which the comment is sought
Returns:
the comment for the given CycFort
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getComment

public java.lang.String getComment(CycFort cycFort,
                                   CycFort mt)
                            throws java.io.IOException,
                                   java.net.UnknownHostException,
                                   CycApiException
Gets the comment for a CycFort in the relevant mt. Embedded quotes are replaced by spaces.
Parameters:
cycFort - the term for which the comment is sought
mt - the relevant mt from which the comment is visible
Returns:
the comment for the given CycFort
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getIsas

public CycList getIsas(CycFort cycFort)
                throws java.io.IOException,
                       java.net.UnknownHostException,
                       CycApiException
Gets the list of the isas for the given CycFort.
Parameters:
cycFort - the term for which its isas are sought
Returns:
the list of the isas for the given CycFort
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getIsas

public CycList getIsas(CycFort cycFort,
                       CycFort mt)
                throws java.io.IOException,
                       java.net.UnknownHostException,
                       CycApiException
Gets the list of the isas for the given CycFort.
Parameters:
cycFort - the term for which its isas are sought
mt - the relevant mt
Returns:
the list of the isas for the given CycFort
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getGenls

public CycList getGenls(CycFort cycFort)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Gets the list of the directly asserted true genls for the given CycFort collection.
Parameters:
cycFort - the given term
Returns:
the list of the directly asserted true genls for the given CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getGenls

public CycList getGenls(CycFort cycFort,
                        CycFort mt)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Gets the list of the directly asserted true genls for the given CycFort collection.
Parameters:
cycFort - the given term
mt - the relevant mt
Returns:
the list of the directly asserted true genls for the given CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getMinGenls

public CycList getMinGenls(CycFort cycFort)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets a list of the minimum (most specific) genls for a CycFort collection.
Parameters:
cycFort - the given collection term
Returns:
a list of the minimum (most specific) genls for a CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getMinGenls

public CycList getMinGenls(CycFort cycFort,
                           CycFort mt)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets a list of the minimum (most specific) genls for a CycFort collection.
Parameters:
cycFort - the collection
mt - the microtheory in which to look
Returns:
a list of the minimum (most specific) genls for a CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getSpecs

public CycList getSpecs(CycFort cycFort)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Gets the list of the directly asserted true specs for the given CycFort collection.
Parameters:
cycFort - the given collection
Returns:
the list of the directly asserted true specs for the given CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getSpecs

public CycList getSpecs(CycFort cycFort,
                        CycFort mt)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Gets the list of the directly asserted true specs for the given CycFort collection.
Parameters:
cycFort - the given collection
mt - the microtheory in which to look
Returns:
the list of the directly asserted true specs for the given CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getMaxSpecs

public CycList getMaxSpecs(CycFort cycFort)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets the list of the least specific specs for the given CycFort collection.
Parameters:
cycFort - the given collection
Returns:
the list of the least specific specs for the given CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getMaxSpecs

public CycList getMaxSpecs(CycFort cycFort,
                           CycFort mt)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets the list of the least specific specs for the given CycFort collection.
Parameters:
cycFort - the given collection
mt - the microtheory in which to look
Returns:
the list of the least specific specs for the given CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getGenlSiblings

public CycList getGenlSiblings(CycFort cycFort)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Gets the list of the direct genls of the direct specs for the given CycFort collection.
Parameters:
cycFort - the given collection
Returns:
the list of the direct genls of the direct specs for the given CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getGenlSiblings

public CycList getGenlSiblings(CycFort cycFort,
                               CycFort mt)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Gets the list of the direct genls of the direct specs for the given CycFort collection.
Parameters:
cycFort - the given collection
mt - the microtheory in which to look
Returns:
the list of the direct genls of the direct specs for the given CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getSiblings

public CycList getSiblings(CycFort cycFort)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets the list of the siblings (direct specs of the direct genls) for the given CycFort collection.
Parameters:
cycFort - the given collection
Returns:
the list of the siblings (direct specs of the direct genls) for the given CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getSiblings

public CycList getSiblings(CycFort cycFort,
                           CycFort mt)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets the list of the siblings (direct specs of the direct genls) for the given CycFort collection.
Parameters:
cycFort - the given collection
mt - the microtheory in which to look
Returns:
the list of the siblings (direct specs of the direct genls) for the given CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getSpecSiblings

public CycList getSpecSiblings(CycFort cycFort)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Gets the list of the siblings (direct specs of the direct genls) for the given CycFort collection.
Parameters:
cycFort - the given collection
Returns:
the list of the siblings (direct specs of the direct genls) for the given CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getSpecSiblings

public CycList getSpecSiblings(CycFort cycFort,
                               CycFort mt)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Gets the list of the siblings (direct specs of the direct genls) for the given CycFort collection.
Parameters:
cycFort - the given collection
mt - the microtheory in which to look
Returns:
the list of the siblings (direct specs of the direct genls) for the given CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllGenls

public CycList getAllGenls(CycFort cycFort)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets the list of all of the direct and indirect genls for the given CycFort collection.
Parameters:
cycFort - the collection
Returns:
the list of all of the direct and indirect genls for a CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllGenls

public CycList getAllGenls(CycFort cycFort,
                           CycFort mt)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets the list of all of the direct and indirect genls for a CycFort collection given a relevant microtheory.
Parameters:
cycFort - the collection
mt - the relevant mt
Returns:
the list of all of the direct and indirect genls for a CycFort collection given a relevant microtheory
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllSpecs

public CycList getAllSpecs(CycFort cycFort)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets a list of all of the direct and indirect specs for a CycFort collection.
Parameters:
cycFort - the collection
Returns:
the list of all of the direct and indirect specs for the given collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllSpecs

public CycList getAllSpecs(CycFort cycFort,
                           CycFort mt)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets the list of all of the direct and indirect specs for the given collection in the given microtheory.
Parameters:
cycFort - the collection
Returns:
the list of all of the direct and indirect specs for the given collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllSpecsHashSet

public java.util.HashSet getAllSpecsHashSet(CycFort cycFort)
                                     throws java.io.IOException,
                                            java.net.UnknownHostException,
                                            CycApiException
Gets a hashset of all of the direct and indirect specs for a CycFort collection.
Parameters:
cycFort - the collection
Returns:
the hashset of all of the direct and indirect specs for the given collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllSpecsHashSet

public java.util.HashSet getAllSpecsHashSet(CycFort cycFort,
                                            CycFort mt)
                                     throws java.io.IOException,
                                            java.net.UnknownHostException,
                                            CycApiException
Gets the hashset of all of the direct and indirect specs for the given collection in the given microtheory.
Parameters:
cycFort - the collection
Returns:
the hashset of all of the direct and indirect specs for the given collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllGenlsWrt

public CycList getAllGenlsWrt(CycFort spec,
                              CycFort genl)
                       throws java.io.IOException,
                              java.net.UnknownHostException,
                              CycApiException
Gets the list of all of the direct and indirect genls for a CycFort SPEC which are also specs of CycFort GENL.
Parameters:
spec - the given collection
genl - the more general collection
Returns:
the list of all of the direct and indirect genls for a CycFort SPEC which are also specs of CycFort GENL
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllGenlsWrt

public CycList getAllGenlsWrt(CycFort spec,
                              CycFort genl,
                              CycFort mt)
                       throws java.io.IOException,
                              java.net.UnknownHostException,
                              CycApiException
Gets the list of all of the direct and indirect genls for a CycFort SPEC which are also specs of CycFort GENL.
Parameters:
spec - the given collection
genl - the more general collection
mt - the relevant mt
Returns:
the list of all of the direct and indirect genls for a CycFort SPEC which are also specs of CycFort GENL
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllDependentSpecs

public CycList getAllDependentSpecs(CycFort cycFort)
                             throws java.io.IOException,
                                    java.net.UnknownHostException,
                                    CycApiException
Gets the list of all of the dependent specs for a CycFort collection. Dependent specs are those direct and indirect specs of the collection such that every path connecting the spec to a genl of the collection passes through the collection. In a typical taxomonmy it is expected that all-dependent-specs gives the same result as all-specs.
Parameters:
cycFort - the given collection
Returns:
the list of all of the dependent specs for the given CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllDependentSpecs

public CycList getAllDependentSpecs(CycFort cycFort,
                                    CycFort mt)
                             throws java.io.IOException,
                                    java.net.UnknownHostException,
                                    CycApiException
Gets the list of all of the dependent specs for a CycFort collection. Dependent specs are those direct and indirect specs of the collection such that every path connecting the spec to a genl of the collection passes through the collection. In a typical taxomonmy it is expected that all-dependent-specs gives the same result as all-specs.
Parameters:
cycFort - the given collection
mt - the relevant mt
Returns:
the list of all of the dependent specs for the given CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getSampleLeafSpecs

public CycList getSampleLeafSpecs(CycFort cycFort,
                                  int numberOfSamples)
                           throws java.io.IOException,
                                  java.net.UnknownHostException,
                                  CycApiException
Gets the list with the specified number of sample specs of the given CycFort collection. Attempts to return leaves that are maximally differet with regard to their all-genls.
Parameters:
cycFort - the given collection
numberOfSamples - the maximum number of sample specs returned
Returns:
the list with the specified number of sample specs of the given CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getSampleLeafSpecs

public CycList getSampleLeafSpecs(CycFort cycFort,
                                  int numberOfSamples,
                                  CycFort mt)
                           throws java.io.IOException,
                                  java.net.UnknownHostException,
                                  CycApiException
Gets the list with the specified number of sample specs of the given CycFort collection. Attempts to return leaves that are maximally differet with regard to their all-genls.
Parameters:
cycFort - the given collection
numberOfSamples - the maximum number of sample specs returned
mt - the relevant mt
Returns:
the list with the specified number of sample specs of the given CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getMinCol

public CycFort getMinCol(CycList collections)
                  throws java.io.IOException,
                         java.net.UnknownHostException,
                         CycApiException
Returns the single most specific collection from the given list of collectons.
Parameters:
collections - the given collections
Returns:
the single most specific collection from the given list of collectons
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isSpecOf

public boolean isSpecOf(CycFort spec,
                        CycFort genl)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Returns true if CycFort SPEC is a spec of CycFort GENL.
Parameters:
spec - the considered spec collection
genl - the considered genl collection
Returns:
true if CycFort SPEC is a spec of CycFort GENL, otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isSpecOf

public boolean isSpecOf(CycFort spec,
                        CycFort genl,
                        CycFort mt)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Returns true if CycFort SPEC is a spec of CycFort GENL.
Parameters:
spec - the considered spec collection
genl - the considered genl collection
mt - the relevant mt
Returns:
true if CycFort SPEC is a spec of CycFort GENL, otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isGenlOf

public boolean isGenlOf(CycFort genl,
                        CycFort spec)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Returns true if CycFort GENL is a genl of CycFort SPEC.
Parameters:
genl - the collection for genl determination
spec - the collection for spec determination
Returns:
true if CycFort GENL is a genl of CycFort SPEC
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isGenlOf_Cached

public boolean isGenlOf_Cached(CycFort genl,
                               CycFort spec)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Returns true if CycFort GENL is a genl of CycFort SPEC, implements a cache to avoid asking the same question twice from the KB.
Parameters:
genl - the collection for genl determination
spec - the collection for spec determination
Returns:
true if CycFort GENL is a genl of CycFort SPEC
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isGenlOf

public boolean isGenlOf(CycFort genl,
                        CycFort spec,
                        CycFort mt)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Returns true if CycFort GENL is a genl of CycFort SPEC in MT.
Parameters:
genl - the collection for genl determination
spec - the collection for spec determination
mt - the microtheory for spec determination
Returns:
true if CycFort GENL is a genl of CycFort SPEC in MT
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isGenlPredOf

public boolean isGenlPredOf(CycFort genlPred,
                            CycFort specPred,
                            CycFort mt)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Returns true if CycFort GENLPRED is a genl-pred of CycFort SPECPRED in MT.
Parameters:
genlPred - the predicate for genl-pred determination
specPred - the predicate for spec-pred determination
mt - the microtheory for subsumption determination
Returns:
true if CycFort GENLPRED is a genl-pred of CycFort SPECPRED in MT
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isGenlPredOf

public boolean isGenlPredOf(CycFort genlPred,
                            CycFort specPred)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Returns true if CycFort GENLPRED is a genl-pred of CycFort SPECPRED in any MT.
Parameters:
genlPred - the predicate for genl-pred determination
specPred - the predicate for spec-pred determination
Returns:
true if CycFort GENLPRED is a genl-pred of CycFort SPECPRED in any MT
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isGenlInverseOf

public boolean isGenlInverseOf(CycFort genlPred,
                               CycFort specPred,
                               CycFort mt)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Returns true if CycFort GENLPRED is a genl-inverse of CycFort SPECPRED in MT.
Parameters:
genlPred - the predicate for genl-inverse determination
specPred - the predicate for spec-inverse determination
mt - the microtheory for inverse subsumption determination
Returns:
true if CycFort GENLPRED is a genl-inverse of CycFort SPECPRED in MT
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isGenlInverseOf

public boolean isGenlInverseOf(CycFort genlPred,
                               CycFort specPred)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Returns true if CycFort GENLPRED is a genl-inverse of CycFort SPECPRED in any MT.
Parameters:
genlPred - the predicate for genl-inverse determination
specPred - the predicate for spec-inverse determination
Returns:
true if CycFort GENLPRED is a genl-inverse of CycFort SPECPRED in any MT
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isGenlMtOf

public boolean isGenlMtOf(CycFort genlMt,
                          CycFort specMt)
                   throws java.io.IOException,
                          java.net.UnknownHostException,
                          CycApiException
Returns true if CycFort GENLMT is a genl-mt of CycFort SPECPRED in *mt-mt* (currently #$UniversalVocabularyMt).
Parameters:
genlMt - the microtheory for genl-mt determination
specMt - the microtheory for spec-mt determination
Returns:
true if CycFort GENLMT is a genl-mt of CycFort SPECPRED in *mt-mt* (currently #$UniversalVocabularyMt)
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

areTacitCoextensional

public boolean areTacitCoextensional(CycFort collection1,
                                     CycFort collection2)
                              throws java.io.IOException,
                                     java.net.UnknownHostException,
                                     CycApiException
Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are tacitly coextensional via mutual genls of each other.
Parameters:
collection1 - the first given collection
collection2 - the second given collection
Returns:
true if CycFort COLLECION1 and CycFort COLLECTION2 are tacitly coextensional via mutual genls of each other, otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

areTacitCoextensional

public boolean areTacitCoextensional(CycFort collection1,
                                     CycFort collection2,
                                     CycFort mt)
                              throws java.io.IOException,
                                     java.net.UnknownHostException,
                                     CycApiException
Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are tacitly coextensional via mutual genls of each other.
Parameters:
collection1 - the first given collection
collection2 - the second given collection
mt - the relevant mt
Returns:
true if CycFort COLLECION1 and CycFort COLLECTION2 are tacitly coextensional via mutual genls of each other, otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

areAssertedCoextensional

public boolean areAssertedCoextensional(CycFort collection1,
                                        CycFort collection2)
                                 throws java.io.IOException,
                                        java.net.UnknownHostException,
                                        CycApiException
Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are asserted coextensional.
Parameters:
collection1 - the first collection
collection2 - the second collection
Returns:
true if CycFort COLLECION1 and CycFort COLLECTION2 are asserted coextensional otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

areAssertedCoextensional

public boolean areAssertedCoextensional(CycFort collection1,
                                        CycFort collection2,
                                        CycFort mt)
                                 throws java.io.IOException,
                                        java.net.UnknownHostException,
                                        CycApiException
Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are asserted coextensional.
Parameters:
collection1 - the first collection
collection2 - the second collection
mt - the relevant mt
Returns:
true if CycFort COLLECION1 and CycFort COLLECTION2 are asserted coextensional otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

areIntersecting

public boolean areIntersecting(CycFort collection1,
                               CycFort collection2)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Returns true if CycFort COLLECION1 and CycFort COLLECTION2 intersect with regard to all-specs.
Parameters:
collection1 - the first collection
collection2 - the second collection
Returns:
true if CycFort COLLECION1 and CycFort COLLECTION2 intersect with regard to all-specs otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

areIntersecting

public boolean areIntersecting(CycFort collection1,
                               CycFort collection2,
                               CycFort mt)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Returns true if CycFort COLLECION1 and CycFort COLLECTION2 intersect with regard to all-specs.
Parameters:
collection1 - the first collection
collection2 - the second collection
mt - the relevant mt
Returns:
true if CycFort COLLECION1 and CycFort COLLECTION2 intersect with regard to all-specs otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

areHierarchical

public boolean areHierarchical(CycFort collection1,
                               CycFort collection2)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are in a hierarchy.
Parameters:
collection1 - the first collection
collection2 - the second collection
Returns:
true if CycFort COLLECION1 and CycFort COLLECTION2 are in a hierarchy, otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

areHierarchical

public boolean areHierarchical(CycFort collection1,
                               CycFort collection2,
                               CycFort mt)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are in a hierarchy.
Parameters:
collection1 - the first collection
collection2 - the second collection
mt - the relevant mt
Returns:
true if CycFort COLLECION1 and CycFort COLLECTION2 are in a hierarchy, otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getWhyGenl

public CycList getWhyGenl(CycFort spec,
                          CycFort genl)
                   throws java.io.IOException,
                          java.net.UnknownHostException,
                          CycApiException
Gets the list of the justifications of why CycFort SPEC is a SPEC of CycFort GENL. getWhyGenl("Dog", "Animal") --> "(((#$genls #$Dog #$CanineAnimal) :TRUE) (#$genls #$CanineAnimal #$NonPersonAnimal) :TRUE) (#$genls #$NonPersonAnimal #$Animal) :TRUE))
Parameters:
spec - the specialized collection
genl - the more general collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getWhyGenl

public CycList getWhyGenl(CycFort spec,
                          CycFort genl,
                          CycFort mt)
                   throws java.io.IOException,
                          java.net.UnknownHostException,
                          CycApiException
Gets the list of the justifications of why CycFort SPEC is a SPEC of CycFort GENL. getWhyGenl("Dog", "Animal") --> "(((#$genls #$Dog #$CanineAnimal) :TRUE) (#$genls #$CanineAnimal #$NonPersonAnimal) :TRUE) (#$genls #$NonPersonAnimal #$Animal) :TRUE))
Parameters:
spec - the specialized collection
genl - the more general collection
mt - the relevant mt
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getWhyGenlParaphrase

public java.util.ArrayList getWhyGenlParaphrase(CycFort spec,
                                                CycFort genl)
                                         throws java.io.IOException,
                                                java.net.UnknownHostException,
                                                CycApiException
Gets the English parapharse of the justifications of why CycFort SPEC is a SPEC of CycFort GENL. getWhyGenlParaphrase("Dog", "Animal") --> "a dog is a kind of canine" "a canine is a kind of non-human animal" "a non-human animal is a kind of animal"
Parameters:
spec - the specialized collection
genl - the more general collection
Returns:
the English parapharse of the justifications of why CycFort SPEC is a SPEC of CycFort GENL
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getWhyGenlParaphrase

public java.util.ArrayList getWhyGenlParaphrase(CycFort spec,
                                                CycFort genl,
                                                CycFort mt)
                                         throws java.io.IOException,
                                                java.net.UnknownHostException,
                                                CycApiException
Gets the English parapharse of the justifications of why CycFort SPEC is a SPEC of CycFort GENL. getWhyGenlParaphrase("Dog", "Animal") --> "a dog is a kind of canine" "a canine is a kind of non-human animal" "a non-human animal is a kind of animal"
Parameters:
spec - the specialized collection
genl - the more general collection
mt - the relevant mt
Returns:
the English parapharse of the justifications of why CycFort SPEC is a SPEC of CycFort GENL
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getWhyCollectionsIntersect

public CycList getWhyCollectionsIntersect(CycFort collection1,
                                          CycFort collection2)
                                   throws java.io.IOException,
                                          java.net.UnknownHostException,
                                          CycApiException
Gets the list of the justifications of why CycFort COLLECTION1 and a CycFort COLLECTION2 intersect. see getWhyGenl
Parameters:
collection1 - the first collection
collection2 - the second collection
Returns:
the list of the justifications of why CycFort COLLECTION1 and a CycFort COLLECTION2 intersect
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getWhyCollectionsIntersect

public CycList getWhyCollectionsIntersect(CycFort collection1,
                                          CycFort collection2,
                                          CycFort mt)
                                   throws java.io.IOException,
                                          java.net.UnknownHostException,
                                          CycApiException
Gets the list of the justifications of why CycFort COLLECTION1 and a CycFort COLLECTION2 intersect. see getWhyGenl
Parameters:
collection1 - the first collection
collection2 - the second collection
mt - the relevant mt
Returns:
the list of the justifications of why CycFort COLLECTION1 and a CycFort COLLECTION2 intersect
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getWhyCollectionsIntersectParaphrase

public java.util.ArrayList getWhyCollectionsIntersectParaphrase(CycFort collection1,
                                                                CycFort collection2)
                                                         throws java.io.IOException,
                                                                java.net.UnknownHostException,
                                                                CycApiException
Gets the English parapharse of the justifications of why CycFort COLLECTION1 and a CycFort COLLECTION2 intersect. see getWhyGenlParaphrase
Parameters:
collection1 - the first collection
collection2 - the second collection
Returns:
the English parapharse of the justifications of why CycFort COLLECTION1 and a CycFort COLLECTION2 intersect
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getWhyCollectionsIntersectParaphrase

public java.util.ArrayList getWhyCollectionsIntersectParaphrase(CycFort collection1,
                                                                CycFort collection2,
                                                                CycFort mt)
                                                         throws java.io.IOException,
                                                                java.net.UnknownHostException,
                                                                CycApiException
Gets the English parapharse of the justifications of why CycFort COLLECTION1 and a CycFort COLLECTION2 intersect. see getWhyGenlParaphrase
Parameters:
collection1 - the first collection
collection2 - the second collection
mt - the relevant mt
Returns:
the English parapharse of the justifications of why CycFort COLLECTION1 and a CycFort COLLECTION2 intersect
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getCollectionLeaves

public CycList getCollectionLeaves(CycFort cycFort)
                            throws java.io.IOException,
                                   java.net.UnknownHostException,
                                   CycApiException
Gets the list of the collection leaves (most specific of the all-specs) for a CycFort collection.
Parameters:
cycFort - the given collection
Returns:
the list of the collection leaves (most specific of the all-specs) for a CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getCollectionLeaves

public CycList getCollectionLeaves(CycFort cycFort,
                                   CycFort mt)
                            throws java.io.IOException,
                                   java.net.UnknownHostException,
                                   CycApiException
Gets the list of the collection leaves (most specific of the all-specs) for a CycFort collection.
Parameters:
cycFort - the given collection
mt - the relevant mt
Returns:
the list of the collection leaves (most specific of the all-specs) for a CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getLocalDisjointWith

public CycList getLocalDisjointWith(CycFort cycFort)
                             throws java.io.IOException,
                                    java.net.UnknownHostException,
                                    CycApiException
Gets the list of the collections asserted to be disjoint with a CycFort collection.
Parameters:
cycFort - the given collection
Returns:
the list of the collections asserted to be disjoint with a CycFort collection

getLocalDisjointWith

public CycList getLocalDisjointWith(CycFort cycFort,
                                    CycFort mt)
                             throws java.io.IOException,
                                    java.net.UnknownHostException,
                                    CycApiException
Gets the list of the collections asserted to be disjoint with a CycFort collection.
Parameters:
cycFort - the given collection
mt - the relevant mt
Returns:
the list of the collections asserted to be disjoint with a CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

areDisjoint

public boolean areDisjoint(CycFort collection1,
                           CycFort collection2)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are disjoint.
Parameters:
collection1 - the first collection
collection2 - the second collection
Returns:
true if CycFort COLLECION1 and CycFort COLLECTION2 are disjoint, otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

areDisjoint

public boolean areDisjoint(CycFort collection1,
                           CycFort collection2,
                           CycFort mt)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Returns true if CycFort COLLECION1 and CycFort COLLECTION2 are disjoint.
Parameters:
collection1 - the first collection
collection2 - the second collection
mt - the relevant mt
Returns:
true if CycFort COLLECION1 and CycFort COLLECTION2 are disjoint, otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getMinIsas

public CycList getMinIsas(CycFort cycFort)
                   throws java.io.IOException,
                          java.net.UnknownHostException,
                          CycApiException
Gets the list of the most specific collections (having no subsets) which contain a CycFort term.
Parameters:
cycFort - the given term
Returns:
the list of the most specific collections (having no subsets) which contain a CycFort term
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getMinIsas

public CycList getMinIsas(CycFort cycFort,
                          CycFort mt)
                   throws java.io.IOException,
                          java.net.UnknownHostException,
                          CycApiException
Gets the list of the most specific collections (having no subsets) which contain a CycFort term.
Parameters:
cycFort - the given term
mt - the relevant mt
Returns:
the list of the most specific collections (having no subsets) which contain a CycFort term
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getInstances

public CycList getInstances(CycFort cycFort)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Gets the list of the instances (who are individuals) of a CycFort collection.
Parameters:
cycFort - the given collection
Returns:
the list of the instances (who are individuals) of a CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getInstances

public CycList getInstances(CycFort cycFort,
                            CycFort mt)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Gets the list of the instances (who are individuals) of a CycFort collection.
Parameters:
cycFort - the given collection
mt - the relevant mt
Returns:
the list of the instances (who are individuals) of a CycFort collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getInstanceSiblings

public CycList getInstanceSiblings(CycFort cycFort)
                            throws java.io.IOException,
                                   java.net.UnknownHostException,
                                   CycApiException
Gets the list of the instance siblings of a CycFort, for all collections of which it is an instance.
Parameters:
cycFort - the given term
Returns:
the list of the instance siblings of a CycFort, for all collections of which it is an instance
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getInstanceSiblings

public CycList getInstanceSiblings(CycFort cycFort,
                                   CycFort mt)
                            throws java.io.IOException,
                                   java.net.UnknownHostException,
                                   CycApiException
Gets the list of the instance siblings of a CycFort, for all collections of which it is an instance.
Parameters:
cycFort - the given term
mt - the relevant mt
Returns:
the list of the instance siblings of a CycFort, for all collections of which it is an instance

getAllIsa

public CycList getAllIsa(CycFort cycFort)
                  throws java.io.IOException,
                         java.net.UnknownHostException,
                         CycApiException
Gets the list of the collections of which the CycFort is directly and indirectly an instance.
Parameters:
cycFort - the given term
Returns:
the list of the collections of which the CycFort is directly and indirectly an instance
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllIsa

public CycList getAllIsa(CycFort cycFort,
                         CycFort mt)
                  throws java.io.IOException,
                         java.net.UnknownHostException,
                         CycApiException
Gets the list of the collections of which the CycFort is directly and indirectly an instance.
Parameters:
cycFort - the given term
mt - the relevant mt
Returns:
the list of the collections of which the CycFort is directly and indirectly an instance
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllInstances

public CycList getAllInstances(CycFort cycFort)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Gets a list of all the direct and indirect instances (individuals) for a CycFort collection.
Parameters:
cycFort - the collection for which all the direct and indirect instances (individuals) are sought
Returns:
the list of all the direct and indirect instances (individuals) for the given collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllInstances

public CycList getAllInstances(CycFort cycFort,
                               CycFort mt)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Gets a list of all the direct and indirect instances (individuals) for a CycFort collection in the given microtheory.
Parameters:
cycFort - the collection for which all the direct and indirect instances (individuals) are sought
mt - the relevant mt
Returns:
the list of all the direct and indirect instances (individuals) for the
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error given collection

getAllInstancesHashSet

public java.util.HashSet getAllInstancesHashSet(CycFort cycFort,
                                                CycFort mt)
                                         throws java.io.IOException,
                                                java.net.UnknownHostException,
                                                CycApiException
Gets a hashset of all the direct and indirect instances (individuals) for a CycFort collection in the given microtheory.
Parameters:
cycFort - the collection for which all the direct and indirect instances (individuals) are sought
mt - the microtheory in which the inference is performed
Returns:
the list of all the direct and indirect instances (individuals) for the given collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllInstancesHashSet

public java.util.HashSet getAllInstancesHashSet(CycFort cycFort)
                                         throws java.io.IOException,
                                                java.net.UnknownHostException,
                                                CycApiException
Gets a hashset of all the direct and indirect instances (individuals) for a CycFort collection in the given microtheory.
Parameters:
cycFort - the collection for which all the direct and indirect instances (individuals) are sought
Returns:
the list of all the direct and indirect instances (individuals) for the given collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isa

public boolean isa(CycFort term,
                   java.lang.String collectionName)
            throws java.io.IOException,
                   java.net.UnknownHostException,
                   CycApiException
Returns true if CycFort TERM is a instance of CycFort COLLECTION, defaulting to all microtheories.
Parameters:
term - the term
collectionName - the name of the collection
Returns:
true if CycFort TERM is a instance of the CycFort named by COLLECTION
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isa

public boolean isa(CycFort term,
                   CycFort collection)
            throws java.io.IOException,
                   java.net.UnknownHostException,
                   CycApiException
Returns true if CycFort TERM is a instance of CycFort COLLECTION, defaulting to all microtheories.
Parameters:
term - the term
collection - the collection
Returns:
true if CycFort TERM is a instance of CycFort COLLECTION
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isa

public boolean isa(CycFort term,
                   CycFort collection,
                   CycFort mt)
            throws java.io.IOException,
                   java.net.UnknownHostException,
                   CycApiException
Returns true if CycFort TERM is a instance of CycFort COLLECTION, using the given microtheory. Method implementation optimised for the binary api.
Parameters:
term - the term
collection - the collection
mt - the microtheory in which the ask is performed
Returns:
true if CycFort TERM is a instance of CycFort COLLECTION
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getWhyIsa

public CycList getWhyIsa(CycFort spec,
                         CycFort genl)
                  throws java.io.IOException,
                         java.net.UnknownHostException,
                         CycApiException
Gets the list of the justifications of why CycFort TERM is an instance of CycFort COLLECTION. getWhyIsa("Brazil", "Country") --> "(((#$isa #$Brazil #$IndependentCountry) :TRUE) (#$genls #$IndependentCountry #$Country) :TRUE))
Parameters:
spec - the specialized collection
genl - the more general collection
Returns:
the list of the justifications of why CycFort TERM is an instance of CycFort COLLECTION
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getWhyIsa

public CycList getWhyIsa(CycFort spec,
                         CycFort genl,
                         CycFort mt)
                  throws java.io.IOException,
                         java.net.UnknownHostException,
                         CycApiException
Gets the list of the justifications of why CycFort TERM is an instance of CycFort COLLECTION. getWhyIsa("Brazil", "Country") --> "(((#$isa #$Brazil #$IndependentCountry) :TRUE) (#$genls #$IndependentCountry #$Country) :TRUE))
Parameters:
spec - the specialized collection
genl - the more general collection
mt - the relevant mt
Returns:
the list of the justifications of why CycFort TERM is an instance of CycFort COLLECTION
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getWhyIsaParaphrase

public java.util.ArrayList getWhyIsaParaphrase(CycFort spec,
                                               CycFort genl)
                                        throws java.io.IOException,
                                               CycApiException
Gets the English parapharse of the justifications of why CycFort TERM is an instance of CycFort COLLECTION. getWhyGenlParaphase("Brazil", "Country") --> "Brazil is an independent country" "an independent country is a kind of country"
Parameters:
spec - the specialized collection
genl - the more general collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getWhyIsaParaphrase

public java.util.ArrayList getWhyIsaParaphrase(CycFort spec,
                                               CycFort genl,
                                               CycFort mt)
                                        throws java.io.IOException,
                                               CycApiException
Gets the English parapharse of the justifications of why CycFort TERM is an instance of CycFort COLLECTION. getWhyGenlParaphase("Brazil", "Country") --> "Brazil is an independent country" "an independent country is a kind of country"
Parameters:
spec - the specialized collection
genl - the more general collection
mt - the relevant mt
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getGenlPreds

public CycList getGenlPreds(CycConstant predicate)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Gets the list of the genlPreds for a CycConstant predicate.
Parameters:
predicate - the given predicate term
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getGenlPreds

public CycList getGenlPreds(CycConstant predicate,
                            CycFort mt)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Gets the list of the genlPreds for a CycConstant predicate.
Parameters:
predicate - the given predicate term
mt - the relevant mt
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllGenlPreds

public CycList getAllGenlPreds(CycConstant predicate)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Gets the list of all of the genlPreds for a CycConstant predicate, using an upward closure.
Returns:
a list of all of the genlPreds for a CycConstant predicate, using an upward closure
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllGenlPreds

public CycList getAllGenlPreds(CycConstant predicate,
                               CycFort mt)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Gets the list of all of the genlPreds for a CycConstant predicate, using an upward closure.
Parameters:
mt - the relevant mt
Returns:
a list of all of the genlPreds for a CycConstant predicate, using an upward closure
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllSpecPreds

public CycList getAllSpecPreds(CycFort cycFort)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Gets the list of all of the direct and indirect specs-preds for the given predicate in all microtheories.
Parameters:
cycFort - the predicate
Returns:
the list of all of the direct and indirect spec-preds for the given predicate in all microtheories.
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllSpecPreds

public CycList getAllSpecPreds(CycFort cycFort,
                               CycFort mt)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Gets the list of all of the direct and indirect specs-preds for the given predicate in the given microtheory.
Parameters:
cycFort - the predicate
mt - the microtheory
Returns:
the list of all of the direct and indirect spec-preds for the given predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllSpecPredsHashSet

public java.util.HashSet getAllSpecPredsHashSet(CycFort cycFort)
                                         throws java.io.IOException,
                                                java.net.UnknownHostException,
                                                CycApiException
Gets the hashset of all of the direct and indirect specs-preds for the given predicate in all microtheories.
Parameters:
cycFort - the predicate
Returns:
the hashset of all of the direct and indirect spec-preds for the given predicate in all microtheories.
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllSpecPredsHashSet

public java.util.HashSet getAllSpecPredsHashSet(CycFort cycFort,
                                                CycFort mt)
                                         throws java.io.IOException,
                                                java.net.UnknownHostException,
                                                CycApiException
Gets the hashset of all of the direct and indirect specs-preds for the given predicate in the given microtheory.
Parameters:
cycFort - the predicate
mt - the microtheory
Returns:
the hashset of all of the direct and indirect spec-preds for the given predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllSpecInverses

public CycList getAllSpecInverses(CycFort cycFort)
                           throws java.io.IOException,
                                  java.net.UnknownHostException,
                                  CycApiException
Gets the list of all of the direct and indirect specs-inverses for the given predicate in all microtheories.
Parameters:
cycFort - the predicate
Returns:
the list of all of the direct and indirect spec-inverses for the given predicate in all microtheories.
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllSpecInverses

public CycList getAllSpecInverses(CycFort cycFort,
                                  CycFort mt)
                           throws java.io.IOException,
                                  java.net.UnknownHostException,
                                  CycApiException
Gets the list of all of the direct and indirect specs-inverses for the given predicate in the given microtheory.
Parameters:
cycFort - the predicate
mt - the microtheory
Returns:
the list of all of the direct and indirect spec-inverses for the given predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllSpecInversesHashSet

public java.util.HashSet getAllSpecInversesHashSet(CycFort cycFort)
                                            throws java.io.IOException,
                                                   java.net.UnknownHostException,
                                                   CycApiException
Gets the hashset of all of the direct and indirect specs-inverses for the given predicate in all microtheories.
Parameters:
cycFort - the predicate
Returns:
the hashset of all of the direct and indirect spec-inverses for the given predicate in all microtheories.
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllSpecMts

public CycList getAllSpecMts(CycFort mt)
                      throws java.io.IOException,
                             java.net.UnknownHostException,
                             CycApiException
Gets the list of all of the direct and indirect specs-mts for the given microtheory in *mt-mt* (currently #$UniversalVocabularyMt).
Parameters:
mt - the microtheory
Returns:
the list of all of the direct and indirect specs-mts for the given microtheory in *mt-mt* (currently #$UniversalVocabularyMt)
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllSpecInversesHashSet

public java.util.HashSet getAllSpecInversesHashSet(CycFort cycFort,
                                                   CycFort mt)
                                            throws java.io.IOException,
                                                   java.net.UnknownHostException,
                                                   CycApiException
Gets the hashset of all of the direct and indirect specs-inverses for the given predicate in the given microtheory.
Parameters:
cycFort - the predicate
mt - the microtheory
Returns:
the hashset of all of the direct and indirect spec-inverses for the given predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getAllSpecMtsHashSet

public java.util.HashSet getAllSpecMtsHashSet(CycFort mt)
                                       throws java.io.IOException,
                                              java.net.UnknownHostException,
                                              CycApiException
Gets the hashset of all of the direct and indirect specs-mts for the given microtheory in *mt-mt* (currently #$UniversalVocabularyMt).
Parameters:
mt - the microtheory
Returns:
the hashset of all of the direct and indirect specs-mts for the given microtheory in *mt-mt* (currently #$UniversalVocabularyMt)
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArg1Isas

public CycList getArg1Isas(CycConstant predicate)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets a list of the arg1Isas for a CycConstant predicate.
Parameters:
predicate - the predicate for which argument 1 contraints are sought.
Returns:
the list of the arg1Isas for a CycConstant predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArg1Isas

public CycList getArg1Isas(CycConstant predicate,
                           CycFort mt)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets the list of the arg1Isas for a CycConstant predicate given an mt.
Parameters:
predicate - the predicate for which argument 1 contraints are sought.
mt - the relevant microtheory
Returns:
the list of the arg1Isas for a CycConstant predicate given an mt
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArg2Isas

public CycList getArg2Isas(CycConstant predicate)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets a list of the arg2Isas for a CycConstant predicate.
Parameters:
predicate - the predicate for which argument 2 contraints are sought.
Returns:
the list of the arg1Isas for a CycConstant predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArg2Isas

public CycList getArg2Isas(CycConstant predicate,
                           CycFort mt)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets the list of the arg2Isas for a CycConstant predicate given an mt.
Parameters:
predicate - the predicate for which argument 2 contraints are sought.
mt - the relevant microtheory
Returns:
the list of the arg2Isas for a CycConstant predicate given an mt
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArg3Isas

public CycList getArg3Isas(CycConstant predicate)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets a list of the arg3Isas for a CycConstant predicate.
Parameters:
predicate - the predicate for which argument 3 contraints are sought.
Returns:
the list of the arg1Isas for a CycConstant predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArg3Isas

public CycList getArg3Isas(CycConstant predicate,
                           CycFort mt)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets the list of the arg3Isas for a CycConstant predicate given an mt.
Parameters:
predicate - the predicate for which argument 3 contraints are sought.
mt - the relevant microtheory
Returns:
the list of the arg1Isas for a CycConstant predicate given an mt
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArg4Isas

public CycList getArg4Isas(CycConstant predicate)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets a list of the arg4Isas for a CycConstant predicate.
Parameters:
predicate - the predicate for which argument 4 contraints are sought.
Returns:
the list of the arg4Isas for a CycConstant predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArg4Isas

public CycList getArg4Isas(CycConstant predicate,
                           CycFort mt)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets the list of the arg4Isas for a CycConstant predicate given an mt.
Parameters:
predicate - the predicate for which argument 4 contraints are sought.
mt - the relevant microtheory
Returns:
the list of the arg4Isas for a CycConstant predicate given an mt
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArgNIsas

public CycList getArgNIsas(CycConstant predicate,
                           int argPosition)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets a list of the argNIsas for a CycConstant predicate.
Parameters:
predicate - the predicate for which argument N contraints are sought.
argPosition - the argument position of argument N
Returns:
the list of the argNIsas for a CycConstant predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArgNIsas

public CycList getArgNIsas(CycConstant predicate,
                           int argPosition,
                           CycFort mt)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets the list of the argNIsas for a CycConstant predicate given an mt.
Parameters:
predicate - the predicate for which argument contraints are sought.
argPosition - the argument position of argument N
mt - the relevant microtheory
Returns:
the list of the arg1Isas for a CycConstant predicate given an mt
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getInterArgIsa1_2s

public CycList getInterArgIsa1_2s(CycConstant predicate)
                           throws java.io.IOException,
                                  java.net.UnknownHostException,
                                  CycApiException
Gets the list of the interArgIsa1-2 isa constraint pairs for the given predicate. Each item of the returned list is a pair (arg1-isa arg2-isa) which means that when (#$isa arg1 arg1-isa) holds, (#$isa arg2 arg2-isa) must also hold for (predicate arg1 arg2 ..) to be well formed.
Parameters:
predicate - the predicate for interArgIsa1-2 contraints are sought.
Returns:
the list of the interArgIsa1-2 isa constraint pairs for the given predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getInterArgIsa1_2s

public CycList getInterArgIsa1_2s(CycConstant predicate,
                                  CycFort mt)
                           throws java.io.IOException,
                                  java.net.UnknownHostException,
                                  CycApiException
Gets the list of the interArgIsa1-2 isa constraint pairs for the given predicate. Each item of the returned list is a pair (arg1-isa arg2-isa) which means that when (#$isa arg1 arg1-isa) holds, (#$isa arg2 arg2-isa) must also hold for (predicate arg1 arg2 ..) to be well formed.
Parameters:
predicate - the predicate for interArgIsa1-2 contraints are sought.
mt - the relevant inference microtheory
Returns:
the list of the interArgIsa1-2 isa constraint pairs for the given predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getInterArgIsa1_2_forArg2

public CycList getInterArgIsa1_2_forArg2(CycConstant predicate,
                                         CycFort arg1)
                                  throws java.io.IOException,
                                         java.net.UnknownHostException,
                                         CycApiException
Gets the list of the interArgIsa1-2 isa constraints for arg2, given the predicate and arg1.
Parameters:
predicate - the predicate for interArgIsa1-2 contraints are sought.
arg1 - the argument in position 1
Returns:
the list of the interArgIsa1-2 isa constraints for arg2, given the predicate and arg1
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getInterArgIsa1_2_forArg2

public CycList getInterArgIsa1_2_forArg2(CycConstant predicate,
                                         CycFort arg1,
                                         CycFort mt)
                                  throws java.io.IOException,
                                         java.net.UnknownHostException,
                                         CycApiException
Gets the list of the interArgIsa1-2 isa constraints for arg2, given the predicate and arg1.
Parameters:
predicate - the predicate for interArgIsa1-2 contraints are sought.
arg1 - the argument in position 1
mt - the relevant inference microtheory
Returns:
the list of the interArgIsa1-2 isa constraints for arg2, given the predicate and arg1
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getResultIsas

public CycList getResultIsas(CycConstant function)
                      throws java.io.IOException,
                             java.net.UnknownHostException,
                             CycApiException
Gets the list of the resultIsa for a CycConstant function.
Parameters:
function - the given function term
Returns:
the list of the resultIsa for a CycConstant function
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getResultIsas

public CycList getResultIsas(CycConstant function,
                             CycFort mt)
                      throws java.io.IOException,
                             java.net.UnknownHostException,
                             CycApiException
Gets the list of the resultIsa for a CycConstant function.
Parameters:
function - the given function term
mt - the relevant mt
Returns:
the list of the resultIsa for a CycConstant function
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArgNGenls

public CycList getArgNGenls(CycConstant predicate,
                            int argPosition)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Gets the list of the argNGenls for a CycConstant predicate.
Parameters:
predicate - the given predicate term
argPosition - the argument position for which the genls argument constraints are sought (position 1 = first argument)
Returns:
the list of the argNGenls for a CycConstant predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArgNGenls

public CycList getArgNGenls(CycConstant predicate,
                            int argPosition,
                            CycFort mt)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Gets the list of the argNGenls for a CycConstant predicate.
Parameters:
predicate - the given predicate term
argPosition - the argument position for which the genls argument constraints are sought (position 1 = first argument)
mt - the relevant mt
Returns:
the list of the argNGenls for a CycConstant predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArg1Formats

public CycList getArg1Formats(CycConstant predicate)
                       throws java.io.IOException,
                              java.net.UnknownHostException,
                              CycApiException
Gets a list of the arg1Formats for a CycConstant predicate.
Parameters:
predicate - the given predicate term
Returns:
a list of the arg1Formats for a CycConstant predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArg1Formats

public CycList getArg1Formats(CycConstant predicate,
                              CycFort mt)
                       throws java.io.IOException,
                              java.net.UnknownHostException,
                              CycApiException
Gets a list of the arg1Formats for a CycConstant predicate.
Parameters:
predicate - the given predicate term
mt - the relevant mt
Returns:
a list of the arg1Formats for a CycConstant predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArg2Formats

public CycList getArg2Formats(CycConstant predicate)
                       throws java.io.IOException,
                              java.net.UnknownHostException,
                              CycApiException
Gets a list of the arg2Formats for a CycConstant predicate.
Parameters:
predicate - the given predicate term
Returns:
a list of the arg2Formats for a CycConstant predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArg2Formats

public CycList getArg2Formats(CycConstant predicate,
                              CycFort mt)
                       throws java.io.IOException,
                              java.net.UnknownHostException,
                              CycApiException
Gets a list of the arg2Formats for a CycConstant predicate.
Parameters:
predicate - the given predicate term
mt - the relevant mt
Returns:
a list of the arg2Formats for a CycConstant predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getDisjointWiths

public CycList getDisjointWiths(CycFort cycFort)
                         throws java.io.IOException,
                                java.net.UnknownHostException,
                                CycApiException
Gets a list of the disjointWiths for a CycFort.
Parameters:
cycFort - the given collection term
Returns:
a list of the disjointWiths for a CycFort
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getDisjointWiths

public CycList getDisjointWiths(CycFort cycFort,
                                CycFort mt)
                         throws java.io.IOException,
                                java.net.UnknownHostException,
                                CycApiException
Gets a list of the disjointWiths for a CycFort.
Parameters:
cycFort - the given collection term
mt - the relevant mt
Returns:
a list of the disjointWiths for a CycFort
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getCoExtensionals

public CycList getCoExtensionals(CycFort cycFort)
                          throws java.io.IOException,
                                 java.net.UnknownHostException,
                                 CycApiException
Gets a list of the coExtensionals for a CycFort. Limited to 120 seconds.
Parameters:
cycFort - the given collection term
Returns:
a list of the coExtensionals for a CycFort
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getCoExtensionals

public CycList getCoExtensionals(CycFort cycFort,
                                 CycFort mt)
                          throws java.io.IOException,
                                 java.net.UnknownHostException,
                                 CycApiException
Gets a list of the coExtensionals for a CycFort. Limited to 120 seconds.
Parameters:
cycFort - the given collection term
mt - the relevant mt for inference
Returns:
a list of the coExtensionals for a CycFort
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isMicrotheory

public boolean isMicrotheory(CycFort cycFort)
                      throws java.io.IOException,
                             java.net.UnknownHostException,
                             CycApiException
Returns true if cycConstant is a microtheory.
Parameters:
cycConstant - the constant for determination as a microtheory
Returns:
true iff cycConstant is a microtheory
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isCollection

public boolean isCollection(CycFort cycFort)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Returns true if cycConstant is a Collection.
Parameters:
cycConstant - the constant for determination as a Collection
Returns:
true iff cycConstant is a Collection,
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isCollection_Cached

public boolean isCollection_Cached(CycFort cycFort)
                            throws java.io.IOException,
                                   CycApiException
Returns true if cycConstant is a Collection, implements a cache to avoid asking the same question twice from the KB.
Parameters:
cycConstant - the constant for determination as a Collection
Returns:
true iff cycConstant is a Collection,
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isIndividual

public boolean isIndividual(CycFort cycFort)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Returns true if cycConstant is an Individual.
Parameters:
cycFort - the given term
Returns:
true if cycConstant is an Individual
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isFunction

public boolean isFunction(CycConstant cycConstant)
                   throws java.io.IOException,
                          java.net.UnknownHostException,
                          CycApiException
Returns true if cycConstant is a Function.
Parameters:
cycConstant - the given term
Returns:
true if cycConstant is a Function, otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isEvaluatablePredicate

public boolean isEvaluatablePredicate(CycConstant predicate)
                               throws java.io.IOException,
                                      java.net.UnknownHostException,
                                      CycApiException
Returns true if cycConstant is an evaluatable predicate.
Parameters:
predicate - the given term
Returns:
true if cycConstant is an evaluatable predicate, otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isPredicate

public boolean isPredicate(CycFort cycFort)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Returns true if cycFort is a Predicate.
Parameters:
cycFort - the term for determination as a predicate
Returns:
true if cycFort is a Predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isUnaryPredicate

public boolean isUnaryPredicate(CycConstant cycConstant)
                         throws java.io.IOException,
                                java.net.UnknownHostException,
                                CycApiException
Returns true if cycConstant is a UnaryPredicate.
Parameters:
cycConstant - the given term
Returns:
true if cycConstant is a UnaryPredicate, otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isBinaryPredicate

public boolean isBinaryPredicate(CycConstant cycConstant)
                          throws java.io.IOException,
                                 java.net.UnknownHostException,
                                 CycApiException
Returns true if cycConstant is a BinaryPredicate.
Parameters:
cycConstant - the given term
Returns:
true if cycConstant is a BinaryPredicate, otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isValidConstantName

public boolean isValidConstantName(java.lang.String candidateName)
                            throws java.io.IOException,
                                   java.net.UnknownHostException,
                                   CycApiException
Returns true if the candidate name uses valid CycConstant characters.
Parameters:
candidateName - the candidate name
Returns:
true if the candidate name uses valid CycConstant characters
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isConstantNameAvailable

public boolean isConstantNameAvailable(java.lang.String candidateName)
                                throws java.io.IOException,
                                       java.net.UnknownHostException,
                                       CycApiException
Returns true if the candidate name is an available CycConstant name, case insensitive.
Parameters:
candidateName - the candidate name
Returns:
true if the candidate name uses valid CycConstant characters
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isQuotedCollection

public boolean isQuotedCollection(CycFort cycFort)
                           throws java.io.IOException,
                                  java.net.UnknownHostException,
                                  CycApiException
Returns true if term is a quotedCollection, in any microtheory
Parameters:
cycFort - the given CycFort term
Returns:
true if term is a quotedCollection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isQuotedCollection

public boolean isQuotedCollection(CycFort cycFort,
                                  CycFort mt)
                           throws java.io.IOException,
                                  java.net.UnknownHostException,
                                  CycApiException
Returns true if term is a quotedCollection is a quotedCollection.
Parameters:
cycFort - the given CycFort term
mt - the microtheory in which the query is made
Returns:
true if term is a quotedCollection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isPublicConstant

public boolean isPublicConstant(CycConstant cycConstant)
                         throws java.io.IOException,
                                java.net.UnknownHostException,
                                CycApiException
Returns true if cycConstant is a PublicConstant.
Parameters:
cycConstant - the given constant
Returns:
true if cycConstant is a PublicConstant
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getPublicConstants

public CycList getPublicConstants()
                           throws java.io.IOException,
                                  java.net.UnknownHostException,
                                  CycApiException
Gets a list of the public Cyc constants.
Returns:
a list of the public Cyc constants
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getKbSubset

public CycList getKbSubset(CycFort cycKbSubsetCollection)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Gets a list of the elements of the given CycKBSubsetCollection.
Parameters:
cycKbSubsetCollection - the given CycKBSubsetCollection
Returns:
a list of the elements of the given CycKBSubsetCollection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

kill

public void kill(CycConstant cycConstant)
          throws java.io.IOException,
                 java.net.UnknownHostException,
                 CycApiException
Kills a Cyc constant. If CYCCONSTANT is a microtheory, then all the contained assertions are deleted from the KB, the Cyc Truth Maintenance System (TML) will automatically delete any derived assertions whose sole support is the killed term(s).
Parameters:
cycConstant - the constant term to be removed from the KB
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

kill

public void kill(CycConstant[] cycConstants)
          throws java.io.IOException,
                 java.net.UnknownHostException,
                 CycApiException
Kills the given Cyc constants. If CYCCONSTANT is a microtheory, then all the contained assertions are deleted from the KB, the Cyc Truth Maintenance System (TML) will automatically delete any derived assertions whose sole support is the killed term(s).
Parameters:
cycConstants - the list of constant terms to be removed from the KB
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

kill

public void kill(java.util.ArrayList cycConstants)
          throws java.io.IOException,
                 java.net.UnknownHostException,
                 CycApiException
Kills the given Cyc constants. If CYCCONSTANT is a microtheory, then all the contained assertions are deleted from the KB, the Cyc Truth Maintenance System (TML) will automatically delete any derived assertions whose sole support is the killed term(s).
Parameters:
cycConstants - the list of constant terms to be removed from the KB
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

kill

public void kill(CycFort cycFort)
          throws java.io.IOException,
                 java.net.UnknownHostException,
                 CycApiException
Kills a Cyc NART (Non Atomic Reified Term). If CYCFORT is a microtheory, then all the contained assertions are deleted from the KB, the Cyc Truth Maintenance System (TML) will automatically delete any derived assertions whose sole support is the killed term(s).
Parameters:
cycFort - the NART term to be removed from the KB
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

setCyclist

public void setCyclist(java.lang.String cyclistName)
                throws java.io.IOException,
                       java.net.UnknownHostException,
                       CycApiException
Sets the value of the Cyclist, whose identity will be attached via #$myCreator bookkeeping assertions to new KB entities created in this session.
Parameters:
cyclistName - the name of the cyclist term
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

setCyclist

public void setCyclist(CycConstant cyclist)
Sets the value of the Cyclist, whose identity will be attached via #$myCreator bookkeeping assertions to new KB entities created in this session.
Parameters:
cyclis - the cyclist term

setKePurpose

public void setKePurpose(java.lang.String projectName)
                  throws java.io.IOException,
                         java.net.UnknownHostException,
                         CycApiException
Sets the value of the KE purpose, whose project name will be attached via #$myCreationPurpose bookkeeping assertions to new KB entities created in this session.
Parameters:
projectName - the string name of the KE Purpose term
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

setKePurpose

public void setKePurpose(CycConstant project)
Sets the value of the KE purpose, whose project name will be attached via #$myCreationPurpose bookkeeping assertions to new KB entities created in this session.
Parameters:
project - the KE Purpose term

assertWithTranscript

public void assertWithTranscript(CycList sentence,
                                 CycFort mt)
                          throws java.io.IOException,
                                 java.net.UnknownHostException,
                                 CycApiException
Asserts the given sentence, and then places it on the transcript queue.
Parameters:
sentence - the given sentence for assertion
mt - the microtheory in which the assertion is placed
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertWithTranscript

public void assertWithTranscript(java.lang.String sentence,
                                 CycFort mt)
                          throws java.io.IOException,
                                 java.net.UnknownHostException,
                                 CycApiException
Asserts the given sentence, and then places it on the transcript queue.
Parameters:
sentence - the given sentence for assertion
mt - the microtheory in which the assertion is placed
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertWithTranscriptAndBookkeeping

public void assertWithTranscriptAndBookkeeping(CycList sentence,
                                               CycFort mt)
                                        throws java.io.IOException,
                                               java.net.UnknownHostException,
                                               CycApiException
Asserts the given sentence, and then places it on the transcript queue.
Parameters:
sentence - the given sentence for assertion
mt - the microtheory in which the assertion is placed
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertWithTranscriptAndBookkeeping

public void assertWithTranscriptAndBookkeeping(java.lang.String sentence,
                                               CycFort mt)
                                        throws java.io.IOException,
                                               java.net.UnknownHostException,
                                               CycApiException
Asserts the given sentence, and then places it on the transcript queue.
Parameters:
sentence - the given sentence for assertion
mt - the microtheory in which the assertion is placed
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

withBookkeepingInfo

protected java.lang.String withBookkeepingInfo()
Returns a with-bookkeeping-info macro expresssion.
Returns:
a with-bookkeeping-info macro expresssion

find

public CycConstant find(java.lang.String constantName)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Finds a Cyc constant in the KB with the specified name
Parameters:
constantName - the name of the new constant
Returns:
the constant term or null if the argument name is null or if the term is not found
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

findOrCreate

public CycConstant findOrCreate(java.lang.String constantName)
                         throws java.io.IOException,
                                java.net.UnknownHostException,
                                CycApiException
Finds or creates a Cyc constant in the KB with the specified name. The operation will be added to the KB transcript for replication and archive.
Parameters:
constantName - the name of the new constant
Returns:
the new constant term
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

createNewPermanent

public CycConstant createNewPermanent(java.lang.String constantName)
                               throws java.io.IOException,
                                      java.net.UnknownHostException,
                                      CycApiException
Creates a new permanent Cyc constant in the KB with the specified name. The operation will be added to the KB transcript for replication and archive.
Parameters:
constantName - the name of the new constant
Returns:
the new constant term
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGaf

public void assertGaf(CycFort mt,
                      CycFort predicate,
                      CycFort arg1,
                      CycFort arg2)
               throws java.io.IOException,
                      java.net.UnknownHostException,
                      CycApiException
Asserts a ground atomic formula (gaf) in the specified microtheory MT. The operation will be added to the KB transcript for replication and archive.
Parameters:
mt - the microtheory in which the assertion is made
predicate - the binary predicate of the assertion
arg1 - the first argument of the predicate
arg2 - the second argument of the predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGaf

public void assertGaf(CycFort mt,
                      CycFort predicate,
                      CycFort arg1,
                      java.lang.String arg2)
               throws java.io.IOException,
                      java.net.UnknownHostException,
                      CycApiException
Asserts a ground atomic formula (gaf) in the specified microtheory MT. The operation will be added to the KB transcript for replication and archive.
Parameters:
mt - the microtheory in which the assertion is made
predicate - the binary predicate of the assertion
arg1 - the first argument of the predicate
arg2 - the second argument of the predicate, which is a string
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGaf

public void assertGaf(CycFort mt,
                      CycConstant predicate,
                      CycFort arg1,
                      CycList arg2)
               throws java.io.IOException,
                      java.net.UnknownHostException,
                      CycApiException
Asserts a ground atomic formula (gaf) in the specified microtheory MT. The operation will be added to the KB transcript for replication and archive.
Parameters:
mt - the microtheory in which the assertion is made
predicate - the binary predicate of the assertion
arg1 - the first argument of the predicate
arg2 - the second argument of the predicate, which is a CycList
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGaf

public void assertGaf(CycFort mt,
                      CycConstant predicate,
                      CycFort arg1,
                      int arg2)
               throws java.io.IOException,
                      java.net.UnknownHostException,
                      CycApiException
Asserts a ground atomic formula (gaf) in the specified microtheory MT. The operation will be added to the KB transcript for replication and archive.
Parameters:
mt - the microtheory in which the assertion is made
predicate - the binary predicate of the assertion
arg1 - the first argument of the predicate
arg2 - the second argument of the predicate, which is an int
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGaf

public void assertGaf(CycFort mt,
                      CycFort predicate,
                      CycFort arg1,
                      java.lang.Integer arg2)
               throws java.io.IOException,
                      java.net.UnknownHostException,
                      CycApiException
Asserts a ground atomic formula (gaf) in the specified microtheory. The operation will be added to the KB transcript for replication and archive.
Parameters:
mt - the microtheory in which the assertion is made
predicate - the binary predicate of the assertion
arg1 - the first argument of the predicate
arg2 - the second argument of the predicate, which is an Integer
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGaf

public void assertGaf(CycFort mt,
                      CycFort predicate,
                      CycFort arg1,
                      java.lang.Double arg2)
               throws java.io.IOException,
                      java.net.UnknownHostException,
                      CycApiException
Asserts a ground atomic formula (gaf) in the specified microtheory. The operation will be added to the KB transcript for replication and archive.
Parameters:
mt - the microtheory in which the assertion is made
predicate - the binary predicate of the assertion
arg1 - the first argument of the predicate
arg2 - the second argument of the predicate, which is a Double
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGaf

public void assertGaf(CycFort mt,
                      CycConstant predicate,
                      CycFort arg1,
                      CycFort arg2,
                      CycFort arg3)
               throws java.io.IOException,
                      java.net.UnknownHostException,
                      CycApiException
Asserts a ground atomic formula (gaf) in the specified microtheory MT. The operation and its bookkeeping info will be added to the KB transcript for replication and archive.
Parameters:
mt - the microtheory in which the assertion is made
predicate - the ternary predicate of the assertion
arg1 - the first argument of the predicate
arg2 - the second argument of the predicate
arg3 - the third argument of the predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGaf

public void assertGaf(CycList gaf,
                      CycFort mt)
               throws java.io.IOException,
                      java.net.UnknownHostException,
                      CycApiException
Asserts a ground atomic formula (gaf) in the specified microtheory MT. The operation will be added to the KB transcript for replication and archive.
Parameters:
gaf - the gaf in the form of a CycList
mt - the microtheory in which the assertion is made
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

unassertGaf

public void unassertGaf(CycList gaf,
                        CycFort mt)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Unasserts the given ground atomic formula (gaf) in the specified microtheory MT.
Parameters:
gaf - the gaf in the form of a CycList
mt - the microtheory in which the assertion is made
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertNameString

public void assertNameString(java.lang.String cycConstantName,
                             java.lang.String nameString,
                             java.lang.String mtName)
                      throws java.io.IOException,
                             java.net.UnknownHostException,
                             CycApiException
Assert a nameString for the specified CycConstant in the specified lexical microtheory. The operation will be added to the KB transcript for replication and archive.
Parameters:
cycConstantName - the name of the given term
nameString - the given name string for the term
mtName - the name of the microtheory in which the name string is asserted
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertComment

public void assertComment(java.lang.String cycConstantName,
                          java.lang.String comment,
                          java.lang.String mtName)
                   throws java.io.IOException,
                          java.net.UnknownHostException,
                          CycApiException
Assert a comment for the specified CycConstant in the specified microtheory MT. The operation will be added to the KB transcript for replication and archive.
Parameters:
cycConstantName - the name of the given term
comment - the comment string
mtName - the name of the microtheory in which the comment is asserted
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertComment

public void assertComment(CycFort cycFort,
                          java.lang.String comment,
                          CycFort mt)
                   throws java.io.IOException,
                          java.net.UnknownHostException,
                          CycApiException
Assert a comment for the specified CycFort in the specified microtheory. The operation will be added to the KB transcript for replication and archive.
Parameters:
cycFort - the given term
comment - the comment string
mt - the comment assertion microtheory
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertNameString

public void assertNameString(CycFort cycFort,
                             java.lang.String nameString,
                             CycFort mt)
                      throws java.io.IOException,
                             java.net.UnknownHostException,
                             CycApiException
Assert a name string for the specified CycFort in the specified microtheory. The operation will be added to the KB transcript for replication and archive.
Parameters:
cycFort - the given term
nameString - the name string
mt - the name string assertion microtheory
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGenFormat

public void assertGenFormat(CycFort relation,
                            java.lang.String genFormatString,
                            CycList genFormatList)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Assert a paraphrase format for the specified CycFort in the #$EnglishParaphraseMt. The operation will be added to the KB transcript for replication and archive.
Parameters:
relation - the given term
genFormatString - the genFormat string
genFormatList - the genFormat argument substitution sequence
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

createMicrotheory

public CycConstant createMicrotheory(java.lang.String mtName,
                                     java.lang.String comment,
                                     CycFort isaMt,
                                     java.util.ArrayList genlMts)
                              throws java.io.IOException,
                                     java.net.UnknownHostException,
                                     CycApiException
Create a microtheory MT, with a comment, isa and CycFort genlMts. An existing microtheory with the same name is killed first, if it exists.
Parameters:
mtName - the name of the microtheory term
comment - the comment for the new microtheory
isMt - the type of the new microtheory
genlMts - the list of more general microtheories
Returns:
the new microtheory term
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

createMicrotheory

public CycConstant createMicrotheory(java.lang.String mtName,
                                     java.lang.String comment,
                                     java.lang.String isaMtName,
                                     java.util.ArrayList genlMts)
                              throws java.io.IOException,
                                     java.net.UnknownHostException,
                                     CycApiException
Create a microtheory MT, with a comment, isa and CycFort genlMts. An existing microtheory with the same name is killed first, if it exists.
Parameters:
mtName - the name of the microtheory term
comment - the comment for the new microtheory
isMt - the type (as a string) of the new microtheory
genlMts - the list of more general microtheories (as strings)
Returns:
the new microtheory term
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

createMicrotheorySystem

public CycConstant[] createMicrotheorySystem(java.lang.String mtRootName,
                                             java.lang.String comment,
                                             java.util.ArrayList genlMts)
                                      throws java.io.IOException,
                                             java.net.UnknownHostException,
                                             CycApiException
Create a microtheory system for a new mt. Given a root mt name, create a theory Mt, create a vocabulary VocabMt, and a data DataMt. Establish genlMt links for the theory mt and data mt. Assert that the theory mt is a genlMt of the WorldLikeOursCollectorMt. Assert that the data mt is a genlMt of the collector CurrentWorldDataMt.
Parameters:
mtRootName - the root name of the microtheory system
comment - the root comment of the microtheory system
genlMts - the list of more general microtheories
Returns:
an array of three elements consisting of the theory mt, vocabulary mt, and the data mt
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertIsaCollection

public void assertIsaCollection(CycFort cycFort)
                         throws java.io.IOException,
                                java.net.UnknownHostException,
                                CycApiException
Assert that the specified CycConstant is a collection in the UniversalVocabularyMt. The operation will be added to the KB transcript for replication and archive.
Parameters:
cycFort - the given collection term
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertIsaCollection

public void assertIsaCollection(CycFort cycFort,
                                CycFort mt)
                         throws java.io.IOException,
                                java.net.UnknownHostException,
                                CycApiException
Assert that the specified CycConstant is a collection in the specified defining microtheory MT. The operation will be added to the KB transcript for replication and archive.
Parameters:
cycFort - the given collection term
mt - the assertion microtheory
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGenls

public void assertGenls(java.lang.String specCollectionName,
                        java.lang.String genlsCollectionName,
                        java.lang.String mtName)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Assert that the genlsCollection is a genls of specCollection, in the specified defining microtheory MT. The operation will be added to the KB transcript for replication and archive.
Parameters:
specCollectionName - the name of the more specialized collection
genlsCollectionName - the name of the more generalized collection
mtName - the assertion microtheory name
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGenls

public void assertGenls(java.lang.String specCollectionName,
                        java.lang.String genlsCollectionName)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Assert that the genlsCollection is a genls of specCollection, in the UniversalVocabularyMt The operation will be added to the KB transcript for replication and archive.
Parameters:
specCollectionName - the name of the more specialized collection
genlsCollectionName - the name of the more generalized collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGenls

public void assertGenls(CycFort specCollection,
                        CycFort genlsCollection)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Assert that the genlsCollection is a genls of specCollection, in the UniveralVocabularyMt. The operation will be added to the KB transcript for replication and archive.
Parameters:
specCollection - the more specialized collection
genlsCollection - the more generalized collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGenls

public void assertGenls(CycFort specCollection,
                        CycFort genlsCollection,
                        CycFort mt)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Assert that the genlsCollection is a genls of specCollection, in the specified defining microtheory MT. The operation will be added to the KB transcript for replication and archive.
Parameters:
specCollection - the more specialized collection
genlsCollection - the more generalized collection
mt - the assertion microtheory
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGenlPreds

public void assertGenlPreds(java.lang.String specPredName,
                            java.lang.String genlPredName)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Assert that the more general predicate is a genlPreds of the more specialized predicate, asserted in the UniversalVocabularyMt The operation will be added to the KB transcript for replication and archive.
Parameters:
specPredName - the name of the more specialized predicate
genlPredName - the name of the more generalized predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGenlPreds

public void assertGenlPreds(CycFort specPred,
                            CycFort genlPred)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Assert that the more general predicate is a genlPreds of the more specialized predicate, asserted in the UniversalVocabularyMt The operation will be added to the KB transcript for replication and archive.
Parameters:
specPred - the more specialized predicate
genlsPred - the more generalized predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertConceptuallyRelated

public void assertConceptuallyRelated(CycFort term1,
                                      CycFort term2,
                                      CycFort mt)
                               throws java.io.IOException,
                                      java.net.UnknownHostException,
                                      CycApiException
Assert that term1 is conceptually related to term2 in the specified microtheory. The operation will be added to the KB transcript for replication and archive.
Parameters:
term1 - the first symbol
term2 - the second symbol
mt - the microtheory in which the assertion is made
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGenlMt

public void assertGenlMt(java.lang.String specMtName,
                         java.lang.String genlsMtName)
                  throws java.io.IOException,
                         java.net.UnknownHostException,
                         CycApiException
Assert that the more general micortheory is a genlMt of the more specialized microtheory, asserted in the UniversalVocabularyMt The operation will be added to the KB transcript for replication and archive.
Parameters:
specMtName - the name of the more specialized microtheory
genlMtName - the name of the more generalized microtheory
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertGenlMt

public void assertGenlMt(CycFort specMt,
                         CycFort genlsMt)
                  throws java.io.IOException,
                         java.net.UnknownHostException,
                         CycApiException
Assert that the more general micortheory is a genlMt of the more specialized microtheory, asserted in the UniversalVocabularyMt The operation will be added to the KB transcript for replication and archive.
Parameters:
specMtName - the more specialized microtheory
genlMtName - the more generalized microtheory
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertIsa

public void assertIsa(java.lang.String cycFortName,
                      java.lang.String collectionName)
               throws java.io.IOException,
                      java.net.UnknownHostException,
                      CycApiException
Assert that the cycFort is a collection in the UniversalVocabularyMt. The operation will be added to the KB transcript for replication and archive.
Parameters:
cycFortName - the collection element name
collectionName - the collection name
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertIsa

public void assertIsa(java.lang.String cycFortName,
                      java.lang.String collectionName,
                      java.lang.String mtName)
               throws java.io.IOException,
                      java.net.UnknownHostException,
                      CycApiException
Assert that the cycFort is a collection, in the specified defining microtheory MT. The operation will be added to the KB transcript for replication and archive.
Parameters:
cycFortName - the collection element name
collectionName - the collection name
mtName - the assertion microtheory name
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertIsa

public void assertIsa(CycFort cycFort,
                      CycFort aCollection,
                      CycFort mt)
               throws java.io.IOException,
                      java.net.UnknownHostException,
                      CycApiException
Assert that the cycFort is a collection, in the specified defining microtheory MT. The operation will be added to the KB transcript for replication and archive.
Parameters:
cycFort - the collection element
aCollecton - the collection
mt - the assertion microtheory
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertIsa

public void assertIsa(CycFort cycFort,
                      CycFort aCollection)
               throws java.io.IOException,
                      java.net.UnknownHostException,
                      CycApiException
Assert that the cycFort is a collection, in the UniversalVocabularyMt. The operation will be added to the KB transcript for replication and archive.
Parameters:
cycFort - the collection element
aCollecton - the collection
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertIsaBinaryPredicate

public void assertIsaBinaryPredicate(CycFort cycFort)
                              throws java.io.IOException,
                                     java.net.UnknownHostException,
                                     CycApiException
Assert that the specified CycConstant is a #$BinaryPredicate in the specified defining microtheory. The operation will be added to the KB transcript for replication and archive.
Parameters:
cycFort - the given term
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertIsaBinaryPredicate

public void assertIsaBinaryPredicate(CycFort cycFort,
                                     CycFort mt)
                              throws java.io.IOException,
                                     java.net.UnknownHostException,
                                     CycApiException
Assert that the specified CycConstant is a #$BinaryPredicate in the specified defining microtheory. The operation will be added to the KB transcript for replication and archive.
Parameters:
cycFort - the given term
mt - the defining microtheory
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

makeCycList

public CycList makeCycList(java.lang.String string)
                    throws CycApiException
Constructs a new CycList object by parsing a string.
Parameters:
string - the string in CycL external (EL). For example:
(#$isa #$Dog #$TameAnimal)
Throws:
CycApiException - if the api request results in a cyc server error

makeCycConstant

public CycConstant makeCycConstant(java.lang.String name)
                            throws java.net.UnknownHostException,
                                   java.io.IOException,
                                   CycApiException
Returns a new CycConstant object using the constant name, recording bookkeeping information and archiving to the Cyc transcript.
Parameters:
name - Name of the constant. If prefixed with "#$", then the prefix is removed for canonical representation.
Returns:
a new CycConstant object using the constant name, recording bookkeeping information and archiving to the Cyc transcript
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

askWithVariable

public CycList askWithVariable(CycList query,
                               CycVariable variable,
                               CycFort mt)
                        throws java.io.IOException,
                               java.net.UnknownHostException,
                               CycApiException
Returns a list of bindings for a query with a single unbound variable.
Parameters:
query - the query to be asked in the knowledge base
variable - the single unbound variable in the query for which bindings are sought
mt - the microtheory in which the query is asked
Returns:
a list of bindings for the query
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

askWithVariables

public CycList askWithVariables(CycList query,
                                java.util.ArrayList variables,
                                CycFort mt)
                         throws java.io.IOException,
                                java.net.UnknownHostException,
                                CycApiException
Returns a list of bindings for a query with unbound variables.
Parameters:
query - the query to be asked in the knowledge base
variables - the list of unbound variables in the query for which bindings are sought
mt - the microtheory in which the query is asked
Returns:
a list of bindings for the query
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isQueryTrue

public boolean isQueryTrue(CycList query,
                           CycFort mt)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Returns true iff the ground query is true in the knowledge base.
Parameters:
query - the query to be asked in the knowledge base
mt - the microtheory in which the query is asked
Returns:
true iff the query is true in the knowledge base
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isQueryTrue_Cached

public boolean isQueryTrue_Cached(CycList query,
                                  CycFort mt)
                           throws java.io.IOException,
                                  CycApiException
Returns true iff the query is true in the knowledge base, implements a cache to avoid asking the same question twice from the KB.
Parameters:
query - the query to be asked in the knowledge base
mt - the microtheory in which the query is asked
Returns:
true iff the query is true in the knowledge base
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

countAllInstances

public int countAllInstances(CycFort collection,
                             CycFort mt)
                      throws java.io.IOException,
                             CycApiException
Returns the count of the instances of the given collection.
Parameters:
collection - the collection whose instances are counted
mt - microtheory (including its genlMts) in which the count is determined
Returns:
the count of the instances of the given collection
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

countAllInstances_Cached

public int countAllInstances_Cached(CycFort collection,
                                    CycFort mt)
                             throws java.io.IOException,
                                    CycApiException
Returns the count of the instances of the given collection, implements a cache to avoid asking the same question twice from the KB.
Parameters:
collection - the collection whose instances are counted
mt - microtheory (including its genlMts) in which the count is determined
Returns:
the count of the instances of the given collection
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getBackchainImplicationRules

public CycList getBackchainImplicationRules(CycConstant predicate,
                                            CycList formula,
                                            CycFort mt)
                                     throws java.io.IOException,
                                            java.net.UnknownHostException,
                                            CycApiException
Gets a list of the backchaining implication rules which might apply to the given rule.
Parameters:
predicate - the predicate for which backward chaining implication rules are sought
formula - the literal for which backward chaining implication rules are sought
mt - the microtheory (and its genlMts) in which the search for backchaining implication rules takes place
Returns:
a list of the backchaining implication rules which might apply to the given predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getForwardChainRules

public CycList getForwardChainRules(CycConstant predicate,
                                    CycList formula,
                                    CycFort mt)
                             throws java.io.IOException,
                                    java.net.UnknownHostException,
                                    CycApiException
Gets a list of the forward chaining implication rules which might apply to the given rule.
Parameters:
predicate - the predicate for which forward chaining implication rules are sought
formula - the literal for which forward chaining implication rules are sought
mt - the microtheory (and its genlMts) in which the search for forward chaining rules takes place
Returns:
a list of the forward chaining implication rules which might apply to the given predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getBackchainRules

public CycList getBackchainRules(CycConstant predicate,
                                 CycFort mt)
                          throws java.io.IOException,
                                 java.net.UnknownHostException,
                                 CycApiException
Gets a list of the backchaining implication rules which might apply to the given predicate.
Parameters:
predicate - the predicate for which backchaining rules are sought
mt - the microtheory (and its genlMts) in which the search for backchaining rules takes place
Returns:
a list of the backchaining implication rules which might apply to the given predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getForwardChainRules

public CycList getForwardChainRules(CycConstant predicate,
                                    CycFort mt)
                             throws java.io.IOException,
                                    java.net.UnknownHostException,
                                    CycApiException
Gets a list of the forward chaining implication rules which might apply to the given predicate.
Parameters:
predicate - the predicate for which forward chaining rules are sought
mt - the microtheory (and its genlMts) in which the search for forward chaining rules takes place
Returns:
a list of the forward chaining implication rules which might apply to the given predicate
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getSymbolValue

public java.lang.Object getSymbolValue(CycSymbol cycSymbol)
                                throws java.io.IOException,
                                       java.net.UnknownHostException,
                                       CycApiException
Gets the value of a given KB symbol. This is intended mainly for test case setup.
Parameters:
symbol - the KB symbol which will have a value bound
Returns:
the value assigned to the symbol
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

setSymbolValue

public void setSymbolValue(CycSymbol cycSymbol,
                           java.lang.Object value)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Sets a KB symbol to have the specified value. This is intended mainly for test case setup. If the symbol does not exist at the KB, then it will be created and assigned the value.
Parameters:
symbol - the KB symbol which will have a value bound
value - the value assigned to the symbol
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isWellFormedFormula

public boolean isWellFormedFormula(CycList cycList)
                            throws java.io.IOException,
                                   java.net.UnknownHostException,
                                   CycApiException
Returns true iff CycList represents a well formed formula.
Parameters:
cycList - the candidate well-formed-formula
Returns:
true iff cycList represents a well formed formula
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isBackchainRequired

public boolean isBackchainRequired(CycConstant predicate,
                                   CycFort mt)
                            throws java.io.IOException,
                                   CycApiException
Returns true iff backchain inference on the given predicate is required.
Parameters:
predicate - the CycConstant predicate for which backchaining required status is sought
mt - microtheory (including its genlMts) in which the backchaining required status is sought
Returns:
true iff backchain inference on the given predicate is required
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isBackchainEncouraged

public boolean isBackchainEncouraged(CycConstant predicate,
                                     CycFort mt)
                              throws java.io.IOException,
                                     CycApiException
Returns true iff backchain inference on the given predicate is encouraged.
Parameters:
predicate - the CycConstant predicate for which backchaining encouraged status is sought
mt - microtheory (including its genlMts) in which the backchaining encouraged status is sought
Returns:
true iff backchain inference on the given predicate is encouraged
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isBackchainDiscouraged

public boolean isBackchainDiscouraged(CycConstant predicate,
                                      CycFort mt)
                               throws java.io.IOException,
                                      CycApiException
Returns true iff backchain inference on the given predicate is discouraged.
Parameters:
predicate - the CycConstant predicate for which backchaining discouraged status is sought
mt - microtheory (including its genlMts) in which the backchaining discouraged status is sought
Returns:
true iff backchain inference on the given predicate is discouraged
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isBackchainForbidden

public boolean isBackchainForbidden(CycConstant predicate,
                                    CycFort mt)
                             throws java.io.IOException,
                                    CycApiException
Returns true iff backchain inference on the given predicate is forbidden.
Parameters:
predicate - the CycConstant predicate for which backchaining forbidden status is sought
mt - microtheory (including its genlMts) in which the backchaining forbidden status is sought
Returns:
true iff backchain inference on the given predicate is forbidden
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isIrreflexivePredicate

public boolean isIrreflexivePredicate(CycConstant predicate,
                                      CycFort mt)
                               throws java.io.IOException,
                                      CycApiException
Returns true iff the predicate has the irreflexive property: (#$isa ?PRED #$IrreflexsiveBinaryPredicate).
Parameters:
predicate - the CycConstant predicate for which irreflexive status is sought
mt - microtheory (including its genlMts) in which the irreflexive status is sought
Returns:
true iff the predicate has the irreflexive property: (#$isa ?PRED #$IrreflexsiveBinaryPredicate)
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

hasSomePredicateUsingTerm

public boolean hasSomePredicateUsingTerm(CycConstant predicate,
                                         CycFort term,
                                         java.lang.Integer argumentPosition,
                                         CycFort mt)
                                  throws java.io.IOException,
                                         CycApiException
Returns true iff any ground formula instances exist having the given predicate, and the given term in the given argument position.
Parameters:
term - the term present at the given argument position
predicate - the CycConstant predicate for the formula
argumentPosition - the argument position of the given term in the ground formula
mt - microtheory (including its genlMts) in which the existence is sought
Returns:
true iff any ground formula instances exist having the given predicate, and the given term in the given argument position
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

countUsingBestIndex

public int countUsingBestIndex(CycList formula,
                               CycFort mt)
                        throws java.io.IOException,
                               CycApiException
Returns the count of the assertions indexed according to the given pattern, using the best index (from among the predicate and argument indices). The formula can contain variables.
Parameters:
formula - the formula whose indexed instances are counted
mt - microtheory (including its genlMts) in which the count is determined
Returns:
the count of the assertions indexed according to the given pattern, using the best index (from among the predicate and argument indices)
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

importMucExpression

public int importMucExpression(CycList mucExpression,
                               java.lang.String mtName)
                        throws java.io.IOException,
                               CycApiException
Imports a MUC (Message Understanding Conference) formatted symbolic expression into cyc via the function which parses the expression and creates assertions for the contained concepts and relations between them.
Parameters:
mucExpression - the MUC (Message Understanding Conference) formatted symbolic expression
mtName - the name of the microtheory in which the imported assertions will be made
Returns:
the number of assertions imported from the input MUC expression
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

rkfPhraseReader

public CycList rkfPhraseReader(java.lang.String text,
                               CycFort parsingMt,
                               CycFort domainMt)
                        throws java.io.IOException,
                               CycApiException
Returns a list of parsing expressions, each consisting of a parsing span expression, and a list of parsed terms.
 (RKF-PHRASE-READER "penguins" #$RKFEnglishLexicalMicrotheoryPSC #$InferencePSC)
 ==>
 (((0) (#$Penguin #$PittsburghPenguins)))
 
Parameters:
text - the phrase to be parsed
parsingMt - the microtheory in which lexical info is asked
domainMt - the microtherory in which the info about candidate terms is asked
Returns:
a parsing expression consisting of a parsing span expression, and a list of parsed terms
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

generateDisambiguationPhraseAndTypes

public CycList generateDisambiguationPhraseAndTypes(CycList objects)
                                             throws java.io.IOException,
                                                    CycApiException
Returns a list of disambiguation expressions, corresponding to each of the terms in the given list of objects.
 (GENERATE-DISAMBIGUATION-PHRASES-AND-TYPES (QUOTE (#$Penguin #$PittsburghPenguins)))
 ==>
 ((#$Penguin "penguin" #$Bird "bird")
  (#$PittsburghPenguins "the Pittsburgh Penguins" #$IceHockeyTeam "ice hockey team"))
 
Parameters:
objects - the list of terms to be disambiguated
Returns:
a list of disambiguation expressions, corresponding to each of the terms in the given list of objects
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArity

public int getArity(CycFort predicate)
             throws java.io.IOException,
                    CycApiException
Returns the arity of the given predicate.
Parameters:
predicate - the given predicate whose number of arguments is sought
Returns:
the arity of the given predicate, or zero if the argument is not a predicate
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArg2s

public CycList getArg2s(CycFort predicate,
                        java.lang.Object arg1)
                 throws java.io.IOException,
                        CycApiException
Returns the list of arg2 values of binary gafs, given the predicate and arg1, looking in all microtheories.
Parameters:
predicate - the given predicate for the gaf pattern
arg1 - the given first argument of the gaf
Returns:
the list of arg2 values of the binary gafs
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getArg2

public java.lang.Object getArg2(CycFort predicate,
                                java.lang.Object arg1)
                         throws java.io.IOException,
                                CycApiException
Returns the single (first) arg2 value of a binary gaf, given the predicate and arg0, looking in all microtheories. Return null if none found.
Parameters:
predicate - the given predicate for the gaf pattern
arg1 - the given first argument of the gaf
Returns:
the single (first) arg2 value of the binary gaf(s)
Throws:
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isFormulaWellFormed

public boolean isFormulaWellFormed(CycList formula,
                                   CycFort mt)
                            throws java.io.IOException,
                                   java.net.UnknownHostException,
                                   CycApiException
Returns true if formula is well-formed in the relevant mt.
Parameters:
formula - the given EL formula
mt - the relevant mt
Returns:
true if formula is well-formed in the relevant mt, otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isCycLNonAtomicReifableTerm

public boolean isCycLNonAtomicReifableTerm(CycList formula)
                                    throws java.io.IOException,
                                           java.net.UnknownHostException,
                                           CycApiException
Returns true if formula is well-formed Non Atomic Reifable Term.
Parameters:
formula - the given EL formula
Returns:
true if formula is well-formed Non Atomic Reifable Term, otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isCycLNonAtomicUnreifableTerm

public boolean isCycLNonAtomicUnreifableTerm(CycList formula)
                                      throws java.io.IOException,
                                             java.net.UnknownHostException,
                                             CycApiException
Returns true if formula is well-formed Non Atomic Un-reifable Term.
Parameters:
formula - the given EL formula
Returns:
true if formula is well-formed Non Atomic Un-reifable Term, otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

createCollectorMt

public CycConstant createCollectorMt(java.lang.String mtName,
                                     java.lang.String comment,
                                     java.util.ArrayList genlMts)
                              throws java.io.IOException,
                                     CycApiException
Creates a new Collector microtheory and links it more general mts.
Parameters:
mtName - the name of the new collector microtheory
comment - the comment for the new collector microtheory
genlMts - the list of more general microtheories
Returns:
the new microtheory

assertIsas

public void assertIsas(java.util.ArrayList fortNames,
                       java.lang.String collectionName)
                throws java.io.IOException,
                       CycApiException
Asserts each of the given list of forts to be instances of the given collection in the UniversalVocabularyMt
Parameters:
fortNames - the list of forts
collectionName -  

assertIsas

public void assertIsas(java.util.ArrayList forts,
                       CycFort collection)
                throws java.io.IOException,
                       CycApiException
Asserts each of the given list of forts to be instances of the given collection in the UniversalVocabularyMt
Parameters:
forts - the list of forts
collection -  

createSpindleMt

public CycConstant createSpindleMt(java.lang.String spindleMtName,
                                   java.lang.String comment,
                                   java.lang.String spindleHeadMtName,
                                   java.lang.String spindleCollectorMtName)
                            throws java.io.IOException,
                                   CycApiException
Creates a new spindle microtheory in the given spindle system.
Parameters:
spindleMtName - the name of the new spindle microtheory
comment - the comment for the new spindle microtheory
spindleHeadMtName - the name of the spindle head microtheory
spindleCollectorMtName - the name of the spindle head microtheory
Returns:
the new spindle microtheory in the given spindle system

createSpindleMt

public CycConstant createSpindleMt(java.lang.String spindleMtName,
                                   java.lang.String comment,
                                   CycFort spindleHeadMt,
                                   CycFort spindleCollectorMt)
                            throws java.io.IOException,
                                   CycApiException
Creates a new spindle microtheory in the given spindle system.
Parameters:
spindleMtName - the name of the new spindle microtheory
comment - the comment for the new spindle microtheory
spindleHeadMt - the spindle head microtheory
spindleCollectorMt - the spindle head microtheory
Returns:
the new spindle microtheory in the given spindle system

createBinaryPredicate

public CycConstant createBinaryPredicate(java.lang.String predicateName,
                                         java.lang.String predicateTypeName,
                                         java.lang.String comment,
                                         java.lang.String arg1IsaName,
                                         java.lang.String arg2IsaName,
                                         java.lang.String arg1FormatName,
                                         java.lang.String arg2FormatName,
                                         java.lang.String genlPredsName,
                                         java.lang.String genFormatString,
                                         java.lang.String genFormatList)
                                  throws java.io.IOException,
                                         CycApiException
Creates a new binary predicate term.
Parameters:
predicateName - the name of the new binary predicate
predicateType - the type of binary predicate, for example #$TransitiveBinaryPredicate, which when null defaults to #$BinaryPredicate
comment - the comment for the new binary predicate, or null
arg1Isa - the argument position one type constraint, or null
ar2Isa - the argument position two type constraint, or null
arg1Format - the argument position one format constraint, or null
arg2Format - the argument position two format constraint, or null
genlsPreds - the more general binary predicate of which this new predicate is a specialization, that when null defaults to #$conceptuallyRelated
genFormat - the paraphrase generation string, or null
Returns:
the new binary predicate term

createBinaryPredicate

public CycConstant createBinaryPredicate(java.lang.String predicateName,
                                         CycFort predicateType,
                                         java.lang.String comment,
                                         CycFort arg1Isa,
                                         CycFort arg2Isa,
                                         CycFort arg1Format,
                                         CycFort arg2Format,
                                         CycFort genlPreds,
                                         java.lang.String genFormatString,
                                         CycList genFormatList)
                                  throws java.io.IOException,
                                         CycApiException
Creates a new binary predicate term.
Parameters:
predicateName - the name of the new binary predicate
predicateType - the type of binary predicate, for example #$TransitiveBinaryPredicate, which when null defaults to #$BinaryPredicate
comment - the comment for the new binary predicate, or null
arg1Isa - the argument position one type constraint, or null
ar2Isa - the argument position two type constraint, or null
arg1Format - the argument position one format constraint, or null
arg2Format - the argument position two format constraint, or null
genlsPreds - the more general binary predicate of which this new predicate is a specialization, that when null defaults to #$conceptuallyRelated
genFormat - the paraphrase generation string, or null
Returns:
the new binary predicate term

createKbSubsetCollection

public CycConstant createKbSubsetCollection(java.lang.String constantName,
                                            java.lang.String comment)
                                     throws java.io.IOException,
                                            CycApiException
Creates a new KB subset collection term.
Parameters:
constantName - the name of the new KB subset collection
comment - the comment for the new KB subset collection
Returns:
the new KB subset collection term

createCollection

public CycConstant createCollection(java.lang.String collectionName,
                                    java.lang.String comment,
                                    java.lang.String commentMtName,
                                    java.lang.String isaName,
                                    java.lang.String genlsName)
                             throws java.io.IOException,
                                    CycApiException
Creates a new collection term.
Parameters:
collectionName - the name of the new collection
comment - the comment for the collection
commentMtName - the name of the microtheory in which the comment is asserted
isaName - the name of the collection of which the new collection is an instance
genlsName - the name of the collection of which the new collection is a subset
Returns:
the new collection term

createCollection

public CycFort createCollection(java.lang.String collectionName,
                                java.lang.String comment,
                                CycFort commentMt,
                                CycFort isa,
                                CycFort genls)
                         throws java.io.IOException,
                                CycApiException
Creates a new collection term.
Parameters:
collection - the name of the new collection
comment - the comment for the collection
commentMt - the microtheory in which the comment is asserted
isa - the collection of which the new collection is an instance
genls - the collection of which the new collection is a subset
Returns:
the new collection term

createCollection

public CycFort createCollection(CycFort collection,
                                java.lang.String comment,
                                CycFort commentMt,
                                CycFort isa,
                                CycFort genls)
                         throws java.io.IOException,
                                CycApiException
Creates a new collection term.
Parameters:
collection - the new collection
comment - the comment for the collection
commentMt - the microtheory in which the comment is asserted
isa - the collection of which the new collection is an instance
genls - the collection of which the new collection is a subset
Returns:
the new collection term

createIndividual

public CycFort createIndividual(java.lang.String IndividualName,
                                java.lang.String comment,
                                java.lang.String commentMt,
                                java.lang.String isa)
                         throws java.io.IOException,
                                CycApiException
Creates a new individual term.
Parameters:
individual - the name of the new individual term
comment - the comment for the individual
commentMt - the microtheory in which the comment is asserted
isa - the collection of which the new individual is an instance
Returns:
the new individual term

createIndividual

public CycFort createIndividual(java.lang.String IndividualName,
                                java.lang.String comment,
                                CycFort commentMt,
                                CycFort isa)
                         throws java.io.IOException,
                                CycApiException
Creates a new individual term.
Parameters:
individual - the name of the new individual term
comment - the comment for the individual
commentMt - the microtheory in which the comment is asserted
isa - the collection of which the new individual is an instance
Returns:
the new individual term

createIndivDenotingUnaryFunction

public CycFort createIndivDenotingUnaryFunction(java.lang.String unaryFunction,
                                                java.lang.String comment,
                                                java.lang.String commentMt,
                                                java.lang.String arg1Isa,
                                                java.lang.String resultIsa)
                                         throws java.io.IOException,
                                                CycApiException
Creates a new individual-denoting reifiable unary function term.
Parameters:
unaryFunction - the new collection
comment - the comment for the unary function
commentMt - the microtheory in which the comment is asserted
isa - the collection of which the new unary function is an instance
arg1Isa - the kind of objects this unary function takes as its argument
resultIsa - the kind of object represented by this reified term
Returns:
the new individual-denoting reifiable unary function term

createIndivDenotingUnaryFunction

public CycFort createIndivDenotingUnaryFunction(CycFort unaryFunction,
                                                java.lang.String comment,
                                                CycFort commentMt,
                                                CycFort arg1Isa,
                                                CycFort resultIsa)
                                         throws java.io.IOException,
                                                CycApiException
Creates a new individual-denoting reifiable unary function term.
Parameters:
unaryFunction - the new collection
comment - the comment for the unary function
commentMt - the microtheory in which the comment is asserted
isa - the collection of which the new unary function is an instance
arg1Isa - the kind of objects this unary function takes as its argument
resultIsa - the kind of object represented by this reified term
Returns:
the new individual-denoting reifiable unary function term

createCollectionDenotingUnaryFunction

public CycFort createCollectionDenotingUnaryFunction(java.lang.String unaryFunction,
                                                     java.lang.String comment,
                                                     java.lang.String commentMt,
                                                     java.lang.String arg1Isa,
                                                     java.lang.String arg1GenlName,
                                                     java.lang.String resultIsa,
                                                     java.lang.String resultGenlName)
                                              throws java.io.IOException,
                                                     CycApiException
Creates a new collection-denoting reifiable unary function term.
Parameters:
unaryFunction - the new collection
comment - the comment for the unary function
commentMt - the microtheory in which the comment is asserted
isa - the collection of which the new unary function is an instance
arg1Isa - the isa type constraint for the argument
arg1GenlName - the genls type constraint for the argument if it is a collection
resultIsa - the isa object represented by this reified term
resultGenlName - the genls object represented by this reified term
Returns:
the new collection-denoting reifiable unary function term

createCollectionDenotingUnaryFunction

public CycFort createCollectionDenotingUnaryFunction(CycFort unaryFunction,
                                                     java.lang.String comment,
                                                     CycFort commentMt,
                                                     CycFort arg1Isa,
                                                     CycFort arg1Genl,
                                                     CycFort resultIsa,
                                                     CycFort resultGenl)
                                              throws java.io.IOException,
                                                     CycApiException
Creates a new collection-denoting reifiable unary function term.
Parameters:
unaryFunction - the new collection
comment - the comment for the unary function
commentMt - the microtheory in which the comment is asserted
arg1Isa - the isa type constraint for the argument
arg1Genl - the genls type constraint for the argument if it is a collection
resultIsa - the isa object represented by this reified term
resultGenl - the genls object represented by this reified term
Returns:
the new collection-denoting reifiable unary function term

createCollectionDenotingBinaryFunction

public CycFort createCollectionDenotingBinaryFunction(java.lang.String binaryFunction,
                                                      java.lang.String comment,
                                                      java.lang.String commentMt,
                                                      java.lang.String arg1IsaName,
                                                      java.lang.String arg2IsaName,
                                                      java.lang.String arg1GenlsName,
                                                      java.lang.String arg2GenlsName,
                                                      java.lang.String resultIsa)
                                               throws java.io.IOException,
                                                      CycApiException
Creates a new collection-denoting reifiable binary function term.
Parameters:
binaryFunction - the new collection
comment - the comment for the binary function
commentMt - the microtheory in which the comment is asserted
isa - the collection of which the new binary function is an instance
arg1Isa - the kind of objects this binary function takes as its first argument, or null
arg2Isa - the kind of objects this binary function takes as its second argument, or null
arg1Genls - the general collections this binary function takes as its first argument, or null
arg2Genls - the general collections this binary function takes as its second argument, or null
resultIsa - the kind of object represented by this reified term
Returns:
the new collection-denoting reifiable binary function term

createCollectionDenotingBinaryFunction

public CycFort createCollectionDenotingBinaryFunction(CycFort binaryFunction,
                                                      java.lang.String comment,
                                                      CycFort commentMt,
                                                      CycFort arg1Isa,
                                                      CycFort arg2Isa,
                                                      CycFort arg1Genls,
                                                      CycFort arg2Genls,
                                                      CycFort resultIsa)
                                               throws java.io.IOException,
                                                      CycApiException
Creates a new collection-denoting reifiable binary function term.
Parameters:
binaryFunction - the new collection
comment - the comment for the binary function
commentMt - the microtheory in which the comment is asserted
isa - the collection of which the new binary function is an instance
arg1Isa - the kind of objects this binary function takes as its first argument, or null
arg2Isa - the kind of objects this binary function takes as its first argument, or null
arg1Genls - the general collections this binary function takes as its first argument, or null
arg2Genls - the general collections this binary function takes as its second argument, or null
resultIsa - the kind of object represented by this reified term
Returns:
the new collection-denoting reifiable binary function term

assertArgIsa

public void assertArgIsa(CycFort relation,
                         int argPosition,
                         CycFort argNIsa)
                  throws java.io.IOException,
                         java.net.UnknownHostException,
                         CycApiException
Assert an argument isa contraint for the given relation and argument position. The operation will be added to the KB transcript for replication and archive.
Parameters:
relation - the given relation
argPosition - the given argument position
argNIsa - the argument constraint
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertArg1Genl

public void assertArg1Genl(CycFort relation,
                           CycFort argGenl)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Assert an argument one genls contraint for the given relation. The operation will be added to the KB transcript for replication and archive.
Parameters:
relation - the given relation
argGenl - the argument constraint
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertArg2Genl

public void assertArg2Genl(CycFort relation,
                           CycFort argGenl)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Assert an argument two genls contraint for the given relation. The operation will be added to the KB transcript for replication and archive.
Parameters:
relation - the given relation
argGenl - the argument constraint
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertArg3Genl

public void assertArg3Genl(CycFort relation,
                           CycFort argGenl)
                    throws java.io.IOException,
                           java.net.UnknownHostException,
                           CycApiException
Assert an argument three genls contraint for the given relation. The operation will be added to the KB transcript for replication and archive.
Parameters:
relation - the given relation
argGenl - the argument constraint
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertResultIsa

public void assertResultIsa(CycFort denotationalFunction,
                            CycFort resultIsa)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Assert the isa result contraint for the given denotational function. The operation will be added to the KB transcript for replication and archive.
Parameters:
denotationalFunction - the given denotational function
resultIsa - the function's isa result constraint
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertResultGenl

public void assertResultGenl(CycFort denotationalFunction,
                             CycFort resultGenl)
                      throws java.io.IOException,
                             java.net.UnknownHostException,
                             CycApiException
Assert the genls result contraint for the given denotational function. The operation will be added to the KB transcript for replication and archive.
Parameters:
denotationalFunction - the given denotational function
resultGenl - the function's genls result constraint
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

isOpenCyc

public boolean isOpenCyc()
                  throws java.io.IOException,
                         java.net.UnknownHostException
Returns true if this KB is OpenCyc.
Returns:
true if this KB is OpenCyc, otherwise false
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

constantNameCaseCollision

public CycConstant constantNameCaseCollision(java.lang.String name)
                                      throws java.io.IOException,
                                             java.net.UnknownHostException,
                                             CycApiException
Returns a constant whose name differs from the given name only by case. Used because Cyc by default requires constant names to be unique by case.
Parameters:
name - the name used to lookup an existing constant
Returns:
a constant whose name differs from the given name only by case, otherwise null if none exists
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

getApplicableBinaryPredicates

public CycList getApplicableBinaryPredicates(CycList kbSubsetCollections)
                                      throws java.io.IOException,
                                             java.net.UnknownHostException,
                                             CycApiException
Returns the list of applicable binary predicates which are elements of any of the given list of KBSubsetCollections.
Parameters:
kbSubSetCollections - the list of KBSubsetCollections
Returns:
the list of applicable binary predicates which are elements of any of the given list of KBSubsetCollections

getGafs

public CycList getGafs(CycFort cycFort,
                       CycList predicates,
                       CycFort mt)
                throws java.io.IOException,
                       java.net.UnknownHostException,
                       CycApiException
Returns the list of gafs in which the predicate is a element of the given list of predicates and in which the given term appears in the first argument position.
Parameters:
cycFort - the given term
predicates - the given list of predicates
mt - the relevant inference microtheory
Returns:
the list of gafs in which the predicate is a element of the given list of predicates and in which the given term appears in the first argument position

getGafs

public CycList getGafs(CycFort cycFort,
                       CycFort predicate,
                       CycFort mt)
                throws java.io.IOException,
                       java.net.UnknownHostException,
                       CycApiException
Returns the list of gafs in which the predicate is the given predicate and in which the given term appears in the first argument position.
Parameters:
cycFort - the given term
predicate - the given predicate
mt - the relevant inference microtheory
Returns:
the list of gafs in which the predicate is a element of the given list of predicates and in which the given term appears in the first argument position

getGafs

public CycList getGafs(CycFort cycFort,
                       CycList predicates)
                throws java.io.IOException,
                       java.net.UnknownHostException,
                       CycApiException
Returns the list of gafs in which the predicate is a element of the given list of predicates and in which the given term appears in the first argument position.
Parameters:
cycFort - the given term
predicates - the given list of predicates
Returns:
the list of gafs in which the predicate is a element of the given list of predicates and in which the given term appears in the first argument position

getGafs

public CycList getGafs(CycFort cycFort,
                       CycFort predicate)
                throws java.io.IOException,
                       java.net.UnknownHostException,
                       CycApiException
Returns the list of gafs in which the predicate is the given predicate and in which the given term appears in the first argument position.
Parameters:
cycFort - the given term
predicate - the given predicate
Returns:
the list of gafs in which the predicate is a element of the given list of predicates and in which the given term appears in the first argument position

assertArg1FormatSingleEntry

public void assertArg1FormatSingleEntry(CycFort relation)
                                 throws java.io.IOException,
                                        java.net.UnknownHostException,
                                        CycApiException
Assert an argument contraint for the given relation and argument position. The operation will be added to the KB transcript for replication and archive.
Parameters:
relation - the given relation
argPosition - the given argument position
argNIsa - the argument constraint
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertArgFormat

public void assertArgFormat(CycFort relation,
                            int argPosition,
                            CycFort argNFormat)
                     throws java.io.IOException,
                            java.net.UnknownHostException,
                            CycApiException
Assert an argument format contraint for the given relation and argument position. The operation will be added to the KB transcript for replication and archive.
Parameters:
relation - the given relation
argPosition - the given argument position
argNFormat - the argument format constraint
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

assertSynonymousExternalConcept

public void assertSynonymousExternalConcept(java.lang.String cycTerm,
                                            java.lang.String informationSource,
                                            java.lang.String externalConcept,
                                            java.lang.String mt)
                                     throws java.io.IOException,
                                            java.net.UnknownHostException,
                                            CycApiException
Asserts that the given DAML imported term is mapped to the given Cyc term.
Parameters:
cycTerm - the mapped Cyc term
informationSource - the external indexed information source
externalConcept - the external concept within the information source
mt - the assertion microtheory

assertSynonymousExternalConcept

public void assertSynonymousExternalConcept(CycFort cycTerm,
                                            CycFort informationSource,
                                            java.lang.String externalConcept,
                                            CycFort mt)
                                     throws java.io.IOException,
                                            java.net.UnknownHostException,
                                            CycApiException
Asserts that the given DAML imported term is mapped to the given Cyc term.
Parameters:
cycTerm - the mapped Cyc term
informationSource - the external indexed information source
externalConcept - the external concept within the information source
mt - the assertion microtheory

getSynonymousExternalConcepts

public CycList getSynonymousExternalConcepts(java.lang.String informationSource,
                                             java.lang.String mt)
                                      throws java.io.IOException,
                                             java.net.UnknownHostException,
                                             CycApiException
Gets the list of mappings from the specified information source given the inference microtheory. Each returned list item is the pair consisting of external concept string and synonymous Cyc term.
Parameters:
informationSource - the external indexed information source
mt - the assertion microtheory

getSynonymousExternalConcepts

public CycList getSynonymousExternalConcepts(CycFort informationSource,
                                             CycFort mt)
                                      throws java.io.IOException,
                                             java.net.UnknownHostException,
                                             CycApiException
Gets the list of mappings from the specified information source given the inference microtheory. Each returned list item is the pair consisting of external concept string and synonymous Cyc term.
Parameters:
informationSource - the external indexed information source
mt - the assertion microtheory

assertGenPhraseCountNounSingular

public void assertGenPhraseCountNounSingular(CycFort cycTerm,
                                             java.lang.String phrase)
                                      throws java.io.IOException,
                                             java.net.UnknownHostException,
                                             CycApiException
Asserts a preferred name string for the given term using lexical singular count noun assumptions.
Parameters:
cycTerm - the Cyc term
phrase - the preferred phrase for this term

assertGenPhraseCountNounPlural

public void assertGenPhraseCountNounPlural(CycFort cycTerm,
                                           java.lang.String phrase)
                                    throws java.io.IOException,
                                           java.net.UnknownHostException,
                                           CycApiException
Asserts a preferred name string for the given term using lexical singular count noun assumptions.
Parameters:
cycTerm - the Cyc term
phrase - the preferred phrase for this term

getNameStrings

public CycList getNameStrings(CycFort cycFort,
                              CycFort mt)
                       throws java.io.IOException,
                              java.net.UnknownHostException,
                              CycApiException
Gets the list of name strings for the given CycFort.
Parameters:
cycFort - the given FORT
mt - the relevant inference microtheory
Returns:
the list of name strings for the given CycFort
Throws:
java.net.UnknownHostException - if cyc server host not found on the network
java.io.IOException - if a data communication error occurs
CycApiException - if the api request results in a cyc server error

ensureWffConstraints

public void ensureWffConstraints(java.lang.String cycFort,
                                 java.lang.String isaConstraintName,
                                 java.lang.String genlsConstraintName)
                          throws java.io.IOException,
                                 java.net.UnknownHostException,
                                 CycApiException
Ensures that the given term meets the given isa and genl wff constraints in the UniversalVocabularyMt.
Parameters:
cycFort - the given term
isaConstraintName - the given isa type constraint, or null
genlsConstraintName - the given genls type constraint, or null

ensureWffConstraints

public void ensureWffConstraints(CycFort cycFort,
                                 CycFort isaConstraint,
                                 CycFort genlsConstraint)
                          throws java.io.IOException,
                                 java.net.UnknownHostException,
                                 CycApiException
Ensures that the given term meets the given isa and genl wff constraints in the UniversalVocabularyMt.
Parameters:
cycFort - the given term
isaConstraint - the given isa type constraint, or null
genlsConstraint - the given genls type constraint, or null

getArg2s

public CycList getArg2s(java.lang.String predicate,
                        java.lang.String arg1,
                        java.lang.String mt)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Returns the list of arg2 terms from gafs having the specified predicate and arg1 values.
Parameters:
predicate - the given predicate
arg1 - the given arg1 term
mt - the inference microtheory
Returns:
the list of arg2 terms from gafs having the specified predicate and arg1 values

getArg2s

public CycList getArg2s(CycFort predicate,
                        CycFort arg1,
                        CycFort mt)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Returns the list of arg2 terms from gafs having the specified predicate and arg1 values.
Parameters:
predicate - the given predicate
arg1 - the given arg1 term
mt - the inference microtheory
Returns:
the list of arg2 terms from gafs having the specified predicate and arg1 values

getArg2

public java.lang.Object getArg2(java.lang.String predicate,
                                java.lang.String arg1,
                                java.lang.String mt)
                         throws java.io.IOException,
                                java.net.UnknownHostException,
                                CycApiException
Returns the first arg2 term from gafs having the specified predicate and arg1 values.
Parameters:
predicate - the given predicate
arg1 - the given arg1 term
mt - the inference microtheory
Returns:
the first arg2 term from gafs having the specified predicate and arg1 values or null if none

getArg2

public java.lang.Object getArg2(java.lang.String predicate,
                                CycFort arg1,
                                CycFort mt)
                         throws java.io.IOException,
                                java.net.UnknownHostException,
                                CycApiException
Returns the first arg2 term from gafs having the specified predicate and arg1 values.
Parameters:
predicate - the given predicate
arg1 - the given arg1 term
mt - the inference microtheory
Returns:
the first arg2 term from gafs having the specified predicate and arg1 values or null if none

getArg2

public java.lang.Object getArg2(CycFort predicate,
                                CycFort arg1,
                                CycFort mt)
                         throws java.io.IOException,
                                java.net.UnknownHostException,
                                CycApiException
Returns the first arg2 term from gafs having the specified predicate and arg1 values.
Parameters:
predicate - the given predicate
arg1 - the given arg1 term
mt - the inference microtheory
Returns:
the first arg2 term from gafs having the specified predicate and arg1 values or null if none

getArg1s

public CycList getArg1s(java.lang.String predicate,
                        java.lang.String arg2,
                        java.lang.String mt)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Returns the list of arg1 terms from gafs having the specified predicate and arg2 values.
Parameters:
predicate - the given predicate
arg2 - the given arg2 term
mt - the inference microtheory
Returns:
the list of arg1 terms from gafs having the specified predicate and arg2 values

getArg1s

public CycList getArg1s(CycFort predicate,
                        CycFort arg2,
                        CycFort mt)
                 throws java.io.IOException,
                        java.net.UnknownHostException,
                        CycApiException
Returns the list of arg1 terms from gafs having the specified predicate and arg2 values.
Parameters:
predicate - the given predicate
arg2 - the given arg2 term
mt - the inference microtheory
Returns:
the list of arg1 terms from gafs having the specified predicate and arg2 values