|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opencyc.inferencesupport.BindingSet
BindingSet object to contain bindings for query literals.
Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.
THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Field Summary | |
protected java.util.ArrayList |
bindingValues
The list of binding value lists associated with each variable, which is not used for cartesian product joins. |
protected java.util.ArrayList |
cartesianProductBindingSets
The set of binding sets comprising a cartesian product join, which is not actually instantiatiated to save space. |
protected CycFort |
mt
The microtheory in which the variable bindings were obtained |
protected QueryLiteral |
queryLiteral
The literal for which these bindings were obtained. |
Constructor Summary | |
BindingSet(QueryLiteral queryLiteral,
CycFort mt)
Constructs a new BindingSet object with the given QueryLiteral. |
Method Summary | |
void |
add(CycList bindingValueList)
Adds a binding value list to the binding set. |
void |
addAll(java.util.ArrayList bindingValueLists)
Adds a list of binding value lists to the binding set. |
int |
compareTo(java.lang.Object object)
Compares this object with the specified object for order. |
void |
displayBindingSet()
Displays the binding set. |
boolean |
equals(java.lang.Object object)
Returns true if the object equals this object. |
java.util.ArrayList |
getBindingValues()
Gets the binding values for this binding set. |
java.util.ArrayList |
getCartesianProductBindingSets()
Returns the set of binding sets comprising a cartesian product join, which is not actually instantiatiated to save space. |
CycFort |
getMt()
Returns the microtheory in which the variable bindings were obtained. |
int |
getNbrInstances()
Gets the number of instances of this literal in the KB. |
QueryLiteral |
getQueryLiteral()
Returns the literal for this binding set. |
java.util.ArrayList |
getVariables()
Returns the variables in this binding set. |
boolean |
isBindingPostponed()
Returns true iff the asking of the binding values has been postponed (due to the estimated number of KB instances exceeding a user-controlled threshold). |
boolean |
isCartesianProduct()
Returns true iff the binding set has the form of an uninstantiated cartesian product. |
boolean |
isUnary()
Returns true iff this is a formula having one variable. |
void |
setBindingValues(java.util.ArrayList bindingValues)
Sets the binding values for this binding set. |
void |
setCartesianProductBindingSets(java.util.ArrayList cartesianProductBindingSets)
Sets the set of binding sets comprising a cartesian product join. |
void |
setNbrInstances(int nbrFormulaInstances)
Sets the number of instances of this literal in the KB. |
int |
size()
Returns the size of the binding set for this literal. |
java.lang.String |
toString()
Returns a String representation of the BindingSet object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected QueryLiteral queryLiteral
protected CycFort mt
protected java.util.ArrayList cartesianProductBindingSets
protected java.util.ArrayList bindingValues
Constructor Detail |
public BindingSet(QueryLiteral queryLiteral, CycFort mt) throws java.io.IOException, CycApiException
queryLiteral
- the literal for which bindings are obtainedmt
- the microtheory in which the variable bindings are obtainedMethod Detail |
public QueryLiteral getQueryLiteral()
public java.util.ArrayList getBindingValues()
public void setBindingValues(java.util.ArrayList bindingValues)
bindingValues
- the list of binding value lists associated with each variable,public void add(CycList bindingValueList)
bindingValueList
- the list of values to be added to the binding set. The values are
ordered to correspond with the order of the variables for this binding set's query literal.public void addAll(java.util.ArrayList bindingValueLists)
bindingValueLists
- the list of binding value lists to be added to the binding setpublic void setNbrInstances(int nbrFormulaInstances)
nbrFormulaInstances
- the number of instances of this literal in the KBpublic int getNbrInstances()
public boolean isBindingPostponed()
public int size()
public java.util.ArrayList getVariables()
public CycFort getMt()
public void displayBindingSet()
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- the object for comparisonpublic int compareTo(java.lang.Object object)
compareTo
in interface java.lang.Comparable
object
- the reference object with which to compare.public java.lang.String toString()
toString
in class java.lang.Object
public boolean isUnary()
public boolean isCartesianProduct()
public java.util.ArrayList getCartesianProductBindingSets()
public void setCartesianProductBindingSets(java.util.ArrayList cartesianProductBindingSets)
cartesianProductBindingSets
- the set of binding sets comprising a cartesian product join
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |