|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hp.hpl.jena.reasoner.rdfsReasoner1.BRWRule
Datastructure to hold a trivial backward rewrite rule.
The rules take the form "pattern <- pattern" where the pattern is is a triple pattern with variables. The head pattern uses the variables s/p/o to refer to the subject/predicate/object parts of the body pattern. Similarly, the body pattern uses s/p/o to refer to the corresponding parts of the query being processed.
Constructor Summary | |
BRWRule(TriplePattern head,
TriplePattern body)
Constructor |
Method Summary | |
boolean |
completeFor(TriplePattern query)
Return true if this rule is a a complete solution to the given query and the router need look no further |
boolean |
equals(java.lang.Object o)
Equality override |
ExtendedIterator |
execute(TriplePattern query,
InfGraph infGraph,
Finder data,
java.util.HashSet firedRules)
Use the rule to implement the given query. |
TriplePattern |
getBody()
Returns the body. |
TriplePattern |
getHead()
Returns the head. |
int |
hashCode()
hash function override |
static BRWRule |
makeRule(java.lang.String rulespec)
Factory method that builds a rule instance by parsing a simple string representation of the form: ? |
static Node |
parseNode(java.lang.String token)
Assistant method to makeRule than parses a token as a node. |
java.lang.String |
toString()
Printable string form |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BRWRule(TriplePattern head, TriplePattern body)
Method Detail |
public static BRWRule makeRule(java.lang.String rulespec)
?s prop foo <- ?a ns:prop _Variables are either _ or ?x, uri's are either simple strings (no spaces) or qnames. The prefix in qnames are restricted to rdf and rdfs. Minimal error checking.
public ExtendedIterator execute(TriplePattern query, InfGraph infGraph, Finder data, java.util.HashSet firedRules)
query
- the query being processedinfGraph
- the parent infGraph that invoked us, will be called recursivelydata
- the raw data graph which gets passed back to the reasoner as part of the recursive invocationfiredRules
- set of rules which have already been fired and should now be blocked
public boolean completeFor(TriplePattern query)
public static Node parseNode(java.lang.String token)
public java.lang.String toString()
public TriplePattern getBody()
public TriplePattern getHead()
public boolean equals(java.lang.Object o)
public int hashCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |