Class Individual

    • Field Detail

      • _applyNext

        public final int[] _applyNext
    • Method Detail

      • isBlocked

        public boolean isBlocked()
        using only for 'tableau' algorithm.
        Returns:
        blocking or not
      • setBlocked

        public void setBlocked​(boolean isBlocked)
        use only for 'tableau' algorithm.
        Parameters:
        isBlocked - set to blocking or not
      • getDepth

        public short getDepth()
      • 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
      • isIndependent

        public boolean isIndependent()
        Description copied from interface: CachedNode
        Returns if this _node was cached without any dependency to a non-deterministic _branch. In the presence of nominals, when we are checking the satisfiability of a concept the root _node may be merged to a nominal _node and that merge may be due to a non-deterministic _branch. In such cases the types and edges that are cached do not necessarily show types and edges that will exist in every clash-free tableau completion.
        Specified by:
        isIndependent in interface CachedNode
        Returns:
        If this _node was cached without any dependency to a non-deterministic _branch
      • setNominalLevel

        public void setNominalLevel​(int level)
      • getTerm

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

        public java.util.List<openllet.aterm.ATermAppl> getTypes​(int type)
      • isDifferent

        public boolean isDifferent​(Node node)
        Overrides:
        isDifferent in class Node
      • getObviousTypes

        public void getObviousTypes​(java.util.List<openllet.aterm.ATermAppl> types,
                                    java.util.List<openllet.aterm.ATermAppl> 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​(openllet.aterm.ATermAppl c,
                            DependencySet dsParam,
                            boolean checkForPruned)
      • checkMinClash

        public boolean checkMinClash​(openllet.aterm.ATermAppl minCard,
                                     DependencySet minDepends)
      • checkMaxClash

        public boolean checkMaxClash​(openllet.aterm.ATermAppl normalizedMax,
                                     DependencySet maxDepends)
      • isRedundantMin

        public boolean isRedundantMin​(openllet.aterm.ATermAppl minCard)
      • isRedundantMax

        public boolean isRedundantMax​(openllet.aterm.ATermAppl maxCard)
      • getMaxCard

        public int getMaxCard​(Role r)
      • getMinCard

        public int getMinCard​(Role r,
                              openllet.aterm.ATermAppl c)
      • removeType

        public boolean removeType​(openllet.aterm.ATermAppl c)
        Overrides:
        removeType in class Node
      • isLeaf

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

        public final java.util.Set<Node> getRSuccessors​(Role r,
                                                        openllet.aterm.ATermAppl c)
      • getRSuccessorEdges

        public final EdgeList getRSuccessorEdges​(Role r)
      • getRPredecessorEdges

        public final EdgeList getRPredecessorEdges​(Role r)
      • getRNeighbors

        public final java.util.Set<Node> getRNeighbors​(Role r)
      • getRNeighborEdges

        public EdgeList getRNeighborEdges​(Role r)
      • getRNeighborEdges

        public EdgeList getRNeighborEdges​(Role r,
                                          Node node)
        Parameters:
        r -
        node -
        Returns:
        neighbor edges to a specific node
      • hasDistinctRNeighborsForMax

        public DependencySet hasDistinctRNeighborsForMax​(Role r,
                                                         int n,
                                                         openllet.aterm.ATermAppl c)
        Checks if this _individual has at least n distinct r-neighbors that has a specific type.
        Parameters:
        r - Role we use to find neighbors
        n - Number of neighbors
        c - The type that all neighbors should belong to
        Returns:
        The union of dependencies for the edges leading to neighbors and the dependency of the type assertion for each _neighbor
      • hasDistinctRNeighborsForMin

        public boolean hasDistinctRNeighborsForMin​(Role r,
                                                   int n,
                                                   openllet.aterm.ATermAppl c)
      • hasDistinctRNeighborsForMin

        public boolean hasDistinctRNeighborsForMin​(Role r,
                                                   int n,
                                                   openllet.aterm.ATermAppl c,
                                                   boolean onlyNominals)
        Returns true if this _individual has at least n distinct r-neighbors. If only nominal neighbors are wanted then blockable ones will simply be ignored (note that this should only happen if r is an object property)
        Parameters:
        r -
        n -
        c -
        onlyNominals -
        Returns:
        true if this individual has at least n distinct r-neighbors.
      • hasRNeighbor

        public final boolean hasRNeighbor​(Role r)
        Description copied from interface: CachedNode
        Checks if this node is connected to another _node with the given role (or one of its subproperties). The _node may have an incoming edge with the inverse of this role which would count as an r-neighbor.
        Specified by:
        hasRNeighbor in interface CachedNode
        Returns:
        Outgoing edges of this node
      • hasRSuccessor

        public final boolean hasRSuccessor​(Role r,
                                           Node x)
      • 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
      • getOutEdges

        public final EdgeList getOutEdges()
        Description copied from interface: CachedNode
        Returns the outgoing edges of this _node.
        Specified by:
        getOutEdges in interface CachedNode
        Returns:
        Outgoing edges of this _node
      • getParent

        public Individual getParent()
        Returns:
        can return null
        Since:
        2.30
      • reset

        public void reset​(boolean onlyApplyTypes)
        Resets this _node (_types, edges, sames, _differents) to contain only asserted information. This function can be seen a specialized case of restore but a special function is needed both for correctness (e.g. SMART_RESTORE option should not change behavior) and performance
        Overrides:
        reset in class Node
      • 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:
        ds -
      • unprune

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

        public java.lang.String debugString()
      • isBottom

        public boolean isBottom()
        Returns if this is the cached _node for TOP concept.
        Specified by:
        isBottom in interface CachedNode
        Returns:
        true if this is the cached _node for TOP concept
      • isComplete

        public boolean isComplete()
        Returns if this cached _node is complete.
        Specified by:
        isComplete in interface CachedNode
        Returns:
        true if this cached _node is complete
      • isTop

        public boolean isTop()
        Returns if this is the cached _node for BOTTOM concept.
        Specified by:
        isTop in interface CachedNode
        Returns:
        true if this is the cached _node for BOTTOM concept