com.hp.hpl.jena.reasoner.dig
Class DIGQueryInstanceTranslator

java.lang.Object
  extended by com.hp.hpl.jena.reasoner.dig.DIGQueryTranslator
      extended by com.hp.hpl.jena.reasoner.dig.DIGQueryInstanceTranslator

public class DIGQueryInstanceTranslator
extends DIGQueryTranslator

Translator that generates DIG 'instance' queries in response to a find query:

 :x rdf:type :A
 
or similar.

Version:
Release @release@ ($Id: DIGQueryInstanceTranslator.java,v 1.7 2005/03/16 18:52:27 ian_dickinson Exp $)
Author:
Ian Dickinson, HP Labs (email)

Field Summary
 
Fields inherited from class com.hp.hpl.jena.reasoner.dig.DIGQueryTranslator
ALL
 
Constructor Summary
DIGQueryInstanceTranslator(java.lang.String predicate)
          Construct a translator for the DIG query 'instance'.
 
Method Summary
 boolean checkObject(Node object, DIGAdapter da, Model premises)
          Additional test on the object of the incoming find pattern.
 org.w3c.dom.Document translatePattern(TriplePattern pattern, DIGAdapter da)
          Answer a query that will test whether an invidividual is a member of a given named class
 org.w3c.dom.Document translatePattern(TriplePattern pattern, DIGAdapter da, Model premises)
          Answer a query that will test whether an invidividual is a member of a given named class or class expression (defined by the premises)
 ExtendedIterator translateResponseHook(org.w3c.dom.Document response, TriplePattern query, DIGAdapter da)
          Answer an iterator of triples that match the original find query.
 
Methods inherited from class com.hp.hpl.jena.reasoner.dig.DIGQueryTranslator
checkPredicate, checkSubject, checkTriple, find, find, translateResponse, trigger
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DIGQueryInstanceTranslator

public DIGQueryInstanceTranslator(java.lang.String predicate)

Construct a translator for the DIG query 'instance'.

Parameters:
predicate - The predicate URI to trigger on
Method Detail

translatePattern

public org.w3c.dom.Document translatePattern(TriplePattern pattern,
                                             DIGAdapter da)

Answer a query that will test whether an invidividual is a member of a given named class

Specified by:
translatePattern in class DIGQueryTranslator

translatePattern

public org.w3c.dom.Document translatePattern(TriplePattern pattern,
                                             DIGAdapter da,
                                             Model premises)

Answer a query that will test whether an invidividual is a member of a given named class or class expression (defined by the premises)

Specified by:
translatePattern in class DIGQueryTranslator

translateResponseHook

public ExtendedIterator translateResponseHook(org.w3c.dom.Document response,
                                              TriplePattern query,
                                              DIGAdapter da)

Answer an iterator of triples that match the original find query.


checkObject

public boolean checkObject(Node object,
                           DIGAdapter da,
                           Model premises)
Description copied from class: DIGQueryTranslator

Additional test on the object of the incoming find pattern. Default is to always match

Overrides:
checkObject in class DIGQueryTranslator
Parameters:
object - The object resource from the incoming pattern
da - The current dig adapter
premises - 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.
Returns:
True if this object matches the trigger condition expressed by this translator instance


Copyright © 2000, 2001, 2002, 2003, 2004, 2005 Hewlett-Packard Development Company, LP