public class Rule
extends java.lang.Object
Constructor and Description |
---|
Rule(Rule rule)
Creates a copy of a given
|
Rule(java.lang.String name)
Constructor - requires the name of a rule.
|
Rule(java.lang.String name,
Atom body,
Atom head)
Constructor - requires the name, the body and the head of a rule.
|
Rule(java.lang.String name,
Atom body,
Atom head,
org.semanticweb.owlapi.model.OWLAxiom axiom)
Constructor - requires the name, the body and the head of a rule.
|
Rule(java.lang.String name,
java.util.List<Atom> body,
java.util.List<Atom> head)
Constructor - requires the name, the body and the head of a rule.
|
Rule(java.lang.String name,
java.util.List<Atom> body,
java.util.List<Atom> head,
org.semanticweb.owlapi.model.OWLAxiom axiom)
Constructor - requires the name, the body and the head of a rule.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Atom> |
getBody()
Returns the body of a rule.
|
java.lang.String |
getComment()
Returns the comment.
|
java.util.List<Atom> |
getHead()
Returns the head of a rule.
|
java.lang.String |
getName()
Returns the name of a rule.
|
org.semanticweb.owlapi.model.OWLAxiom |
getOWLAxiom()
Returns the
|
boolean |
isHornClause()
Checks if a rule is a Horn clause in this case - whether or not only one triple exists in the head.
|
boolean |
isSafe()
Checks if a rule is safe - none of variables exist only in the head.
|
java.lang.String |
prettyPrint()
Returns
|
void |
setComment(java.lang.String comment)
Sets the comment to a rule.
|
public Rule(Rule rule)
atom
- public Rule(java.lang.String name)
name
- public Rule(java.lang.String name, Atom body, Atom head)
name
- body
- head
- public Rule(java.lang.String name, Atom body, Atom head, org.semanticweb.owlapi.model.OWLAxiom axiom)
name
- body
- head
- public Rule(java.lang.String name, java.util.List<Atom> body, java.util.List<Atom> head)
name
- body
- head
- public Rule(java.lang.String name, java.util.List<Atom> body, java.util.List<Atom> head, org.semanticweb.owlapi.model.OWLAxiom axiom)
name
- body
- head
- public java.util.List<Atom> getBody()
public java.lang.String getComment()
public java.util.List<Atom> getHead()
public java.lang.String getName()
public org.semanticweb.owlapi.model.OWLAxiom getOWLAxiom()
public boolean isHornClause()
public boolean isSafe()
public java.lang.String prettyPrint()
public void setComment(java.lang.String comment)
comment
-