|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hp.hpl.jena.reasoner.dig.DIGQueryTranslator
public abstract class DIGQueryTranslator
Base class for translators that map incoming RDF find patterns to DIG queries.
Field Summary | |
---|---|
static String |
ALL
|
Constructor Summary | |
---|---|
DIGQueryTranslator(String subject,
String predicate,
String object)
Construct an abstract translator, given the URI's of nodes to match against or null to represent |
Method Summary | |
---|---|
boolean |
checkObject(Node object,
DIGAdapter da,
Model premises)
Additional test on the object of the incoming find pattern. |
boolean |
checkPredicate(Node pred,
DIGAdapter da,
Model premises)
Additional test on the predicate of the incoming find pattern. |
boolean |
checkSubject(Node subject,
DIGAdapter da,
Model premises)
Additional test on the subject of the incoming find pattern. |
boolean |
checkTriple(TriplePattern pattern,
DIGAdapter da,
Model premises)
An optional post-trigger check on the consituents of the triple pattern. |
ExtendedIterator |
find(TriplePattern pattern,
DIGAdapter da)
Translate the given pattern to a DIG query, and pass it on to the DIG adapter as a query. |
ExtendedIterator |
find(TriplePattern pattern,
DIGAdapter da,
Model premises)
Translate the given pattern (with given premises) to a DIG query, and pass it on to the DIG adapter as a query. |
abstract Document |
translatePattern(TriplePattern query,
DIGAdapter da)
Answer an XML document that presents the translation of the query into DIG query language. |
abstract Document |
translatePattern(TriplePattern pattern,
DIGAdapter da,
Model premises)
Answer an XML document that presents the translation of the query into DIG query language, given that either the subject or object may be expressions defined by the statements in the premises model. |
abstract ExtendedIterator |
translateResponse(Document Response,
TriplePattern query,
DIGAdapter da)
Answer an extended iterator over the triples that result from translatig the given DIG response to RDF. |
boolean |
trigger(TriplePattern pattern,
DIGAdapter da,
Model premises)
Answer true if this translator applies to the given triple pattern. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ALL
Constructor Detail |
---|
public DIGQueryTranslator(String subject, String predicate, String object)
Construct an abstract translator, given the URI's of nodes to match against or null to represent
Method Detail |
---|
public ExtendedIterator find(TriplePattern pattern, DIGAdapter da)
Translate the given pattern to a DIG query, and pass it on to the DIG
adapter as a query. Translate the results of the query back to a
triple stream via an extended iterator. Assumes this method is called
contingent on a successful trigger(com.hp.hpl.jena.reasoner.TriplePattern, com.hp.hpl.jena.reasoner.dig.DIGAdapter, com.hp.hpl.jena.rdf.model.Model)
.
pattern
- The pattern to translate to a DIG queryda
- The DIG adapter through which we communicate with a DIG reasonerpublic ExtendedIterator find(TriplePattern pattern, DIGAdapter da, Model premises)
Translate the given pattern (with given premises) to a DIG query, and pass it on to the DIG adapter as a query. Translate the results of the query back to a triple stream via an extended iterator.
pattern
- The pattern to translate to a DIG queryda
- The DIG adapter through which we communicate with a DIG reasonerpremises
- Model conveying additional information about the resources
in the subject or objectpublic boolean trigger(TriplePattern pattern, DIGAdapter da, Model premises)
Answer true if this translator applies to the given triple pattern.
pattern
- An incoming patter to match againstda
- The current dig adapterpremises
- An optional Model that is used to convey the statements in the additional
premises to the query
public boolean checkTriple(TriplePattern pattern, DIGAdapter da, Model premises)
An optional post-trigger check on the consituents of the triple pattern. By default, delegates to a check on each of the subjec, object and predicate. However, this method may be overridden by sub-classes to provide a more context-sensitive test.
pattern
- The triple patternda
- The current dig adapterpremises
- Model denoting premises to the query, or null
public boolean checkSubject(Node subject, DIGAdapter da, Model premises)
Additional test on the subject of the incoming find pattern. Default is to always match
subject
- The subject resource from the incoming patternda
- The current dig adapterpremises
- A model that conveys additional information about the premises
of the query, which might assist the check to suceed or fail. By default it
is ignored.
public boolean checkObject(Node object, DIGAdapter da, Model premises)
Additional test on the object of the incoming find pattern. Default is to always match
object
- The object resource from the incoming patternda
- The current dig adapterpremises
- A model that conveys additional information about the premises
of the query, which might assist the check to suceed or fail. By default it
is ignored.
public boolean checkPredicate(Node pred, DIGAdapter da, Model premises)
Additional test on the predicate of the incoming find pattern. Default is to always match
pred
- The predicate resource from the incoming patternda
- The current dig adapterpremises
- A model that conveys additional information about the premises
of the query, which might assist the check to suceed or fail. By default it
is ignored.
public abstract Document translatePattern(TriplePattern query, DIGAdapter da)
Answer an XML document that presents the translation of the query into DIG query language.
public abstract Document translatePattern(TriplePattern pattern, DIGAdapter da, Model premises)
Answer an XML document that presents the translation of the query into DIG query language, given that either the subject or object may be expressions defined by the statements in the premises model.
public abstract ExtendedIterator translateResponse(Document Response, TriplePattern query, DIGAdapter da)
Answer an extended iterator over the triples that result from translatig the given DIG response to RDF.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |