Interface ClassesBase

    • Method Detail

      • isSubClassOf

        default boolean isSubClassOf​(openllet.aterm.ATermAppl subCls,
                                     openllet.aterm.ATermAppl supCls)
        Specified by:
        isSubClassOf in interface Base
        Returns:
        true if class subCls is subclass of class supCls.
      • isEquivalentClass

        default boolean isEquivalentClass​(openllet.aterm.ATermAppl c1,
                                          openllet.aterm.ATermAppl c2)
        Parameters:
        c1 -
        c2 -
        Returns:
        true if class c1 is equivalent to class c2.
      • getSubClasses

        default java.util.Set<java.util.Set<openllet.aterm.ATermAppl>> getSubClasses​(openllet.aterm.ATermAppl c,
                                                                                     boolean direct)
        Returns the (named) subclasses of class c. Depending on the second parameter the result will include either all subclasses or only the direct subclasses. A class d is a direct subclass of c iff
        1. d is subclass of c
        2. there is no other class x different from c and d such that x is subclass of c and d is subclass of x
        The class c itself is not included in the list but all the other classes that are sameAs c are put into the list. Also note that the returned list will always have at least one element. The list will either include one other concept from the hierarchy or the BOTTOM concept if no other class is subsumed by c. By definition BOTTOM concept is subclass of every concept.

        *** This function will first classify the whole ontology ***

        Parameters:
        c - class whose subclasses are returned
        direct - If true return only the direct subclasses, otherwise return all the subclasses
        Returns:
        A set of sets, where each set in the collection represents an equivalence class. The elements of the inner class are ATermAppl objects.
      • getDisjointClasses

        default java.util.Set<java.util.Set<openllet.aterm.ATermAppl>> getDisjointClasses​(openllet.aterm.ATermAppl c,
                                                                                          boolean direct)
      • getAllEquivalentClasses

        default java.util.Set<openllet.aterm.ATermAppl> getAllEquivalentClasses​(openllet.aterm.ATermAppl c)
        Returns all the classes that are equivalent to class c, including c itself.

        *** This function will first classify the whole ontology ***

        Parameters:
        c - class whose equivalent classes are found
        Returns:
        A set of ATerm objects
      • isKnownType

        default Bool isKnownType​(openllet.aterm.ATermAppl x,
                                 openllet.aterm.ATermAppl c)
        Answers the isType question without doing any satisfiability check. It might return Bool.TRUE, Bool.FALSE, or Bool.UNKNOWN. If Bool.UNKNOWN is returned isType function needs to be called to get the answer.
        Parameters:
        x -
        c -
        Returns:
        true if the term x is of the know type c (class)
      • isType

        default boolean isType​(openllet.aterm.ATermAppl x,
                               openllet.aterm.ATermAppl c)
      • hasRange

        default boolean hasRange​(openllet.aterm.ATermAppl p,
                                 openllet.aterm.ATermAppl c)
      • isDisjoint

        default boolean isDisjoint​(openllet.aterm.ATermAppl c1,
                                   openllet.aterm.ATermAppl c2)
      • isDisjointProperty

        default boolean isDisjointProperty​(openllet.aterm.ATermAppl r1,
                                           openllet.aterm.ATermAppl r2)
      • isDisjointClass

        default boolean isDisjointClass​(openllet.aterm.ATermAppl c1,
                                        openllet.aterm.ATermAppl c2)
      • isComplement

        default boolean isComplement​(openllet.aterm.ATermAppl c1,
                                     openllet.aterm.ATermAppl c2)
      • getSuperClasses

        default java.util.Set<java.util.Set<openllet.aterm.ATermAppl>> getSuperClasses​(openllet.aterm.ATermAppl cParam,
                                                                                       boolean direct)
        Description copied from interface: Base
        Returns the (named) superclasses of class c. Depending on the second parameter the resulting list will include either all or only the direct superclasses. A class d is a direct superclass of c iff
        1. d is superclass of c
        2. there is no other class x such that x is superclass of c and d is superclass of x
        The class c itself is not included in the list but all the other classes that are sameAs c are put into the list. Also note that the returned list will always have at least one element. The list will either include one other concept from the hierarchy or the TOP concept if no other class subsumes c. By definition TOP concept is superclass of every concept.

        *** This function will first classify the whole ontology ***

        Specified by:
        getSuperClasses in interface Base
        Parameters:
        cParam - class whose superclasses are returned
        Returns:
        A set of sets, where each set in the collection represents an equivalence class. The elements of the inner class are ATermAppl objects.
      • getEquivalentClasses

        default java.util.Set<openllet.aterm.ATermAppl> getEquivalentClasses​(openllet.aterm.ATermAppl c)
        Returns all the classes that are equivalent to class c, excluding c itself.

        *** This function will first classify the whole ontology ***

        Parameters:
        c - class whose equivalent classes are found
        Returns:
        A set of ATerm objects
      • printClassTree

        default void printClassTree()
        Print the class hierarchy on the standard output.