uk.ac.manchester.cs.owl
Class SWRLRuleImpl

java.lang.Object
  extended by uk.ac.manchester.cs.owl.OWLObjectImpl
      extended by uk.ac.manchester.cs.owl.OWLAxiomImpl
          extended by uk.ac.manchester.cs.owl.SWRLRuleImpl
All Implemented Interfaces:
java.lang.Comparable<OWLObject>, OWLAxiom, OWLLogicalAxiom, OWLObject, SWRLObject, SWRLRule

public class SWRLRuleImpl
extends OWLAxiomImpl
implements SWRLRule

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 15-Jan-2007


Constructor Summary
SWRLRuleImpl(OWLDataFactory dataFactory, boolean anon, java.net.URI uri, java.util.Set<? extends SWRLAtom> antecedent, java.util.Set<? extends SWRLAtom> consequent)
           
SWRLRuleImpl(OWLDataFactory dataFactory, java.util.Set<? extends SWRLAtom> antecedent, java.util.Set<? extends SWRLAtom> consequent)
           
SWRLRuleImpl(OWLDataFactory dataFactory, java.net.URI uri, java.util.Set<? extends SWRLAtom> antecedent, java.util.Set<? extends SWRLAtom> consequent)
           
 
Method Summary
 void accept(OWLAxiomVisitor visitor)
           
<O> O
accept(OWLAxiomVisitorEx<O> visitor)
           
 void accept(OWLObjectVisitor visitor)
           
<O> O
accept(OWLObjectVisitorEx<O> visitor)
           
 void accept(SWRLObjectVisitor visitor)
           
<O> O
accept(SWRLObjectVisitorEx<O> visitor)
           
 boolean containsAnonymousDescriptions()
          Determines if this rule uses anonymous descriptions in class atoms.
 boolean equals(java.lang.Object obj)
           
 AxiomType getAxiomType()
          Gets the axiom type for this axiom.
 java.util.Set<SWRLAtom> getBody()
          Gets the atoms in the antecedent
 java.util.Set<OWLDescription> getClassAtomPredicates()
          Gets the predicates of class atoms.
 java.util.Set<SWRLAtomDVariable> getDVariables()
          Gets the data variables that appear in this rule
 java.util.Set<SWRLAtom> getHead()
          Gets the atoms in the consequent.
 java.util.Set<SWRLAtomIVariable> getIVariables()
          Gets the object variables that appear in this rule
 java.net.URI getURI()
          Gets the name of this object.
 java.util.Set<SWRLAtomVariable> getVariables()
          Gets the variables that appear in this rule.
 boolean isAnonymous()
          Determines if this rule is anonymous.
 boolean isLogicalAxiom()
          Determines if this axiom is a logical axiom.
 
Methods inherited from class uk.ac.manchester.cs.owl.OWLAxiomImpl
getAnnotationAxioms, getReferencedEntities
 
Methods inherited from class uk.ac.manchester.cs.owl.OWLObjectImpl
compareTo, getOWLDataFactory, getSignature, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.semanticweb.owl.model.OWLAxiom
getAnnotationAxioms, getReferencedEntities
 
Methods inherited from interface org.semanticweb.owl.model.OWLObject
getSignature
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

SWRLRuleImpl

public SWRLRuleImpl(OWLDataFactory dataFactory,
                    java.net.URI uri,
                    java.util.Set<? extends SWRLAtom> antecedent,
                    java.util.Set<? extends SWRLAtom> consequent)

SWRLRuleImpl

public SWRLRuleImpl(OWLDataFactory dataFactory,
                    boolean anon,
                    java.net.URI uri,
                    java.util.Set<? extends SWRLAtom> antecedent,
                    java.util.Set<? extends SWRLAtom> consequent)

SWRLRuleImpl

public SWRLRuleImpl(OWLDataFactory dataFactory,
                    java.util.Set<? extends SWRLAtom> antecedent,
                    java.util.Set<? extends SWRLAtom> consequent)
Method Detail

getVariables

public java.util.Set<SWRLAtomVariable> getVariables()
Description copied from interface: SWRLRule
Gets the variables that appear in this rule.

Specified by:
getVariables in interface SWRLRule
Returns:
A set of variables.

getDVariables

public java.util.Set<SWRLAtomDVariable> getDVariables()
Description copied from interface: SWRLRule
Gets the data variables that appear in this rule

Specified by:
getDVariables in interface SWRLRule
Returns:
A set of data variables

getIVariables

public java.util.Set<SWRLAtomIVariable> getIVariables()
Description copied from interface: SWRLRule
Gets the object variables that appear in this rule

Specified by:
getIVariables in interface SWRLRule
Returns:
A set of object variables

containsAnonymousDescriptions

public boolean containsAnonymousDescriptions()
Description copied from interface: SWRLRule
Determines if this rule uses anonymous descriptions in class atoms.

Specified by:
containsAnonymousDescriptions in interface SWRLRule
Returns:
true if this rule contains anonymous class description in class atoms, otherwise false.

getClassAtomPredicates

public java.util.Set<OWLDescription> getClassAtomPredicates()
Description copied from interface: SWRLRule
Gets the predicates of class atoms.

Specified by:
getClassAtomPredicates in interface SWRLRule
Returns:
A set of descriptions that represent the class descriptions that are predicates of class atoms.

accept

public void accept(OWLObjectVisitor visitor)
Specified by:
accept in interface OWLObject

accept

public <O> O accept(OWLObjectVisitorEx<O> visitor)
Specified by:
accept in interface OWLObject

accept

public void accept(SWRLObjectVisitor visitor)
Specified by:
accept in interface SWRLObject

accept

public <O> O accept(SWRLObjectVisitorEx<O> visitor)
Specified by:
accept in interface SWRLObject

isAnonymous

public boolean isAnonymous()
Determines if this rule is anonymous. Rules may be named using URIs.

Specified by:
isAnonymous in interface SWRLRule
Returns:
true if this rule is anonymous and therefore doesn't have a URI.

getBody

public java.util.Set<SWRLAtom> getBody()
Gets the atoms in the antecedent

Specified by:
getBody in interface SWRLRule
Returns:
A set of SWRLAtoms, which represent the atoms in the antecedent of the rule.

getHead

public java.util.Set<SWRLAtom> getHead()
Gets the atoms in the consequent.

Specified by:
getHead in interface SWRLRule
Returns:
A set of SWRLAtoms, which represent the atoms in the consequent of the rule

accept

public void accept(OWLAxiomVisitor visitor)
Specified by:
accept in interface OWLAxiom

accept

public <O> O accept(OWLAxiomVisitorEx<O> visitor)
Specified by:
accept in interface OWLAxiom

isLogicalAxiom

public boolean isLogicalAxiom()
Determines if this axiom is a logical axiom. Logical axioms are defined to be axioms other than declaration axioms (including imports declarations) and annotation axioms.

Specified by:
isLogicalAxiom in interface OWLAxiom
Returns:
true if the axiom is a logical axiom, false if the axiom is not a logical axiom.

getURI

public java.net.URI getURI()
Gets the name of this object.

Specified by:
getURI in interface SWRLRule
Returns:
A URI that represents the name of the object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class OWLAxiomImpl

getAxiomType

public AxiomType getAxiomType()
Description copied from interface: OWLAxiom
Gets the axiom type for this axiom.

Specified by:
getAxiomType in interface OWLAxiom
Returns:
The axiom type that corresponds to the type of this axiom.