org.mindswap.pellet
Class Individual

java.lang.Object
  extended by org.mindswap.pellet.Node
      extended by org.mindswap.pellet.Individual

public class Individual
extends Node

Author:
initial version for OWL - Evren Sirin, updates for OWLMeT - NataKeberle

Field Summary
 
Fields inherited from class org.mindswap.pellet.Node
ALL, ALLFUT, ALLPAST, AT, ATOM, BLOCKABLE, CHANGED, DEBUG, FUT, MAX, MIN, NOM, NOMINAL, OR, PAST, SOME, SOMEFUT, SOMEPAST, TYPES, UNCHANGED
 
Method Summary
 Edge addEdge(Role r, Node x, DependencySet ds)
           
 void addType(aterm.ATermAppl c, DependencySet ds)
           
 void addType(aterm.ATermAppl c, DependencySet ds, int moment)
          09/11/08 addType(c, ds,moment)
 boolean canApply(int type)
           
 boolean checkMaxClash(aterm.ATermAppl normalizedMax, DependencySet maxDepends)
           
 boolean checkMinClash(aterm.ATermAppl minCard, DependencySet minDepends)
           
 Node copyTo(ABox abox)
           
 java.lang.String debugString()
           
 java.util.List getAncestors()
          Returns (only blockable) ancestors.
 DependencySet getDifferenceDependency(Node node)
           
 java.util.Set getDifferents()
           
 EdgeList getEdgesTo(Node x)
           
 EdgeList getEdgesTo(Node x, Role r)
           
 int getMaxCard(Role r)
           
 java.util.Set getMerged()
           
 int getMinCard(Role r)
           
 int getNominalLevel()
           
 void getObviousTypes(java.util.List types, java.util.List nonTypes)
          Collects atomic concepts such that either that concept or its negation exist in the types list without depending on any non-deterministic branch.
 EdgeList getOutEdges()
           
 EdgeList getRNeighborEdges(Role r)
           
 java.util.Set getRNeighborNames(Role r)
           
 java.util.Set getRNeighbors(Role r)
           
 EdgeList getRPredecessorEdges(Role r)
           
 EdgeList getRSuccessorEdges(Role r)
           
 java.util.Set getRSuccessors(Role r)
           
 java.util.Set getSortedSuccessors()
           
 java.util.Set getSuccessors()
           
 aterm.ATermAppl getTerm()
           
 java.util.List getTypes(int type)
           
 Bool hasDataPropertyValue(Role r, java.lang.Object value)
          Check the property assertions to see if it is possible for this individual to have the value for the given datatype property.
 boolean hasEdge(Role r, Node x)
           
 DependencySet hasMax1(Role maxR)
           
 Bool hasObjectPropertyValue(Role r, Individual value)
          Check the property assertions to see if it is possible for this individual to have the value for the given object property.
 boolean hasRNeighbor(Role r)
           
 boolean hasRSuccessor(Role r)
           
 boolean hasSuccessor(Node x)
           
 boolean isBlockable()
           
 boolean isDifferent(Node node)
           
 boolean isIndividual()
           
 boolean isLeaf()
           
 boolean isLiteral()
           
 boolean isMarked()
           
 boolean isNominal()
           
 boolean isRedundantMax(aterm.ATermAppl maxCard)
           
 boolean isRedundantMin(aterm.ATermAppl minCard)
           
 void prune(DependencySet ds)
          Prune the given node by removing all links going to nominal nodes and recurse through all successors.
 boolean removeEdge(Edge edge)
           
 void removeType(aterm.ATermAppl c)
           
 boolean restore(int branch)
           
 void setNominalLevel(int level)
           
 void unprune(int branch)
           
 
Methods inherited from class org.mindswap.pellet.Node
copy, equals, getABox, getDepends, getDepends, getInEdges, getMergeDependency, getMergedTo, getName, getNameStr, getOntology, getParent, getPath, getPredecessors, getPruned, getSame, getTypes, hasObviousType, hasObviousType, hasType, inheritDifferents, isBnode, isChanged, isChanged, isConceptRoot, isMerged, isNamedIndividual, isPruned, isRoot, isRootNominal, isSame, mergedAt, prunedAt, removeInEdge, removeInEdges, removeTypes, setChanged, setChanged, setConceptRoot, setDifferent, setOntology, setSame, toString, undoSetSame
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

isLiteral

public boolean isLiteral()
Specified by:
isLiteral in class Node

isIndividual

public boolean isIndividual()
Specified by:
isIndividual in class Node

isNominal

public boolean isNominal()
Specified by:
isNominal in class Node

isBlockable

public boolean isBlockable()
Specified by:
isBlockable in class Node

isMarked

public boolean isMarked()

setNominalLevel

public void setNominalLevel(int level)

getNominalLevel

public int getNominalLevel()
Specified by:
getNominalLevel in class Node

getTerm

public aterm.ATermAppl getTerm()
Specified by:
getTerm in class Node

copyTo

public Node copyTo(ABox abox)
Specified by:
copyTo in class Node

getMerged

public java.util.Set getMerged()

getTypes

public java.util.List getTypes(int type)

isDifferent

public boolean isDifferent(Node node)
Overrides:
isDifferent in class Node

getDifferents

public java.util.Set getDifferents()
Overrides:
getDifferents in class Node

getDifferenceDependency

public DependencySet getDifferenceDependency(Node node)
Overrides:
getDifferenceDependency in class Node

getObviousTypes

public void getObviousTypes(java.util.List types,
                            java.util.List nonTypes)
Collects atomic concepts such that either that concept or its negation exist in the types list without depending on any non-deterministic branch. First list is filled with types and second list is filled with non-types, i.e. this individual can never be an instance of any element in the second list.

Parameters:
types - All atomic concepts found in types
nonTypes - All atomic concepts

canApply

public boolean canApply(int type)

addType

public void addType(aterm.ATermAppl c,
                    DependencySet ds)
Overrides:
addType in class Node

addType

public void addType(aterm.ATermAppl c,
                    DependencySet ds,
                    int moment)
Description copied from class: Node
09/11/08 addType(c, ds,moment)

Overrides:
addType in class Node

checkMinClash

public boolean checkMinClash(aterm.ATermAppl minCard,
                             DependencySet minDepends)

checkMaxClash

public boolean checkMaxClash(aterm.ATermAppl normalizedMax,
                             DependencySet maxDepends)

isRedundantMin

public boolean isRedundantMin(aterm.ATermAppl minCard)

isRedundantMax

public boolean isRedundantMax(aterm.ATermAppl maxCard)

hasMax1

public DependencySet hasMax1(Role maxR)

getMaxCard

public int getMaxCard(Role r)

getMinCard

public int getMinCard(Role r)

removeType

public void removeType(aterm.ATermAppl c)
Overrides:
removeType in class Node

isLeaf

public final boolean isLeaf()
Specified by:
isLeaf in class Node

getSuccessors

public final java.util.Set getSuccessors()

getSortedSuccessors

public final java.util.Set getSortedSuccessors()

getRSuccessors

public final java.util.Set getRSuccessors(Role r)

getRSuccessorEdges

public final EdgeList getRSuccessorEdges(Role r)

getRPredecessorEdges

public final EdgeList getRPredecessorEdges(Role r)

getRNeighborNames

public final java.util.Set getRNeighborNames(Role r)

getRNeighbors

public final java.util.Set getRNeighbors(Role r)

getRNeighborEdges

public EdgeList getRNeighborEdges(Role r)

getEdgesTo

public EdgeList getEdgesTo(Node x)

getEdgesTo

public EdgeList getEdgesTo(Node x,
                           Role r)

hasRNeighbor

public final boolean hasRNeighbor(Role r)

hasRSuccessor

public boolean hasRSuccessor(Role r)

hasEdge

public boolean hasEdge(Role r,
                       Node x)

hasSuccessor

public boolean hasSuccessor(Node x)
Specified by:
hasSuccessor in class Node

hasDataPropertyValue

public Bool hasDataPropertyValue(Role r,
                                 java.lang.Object value)
Check the property assertions to see if it is possible for this individual to have the value for the given datatype property. This function is meaningful only called for individuals in a completed ABox (a pseudo model for the KB). In a completed ABox, individual will have some literal successors that may or may not have a known value. The individual has the data property value only if it has a literal successor that has the exact given value and the edge between the individual and the literal does not depend on any non- deterministic branch. If the literal value is there but the edge depends on a branch then we cannot exactly say if the literal value is there or not. If there is no literal successor with the given value then we can for sure say that individual does not have the data property value (because it does not have the value in at least one model)

Parameters:
r -
value -
Returns:
Bool.TRUE if the individual definetely has the property value, Bool.FALSE if the individual definetely does NOT have the property value and Bool.UNKNOWN if it cannot be determined for sure, i.e. consistency check is required

hasObjectPropertyValue

public Bool hasObjectPropertyValue(Role r,
                                   Individual value)
Check the property assertions to see if it is possible for this individual to have the value for the given object property. This function is meaningful only called for individuals in a completed ABox (a pseudo model for the KB). The individual has the object property value only if it has a neighbor that is same as the given object value and the edge between these individuals does not depend on any non-deterministic branch. If the value is there but the edge depends on a branch then we cannot exactly say if the value is there or not. If there is no neighbor same as the object value given then we can for sure say that individual does not have the property value (because it does not have the value in at least one model)

Parameters:
r -
value -
Returns:
Bool.TRUE if the individual definitely has the property value, Bool.FALSE if the individual definetely does NOT have the property value and Bool.UNKNOWN if it cannot be determined for sure, i.e. consistency check is required

addEdge

public Edge addEdge(Role r,
                    Node x,
                    DependencySet ds)

getOutEdges

public final EdgeList getOutEdges()

getAncestors

public java.util.List getAncestors()
Returns (only blockable) ancestors. Ancestors of a nominal node is empty.

Returns:

restore

public boolean restore(int branch)
Overrides:
restore in class Node

removeEdge

public final boolean removeEdge(Edge edge)

prune

public void prune(DependencySet ds)
Prune the given node by removing all links going to nominal nodes and recurse through all successors. No need to remove incoming edges because either the node is the first one being pruned so the merge function already handled it or this is a successor node and its successor is also being pruned

Specified by:
prune in class Node
Parameters:
succ -
ds -

unprune

public void unprune(int branch)
Overrides:
unprune in class Node

debugString

public java.lang.String debugString()


Copyright © 2007-2009 Natalya Keberle. All Rights Reserved.