Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mindswap.pellet
Class ABox

    java.lang.Object
      org.mindswap.pellet.ABox

    public class ABox

extends java.lang.Object

Author:
  Evren Sirin

Field Summary
`long` | `consistencyCount` Total number of ABox consistency checks (for statistical purposes)
`static boolean` | `DEBUG` Deprecated. Use log4j.properties instead
`static org.apache.commons.logging.Log` | `log`
`boolean` | `ranRete`
`boolean` | `rulesNotApplied`
`long` | `satisfiabilityCount` Total number of satisfiability tests performed (for statistical purposes)
`java.util.Map` | `stats`
`int` | `treeDepth` size of the completion tree for statistical purposes
`boolean` | `useRete`

Constructor Summary
`ABox()`
`ABox(ABox abox)`
`ABox(ABox abox, aterm.ATermAppl extraIndividual, boolean copyIndividuals)`
`ABox(KnowledgeBase kb)`

Method Summary
`void` | `addAllDifferent(aterm.ATermList list)`
`void` | `addDifferent(aterm.ATermAppl x, aterm.ATermAppl y)`
`Individual` | `addIndividual(aterm.ATermAppl x)`
`Literal` | `addLiteral()` Add a new literal to the ABox.
`Literal` | `addLiteral(aterm.ATermAppl dataValue)` Add a new literal to the ABox.
`Literal` | `addLiteral(aterm.ATermAppl dataValue, DependencySet ds)`
`void` | `addSame(aterm.ATermAppl x, aterm.ATermAppl y)`
`void` | `addType(aterm.ATermAppl x, aterm.ATermAppl c)`
`void` | `addType(aterm.ATermAppl x, aterm.ATermAppl c, DependencySet ds)`
`void` | `clearCaches(boolean clearSatCache)` Clear the pseudo model created for the ABox and concept satisfiability.
`java.lang.Object` | `clone()`
`ABox` | `copy()` Create a copy of this ABox with all the nodes and edges.
`ABox` | `copy(aterm.ATermAppl extraIndividual, boolean copyIndividuals)` Create a copy of this ABox with one more additional individual.
`void` | `copyOnWrite()`
`boolean` | `doExplanation()` Checks if the explanation is turned on.
`ConceptCache` | `getAllCached()` Deprecated. Use `getCache()`
`java.util.List<org.mindswap.pellet.Branch>` | `getBranches()` Returns the branches.
`ConceptCache` | `getCache()`
`CachedNode` | `getCached(aterm.ATermAppl c)`
`Bool` | `getCachedSat(aterm.ATermAppl c)`
`Clash` | `getClash()`
`CompletionQueue` | `getCompletionQueue()`
`java.util.List<aterm.ATermAppl>` | `getDataPropertyValues(aterm.ATermAppl s, Role role, Datatype datatype)`
`java.util.List<aterm.ATermAppl>` | `getDataPropertyValues(aterm.ATermAppl s, Role role, Datatype datatype, boolean onlyObvious)`
`DatatypeReasoner` | `getDatatypeReasoner()`
`java.lang.String` | `getExplanation()`
`java.util.Set<aterm.ATermAppl>` | `getExplanationSet()`
`org.mindswap.pellet.IndividualIterator` | `getIndIterator()` Return individuals to which we need to apply the tableau rules
`Individual` | `getIndividual(aterm.ATerm x)`
`EdgeList` | `getInEdges(aterm.ATerm x)`
`KnowledgeBase` | `getKB()`
`Clash` | `getLastClash()`
`ABox` | `getLastCompletion()`
`Literal` | `getLiteral(aterm.ATerm x)`
`Node` | `getNode(aterm.ATerm x)`
`java.util.List` | `getNodeNames()`
`java.util.Collection<Node>` | `getNodes()`
`void` | `getObjectPropertyValues(aterm.ATermAppl s, Role role, java.util.Set<aterm.ATermAppl> knowns, java.util.Set<aterm.ATermAppl> unknowns, boolean getSames)`
`java.util.List` | `getObviousDataPropertyValues(aterm.ATermAppl s, Role prop, Datatype datatype)`
`CandidateSet` | `getObviousInstances(aterm.ATermAppl c)`
`CandidateSet` | `getObviousInstances(aterm.ATermAppl c, java.util.Collection individuals)`
`void` | `getObviousObjects(aterm.ATermAppl p, CandidateSet candidates)`
`CandidateSet` | `getObviousSubjects(aterm.ATermAppl p, aterm.ATermAppl o)`
`void` | `getObviousSubjects(aterm.ATermAppl p, aterm.ATermAppl o, CandidateSet candidates)`
`void` | `getObviousTypes(aterm.ATermAppl x, java.util.List<aterm.ATermAppl> types, java.util.List<aterm.ATermAppl> nonTypes)`
`EdgeList` | `getOutEdges(aterm.ATerm x)`
`java.util.Set<Role>` | `getPossibleProperties(aterm.ATermAppl s)`
`ABox` | `getPseudoModel()`
`RBox` | `getRBox()` Return the RBox
`Role` | `getRole(aterm.ATerm r)` Convenience function to get the named role.
`void` | `getSames(Individual ind, java.util.Set<aterm.ATermAppl> knowns, java.util.Set<aterm.ATermAppl> unknowns)`
`void` | `getSubjects(aterm.ATermAppl p, aterm.ATermAppl o, CandidateSet candidates)`
`TBox` | `getTBox()` Return the TBox
`Bool` | `hasObviousDataPropertyValue(aterm.ATermAppl s, aterm.ATermAppl p, java.lang.Object value)`
`Bool` | `hasObviousObjectPropertyValue(aterm.ATermAppl s, aterm.ATermAppl p, aterm.ATermAppl o)`
`Bool` | `hasObviousPropertyValue(aterm.ATermAppl s, aterm.ATermAppl p, aterm.ATermAppl o)`
`boolean` | `hasPropertyValue(aterm.ATermAppl s, aterm.ATermAppl p, aterm.ATermAppl o)`
`boolean` | `isClosed()` Returns true if Abox has a clash.
`boolean` | `isComplete()`
`boolean` | `isConsistent()` Return true if this ABox is consistent.
`boolean` | `isEmpty()` Returns true if there are no individuals in the ABox.
`boolean` | `isInitialized()` Check if the ABox is ready to be completed.
`boolean` | `isKeepLastCompletion()`
`Bool` | `isKnownSubClassOf(aterm.ATermAppl c1, aterm.ATermAppl c2)`
`Bool` | `isKnownType(aterm.ATermAppl x, aterm.ATermAppl c)`
`Bool` | `isKnownType(aterm.ATermAppl x, aterm.ATermAppl c, java.util.Collection subs)`
`Bool` | `isKnownType(Individual pNode, aterm.ATermAppl concept, java.util.Collection subs)`
`boolean` | `isNode(aterm.ATerm x)`
`boolean` | `isSameAs(aterm.ATermAppl ind1, aterm.ATermAppl ind2)`
`boolean` | `isSatisfiable(aterm.ATermAppl c)`
`boolean` | `isSatisfiable(aterm.ATermAppl c, boolean cacheModel)`
`boolean` | `isSubClassOf(aterm.ATermAppl c1, aterm.ATermAppl c2)`
`boolean` | `isType(aterm.ATermAppl x, aterm.ATermAppl c)` Returns true if individual x belongs to type c.
`boolean` | `isType(java.util.List inds, aterm.ATermAppl c)` Returns true if any of the individuals in the given list belongs to type c.
`void` | `printTree()` Print the ABox as a completion tree (child nodes are indented).
`void` | `removeIndividual(aterm.ATermAppl c)`
`void` | `removeType(aterm.ATermAppl x, aterm.ATermAppl c)`
`void` | `setClash(Clash clash)`
`void` | `setDoExplanation(boolean doExplanation)` Enable/disable explanation generation
`void` | `setInitialized(boolean initialized)`
`void` | `setKeepLastCompletion(boolean keepLastCompletion)`
`void` | `setLastCompletion(ABox comp)`
`int` | `size()` Return the number of nodes in the ABox.
`java.lang.String` | `toString()`
`void` | `validate()` Validate all the edges in the ABox nodes.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### log

    public static final org.apache.commons.logging.Log log

### DEBUG

    public static boolean DEBUG

  Deprecated. Use log4j.properties instead

### satisfiabilityCount

    public long satisfiabilityCount

  Total number of satisfiability tests performed (for statistical purposes)

### consistencyCount

    public long consistencyCount

  Total number of ABox consistency checks (for statistical purposes)

### treeDepth

    public int treeDepth

  size of the completion tree for statistical purposes

### rulesNotApplied

    public boolean rulesNotApplied

### ranRete

    public boolean ranRete

### useRete

    public boolean useRete

### stats

    public java.util.Map stats

Constructor Detail

### ABox

    public ABox()

### ABox

    public ABox(KnowledgeBase kb)

### ABox

    public ABox(ABox abox)

### ABox

    public ABox(ABox abox,
                aterm.ATermAppl extraIndividual,
                boolean copyIndividuals)

Method Detail

### copy

    public ABox copy()

  Create a copy of this ABox with all the nodes and edges.

  Returns:

### clone

    public java.lang.Object clone()

  Overrides:
    `clone` in class `java.lang.Object`

### copy

    public ABox copy(aterm.ATermAppl extraIndividual,
                     boolean copyIndividuals)

  Create a copy of this ABox with one more additional individual. This is NOT equivalent to create a copy and then add the individual. The order of individuals in the ABox is important to figure out which individuals exist in the original ontology and which ones are created by the tableau algorithm. This function creates a new ABox such that the individual is supposed to exist in the original ontology. This is very important when satisfiability of a concept starts with a pesudo model rather than the initial ABox.

  Parameters:
    `extraIndividual` - Extra individual to be added to the copy ABox
  Returns:

### copyOnWrite

    public void copyOnWrite()

### clearCaches

    public void clearCaches(boolean clearSatCache)

  Clear the pseudo model created for the ABox and concept satisfiability.

  Parameters:
    `clearSatCache` - If true clear concept satisfiability cache, if false only clear pseudo model.

### getCachedSat

    public Bool getCachedSat(aterm.ATermAppl c)

### getAllCached

    public ConceptCache getAllCached()

  Deprecated. Use `getCache()`

### getCache

    public ConceptCache getCache()

### getCached

    public CachedNode getCached(aterm.ATermAppl c)

### isKnownSubClassOf

    public Bool isKnownSubClassOf(aterm.ATermAppl c1,
                                  aterm.ATermAppl c2)

### isSubClassOf

    public boolean isSubClassOf(aterm.ATermAppl c1,
                                aterm.ATermAppl c2)

### isSatisfiable

    public boolean isSatisfiable(aterm.ATermAppl c)

### isSatisfiable

    public boolean isSatisfiable(aterm.ATermAppl c,
                                 boolean cacheModel)

### getObviousInstances

    public CandidateSet getObviousInstances(aterm.ATermAppl c)

### getObviousInstances

    public CandidateSet getObviousInstances(aterm.ATermAppl c,
                                            java.util.Collection individuals)

### getObviousTypes

    public void getObviousTypes(aterm.ATermAppl x,
                                java.util.List<aterm.ATermAppl> types,
                                java.util.List<aterm.ATermAppl> nonTypes)

### getObviousSubjects

    public CandidateSet getObviousSubjects(aterm.ATermAppl p,
                                           aterm.ATermAppl o)

### getSubjects

    public void getSubjects(aterm.ATermAppl p,
                            aterm.ATermAppl o,
                            CandidateSet candidates)

### getObviousSubjects

    public void getObviousSubjects(aterm.ATermAppl p,
                                   aterm.ATermAppl o,
                                   CandidateSet candidates)

### getObviousObjects

    public void getObviousObjects(aterm.ATermAppl p,
                                  CandidateSet candidates)

### isKnownType

    public Bool isKnownType(aterm.ATermAppl x,
                            aterm.ATermAppl c)

### isKnownType

    public Bool isKnownType(aterm.ATermAppl x,
                            aterm.ATermAppl c,
                            java.util.Collection subs)

### isKnownType

    public Bool isKnownType(Individual pNode,
                            aterm.ATermAppl concept,
                            java.util.Collection subs)

### isSameAs

    public boolean isSameAs(aterm.ATermAppl ind1,
                            aterm.ATermAppl ind2)

### isType

    public boolean isType(aterm.ATermAppl x,
                          aterm.ATermAppl c)

  Returns true if individual x belongs to type c. This is a logical consequence of the KB if in all possible models x belongs to C. This is checked by trying to construct a model where x belongs to not(c).

  Parameters:
    `x` -
    `c` -
  Returns:

### isType

    public boolean isType(java.util.List inds,
                          aterm.ATermAppl c)

  Returns true if any of the individuals in the given list belongs to type c.

  Parameters:
    `c` -
    `inds` -
  Returns:

### hasObviousPropertyValue

    public Bool hasObviousPropertyValue(aterm.ATermAppl s,
                                        aterm.ATermAppl p,
                                        aterm.ATermAppl o)

### hasObviousDataPropertyValue

    public Bool hasObviousDataPropertyValue(aterm.ATermAppl s,
                                            aterm.ATermAppl p,
                                            java.lang.Object value)

### hasObviousObjectPropertyValue

    public Bool hasObviousObjectPropertyValue(aterm.ATermAppl s,
                                              aterm.ATermAppl p,
                                              aterm.ATermAppl o)

### hasPropertyValue

    public boolean hasPropertyValue(aterm.ATermAppl s,
                                    aterm.ATermAppl p,
                                    aterm.ATermAppl o)

### getPossibleProperties

    public java.util.Set<Role> getPossibleProperties(aterm.ATermAppl s)

### getDataPropertyValues

    public java.util.List<aterm.ATermAppl> getDataPropertyValues(aterm.ATermAppl s,
                                                                 Role role,
                                                                 Datatype datatype)

### getDataPropertyValues

    public java.util.List<aterm.ATermAppl> getDataPropertyValues(aterm.ATermAppl s,
                                                                 Role role,
                                                                 Datatype datatype,
                                                                 boolean onlyObvious)

### getObviousDataPropertyValues

    public java.util.List getObviousDataPropertyValues(aterm.ATermAppl s,
                                                       Role prop,
                                                       Datatype datatype)

### getObjectPropertyValues

    public void getObjectPropertyValues(aterm.ATermAppl s,
                                        Role role,
                                        java.util.Set<aterm.ATermAppl> knowns,
                                        java.util.Set<aterm.ATermAppl> unknowns,
                                        boolean getSames)

### getSames

    public void getSames(Individual ind,
                         java.util.Set<aterm.ATermAppl> knowns,
                         java.util.Set<aterm.ATermAppl> unknowns)

### isConsistent

    public boolean isConsistent()

  Return true if this ABox is consistent. Consistent ABox means after applying all the tableau completion rules at least one branch with no clashes was found

  Returns:

### getInEdges

    public EdgeList getInEdges(aterm.ATerm x)

### getOutEdges

    public EdgeList getOutEdges(aterm.ATerm x)

### getIndividual

    public Individual getIndividual(aterm.ATerm x)

### getLiteral

    public Literal getLiteral(aterm.ATerm x)

### getNode

    public Node getNode(aterm.ATerm x)

### addType

    public void addType(aterm.ATermAppl x,
                        aterm.ATermAppl c)

### addType

    public void addType(aterm.ATermAppl x,
                        aterm.ATermAppl c,
                        DependencySet ds)

### removeType

    public void removeType(aterm.ATermAppl x,
                           aterm.ATermAppl c)

### addLiteral

    public Literal addLiteral()

  Add a new literal to the ABox. This function is used only when the literal value does not have a known value, e.g. applyMinRule would create such a literal.

  Returns:

### addLiteral

    public Literal addLiteral(aterm.ATermAppl dataValue)

  Add a new literal to the ABox. Literal will be assigned a fresh unique name.

  Parameters:
    `dataValue` - A literal ATerm which should be constructed with one of ATermUtils.makeXXXLiteral functions
  Returns:
    Literal object that has been created

### addLiteral

    public Literal addLiteral(aterm.ATermAppl dataValue,
                              DependencySet ds)

### addIndividual

    public Individual addIndividual(aterm.ATermAppl x)

### removeIndividual

    public void removeIndividual(aterm.ATermAppl c)

### addSame

    public void addSame(aterm.ATermAppl x,
                        aterm.ATermAppl y)

### addDifferent

    public void addDifferent(aterm.ATermAppl x,
                             aterm.ATermAppl y)

### addAllDifferent

    public void addAllDifferent(aterm.ATermList list)

### isNode

    public boolean isNode(aterm.ATerm x)

### getNodes

    public final java.util.Collection<Node> getNodes()

### getNodeNames

    public final java.util.List getNodeNames()

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### getDatatypeReasoner

    public DatatypeReasoner getDatatypeReasoner()

  Returns:
    Returns the datatype reasoner.

### isComplete

    public boolean isComplete()

  Returns:
    Returns the isComplete.

### isClosed

    public boolean isClosed()

  Returns true if Abox has a clash.

  Returns:

### getClash

    public Clash getClash()

### setClash

    public void setClash(Clash clash)

### getKB

    public KnowledgeBase getKB()

  Returns:
    Returns the kb.

### getRole

    public Role getRole(aterm.ATerm r)

  Convenience function to get the named role.

### getRBox

    public RBox getRBox()

  Return the RBox

### getTBox

    public TBox getTBox()

  Return the TBox

### isInitialized

    public boolean isInitialized()

  Check if the ABox is ready to be completed.

  Returns:
    Returns the initialized.

### setInitialized

    public void setInitialized(boolean initialized)

### doExplanation

    public final boolean doExplanation()

  Checks if the explanation is turned on.

  Returns:
    Returns the doExplanation.

### setDoExplanation

    public void setDoExplanation(boolean doExplanation)

  Enable/disable explanation generation

  Parameters:
    `doExplanation` - The doExplanation to set.

### getExplanation

    public java.lang.String getExplanation()

### getExplanationSet

    public java.util.Set<aterm.ATermAppl> getExplanationSet()

### getBranches

    public java.util.List<org.mindswap.pellet.Branch> getBranches()

  Returns the branches.

### getIndIterator

    public org.mindswap.pellet.IndividualIterator getIndIterator()

  Return individuals to which we need to apply the tableau rules

  Returns:

### validate

    public void validate()

  Validate all the edges in the ABox nodes. Used to find bugs in the copy and detach/attach functions.

### printTree

    public void printTree()

  Print the ABox as a completion tree (child nodes are indented).

### getLastClash

    public Clash getLastClash()

### getLastCompletion

    public ABox getLastCompletion()

### isKeepLastCompletion

    public boolean isKeepLastCompletion()

### setKeepLastCompletion

    public void setKeepLastCompletion(boolean keepLastCompletion)

### getPseudoModel

    public ABox getPseudoModel()

### size

    public int size()

  Return the number of nodes in the ABox. This number includes both the individuals and the literals.

  Returns:

### isEmpty

    public boolean isEmpty()

  Returns true if there are no individuals in the ABox.

  Returns:

### setLastCompletion

    public void setLastCompletion(ABox comp)

### getCompletionQueue

    public CompletionQueue getCompletionQueue()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Evren Sirin. All Rights Reserved.