Interface SWRLAPIRule

  • All Superinterfaces:
    java.lang.Comparable<org.semanticweb.owlapi.model.OWLObject>, org.semanticweb.owlapi.model.HasAnnotationPropertiesInSignature, org.semanticweb.owlapi.model.HasAnnotations, org.semanticweb.owlapi.model.HasAnonymousIndividuals, org.semanticweb.owlapi.model.HasClassesInSignature, org.semanticweb.owlapi.model.HasContainsEntityInSignature, org.semanticweb.owlapi.model.HasDataPropertiesInSignature, org.semanticweb.owlapi.model.HasDatatypesInSignature, org.semanticweb.owlapi.model.HasIndividualsInSignature, org.semanticweb.owlapi.model.HasObjectPropertiesInSignature, org.semanticweb.owlapi.model.HasSignature, org.semanticweb.owlapi.model.IsAnonymous, org.semanticweb.owlapi.model.OWLAxiom, org.semanticweb.owlapi.model.OWLLogicalAxiom, org.semanticweb.owlapi.model.OWLObject, java.io.Serializable, org.semanticweb.owlapi.model.SWRLObject, org.semanticweb.owlapi.model.SWRLRule
    All Known Implementing Classes:
    DefaultSWRLAPIRule

    public interface SWRLAPIRule
    extends org.semanticweb.owlapi.model.SWRLRule
    SWRLAPI representation of a SWRL rule. It specializes the OWLAPI's SWRLRule to provide additional functionality. In particular, the SWRLAPI defines a new atom type for built-ins called SWRLAPIBuiltInAtom (which specializes the OWLAPI SWRLBuiltInAtom type). This atom takes additional built-in argument types represented by SWRLBuiltInArgument, which extends the OWLAPI SWRLDArgument class.

    A SWRLAPI SWRL rules also have an optional rule name, which is stored in a label annotation property.

    These SWRLAPI rules are extracted from an OWL ontology by the SWRLAPIOWLOntology.getSWRLRules() method. A SWRLRuleRenderer can be used to display a rule.

    See Also:
    SWRLAPIBuiltInAtom, SWRLBuiltInArgument, SWRLAPIOWLOntology, SWRLRuleRenderer
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<@NonNull org.semanticweb.owlapi.model.SWRLAtom> getBodyAtoms()  
      @NonNull java.util.List<@NonNull SWRLAPIBuiltInAtom> getBuiltInAtomsFromBody()  
      @NonNull java.util.List<@NonNull SWRLAPIBuiltInAtom> getBuiltInAtomsFromBody​(@NonNull java.util.Set<@NonNull java.lang.String> builtInNames)  
      @NonNull java.util.List<@NonNull SWRLAPIBuiltInAtom> getBuiltInAtomsFromHead()  
      @NonNull java.util.List<@NonNull SWRLAPIBuiltInAtom> getBuiltInAtomsFromHead​(java.util.Set<@NonNull java.lang.String> builtInNames)  
      java.lang.String getComment()  
      @NonNull java.util.List<@NonNull org.semanticweb.owlapi.model.SWRLAtom> getHeadAtoms()  
      @NonNull java.util.List<@NonNull org.semanticweb.owlapi.model.SWRLAtom> getNonBuiltInAtomsFromBody()  
      @NonNull java.util.List<@NonNull org.semanticweb.owlapi.model.SWRLAtom> getNonBuiltInAtomsFromHead()  
      java.lang.String getRuleName()  
      boolean isActive()  
      boolean isSQWRLQuery()  
      void setActive​(boolean active)  
      • Methods inherited from interface java.lang.Comparable

        compareTo
      • Methods inherited from interface org.semanticweb.owlapi.model.HasAnnotationPropertiesInSignature

        getAnnotationPropertiesInSignature
      • Methods inherited from interface org.semanticweb.owlapi.model.HasAnonymousIndividuals

        getAnonymousIndividuals
      • Methods inherited from interface org.semanticweb.owlapi.model.HasClassesInSignature

        getClassesInSignature
      • Methods inherited from interface org.semanticweb.owlapi.model.HasContainsEntityInSignature

        containsEntityInSignature
      • Methods inherited from interface org.semanticweb.owlapi.model.HasDataPropertiesInSignature

        getDataPropertiesInSignature
      • Methods inherited from interface org.semanticweb.owlapi.model.HasDatatypesInSignature

        getDatatypesInSignature
      • Methods inherited from interface org.semanticweb.owlapi.model.HasIndividualsInSignature

        getIndividualsInSignature
      • Methods inherited from interface org.semanticweb.owlapi.model.HasObjectPropertiesInSignature

        getObjectPropertiesInSignature
      • Methods inherited from interface org.semanticweb.owlapi.model.HasSignature

        getSignature
      • Methods inherited from interface org.semanticweb.owlapi.model.IsAnonymous

        isAnonymous, isNamed
      • Methods inherited from interface org.semanticweb.owlapi.model.OWLAxiom

        accept, accept, equalsIgnoreAnnotations, getAnnotatedAxiom, getAnnotations, getAnnotations, getAxiomType, getNNF, isAnnotated, isAnnotationAxiom, isLogicalAxiom, isOfType, isOfType
      • Methods inherited from interface org.semanticweb.owlapi.model.OWLObject

        accept, accept, getNestedClassExpressions, isBottomEntity, isIndividual, isIRI, isTopEntity, toString
      • Methods inherited from interface org.semanticweb.owlapi.model.SWRLObject

        accept, accept
      • Methods inherited from interface org.semanticweb.owlapi.model.SWRLRule

        containsAnonymousClassExpressions, getAxiomWithoutAnnotations, getBody, getClassAtomPredicates, getHead, getSimplified, getVariables
    • Method Detail

      • getRuleName

        java.lang.String getRuleName()
        Returns:
        The name of the rule
      • getComment

        java.lang.String getComment()
        Returns:
        A comment annotation associated with a rule
      • isActive

        boolean isActive()
        Returns:
        True if the rule is active
      • setActive

        void setActive​(boolean active)
        Parameters:
        active - The active state
      • isSQWRLQuery

        boolean isSQWRLQuery()
        Returns:
        True if this is a SQWRL query
      • getBodyAtoms

        java.util.List<@NonNull org.semanticweb.owlapi.model.SWRLAtom> getBodyAtoms()
        Returns:
        A list of SWRL atoms
      • getHeadAtoms

        @NonNull java.util.List<@NonNull org.semanticweb.owlapi.model.SWRLAtom> getHeadAtoms()
        Returns:
        A list of SWRL atoms
      • getNonBuiltInAtomsFromBody

        @NonNull java.util.List<@NonNull org.semanticweb.owlapi.model.SWRLAtom> getNonBuiltInAtomsFromBody()
        Returns:
        A list of atoms
      • getBuiltInAtomsFromBody

        @NonNull java.util.List<@NonNull SWRLAPIBuiltInAtom> getBuiltInAtomsFromBody()
        Returns:
        A list of built-in atoms
      • getBuiltInAtomsFromHead

        @NonNull java.util.List<@NonNull SWRLAPIBuiltInAtom> getBuiltInAtomsFromHead​(java.util.Set<@NonNull java.lang.String> builtInNames)
        Parameters:
        builtInNames - A set of built-in names
        Returns:
        A list of built-in atoms
      • getNonBuiltInAtomsFromHead

        @NonNull java.util.List<@NonNull org.semanticweb.owlapi.model.SWRLAtom> getNonBuiltInAtomsFromHead()
        Returns:
        A list of atoms
      • getBuiltInAtomsFromHead

        @NonNull java.util.List<@NonNull SWRLAPIBuiltInAtom> getBuiltInAtomsFromHead()
        Returns:
        A list of built-in atoms
      • getBuiltInAtomsFromBody

        @NonNull java.util.List<@NonNull SWRLAPIBuiltInAtom> getBuiltInAtomsFromBody​(@NonNull java.util.Set<@NonNull java.lang.String> builtInNames)
        Parameters:
        builtInNames - A set of built-in names
        Returns:
        A list of built-in atoms