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

java.lang.Object
  extended by com.hp.hpl.jena.reasoner.dig.DIGQueryTranslator
      extended by com.hp.hpl.jena.reasoner.dig.DIGIteratedQueryTranslator
Direct Known Subclasses:
DIGQueryClassHierarchyTranslator, DIGQueryRoleHierarchyTranslator

public abstract class DIGIteratedQueryTranslator
extends DIGQueryTranslator

A specialisation of DIG query translator that aggregates iterated queries

Version:
CVS $Id: DIGIteratedQueryTranslator.java,v 1.6 2005/03/16 18:52:28 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
DIGIteratedQueryTranslator(java.lang.String subject, java.lang.String predicate, java.lang.String object)
          Construct a query translator for the given query parameters.
 
Method Summary
 ExtendedIterator find(TriplePattern pattern, DIGAdapter da)
          Expand the given pattern to a series of more grounded patterns, and collate the results of querying with each of these expanded patterns.
 org.w3c.dom.Document translatePattern(TriplePattern query, DIGAdapter da)
          Not needed in this class - delegated to the specific query handlers
 org.w3c.dom.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.
 ExtendedIterator translateResponseHook(org.w3c.dom.Document Response, TriplePattern query, DIGAdapter da)
          Not needed in this class - delegated to the specific query handlers
 
Methods inherited from class com.hp.hpl.jena.reasoner.dig.DIGQueryTranslator
checkObject, checkPredicate, checkSubject, checkTriple, find, translateResponse, trigger
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DIGIteratedQueryTranslator

public DIGIteratedQueryTranslator(java.lang.String subject,
                                  java.lang.String predicate,
                                  java.lang.String object)

Construct a query translator for the given query parameters.

Parameters:
subject - Represents the incoming subject to trigger against
predicate - Represents the incoming predicate to trigger against
object - Represents the incoming object to trigger against
Method Detail

find

public ExtendedIterator find(TriplePattern pattern,
                             DIGAdapter da)

Expand the given pattern to a series of more grounded patterns, and collate the results of querying with each of these expanded patterns. This is used in cases where the incoming query is too ungrounded to pass to DIG in one go, e.g. * rdfs:subClassOf *. The strategy is to expand one of the ungrounded terms to form a series of queries, then solve each of these queries separately.

Overrides:
find in class DIGQueryTranslator
Parameters:
pattern - The pattern to translate to a DIG query
da - The DIG adapter through which we communicate with a DIG reasoner

translatePattern

public org.w3c.dom.Document translatePattern(TriplePattern query,
                                             DIGAdapter da)
Not needed in this class - delegated to the specific query handlers

Specified by:
translatePattern in class DIGQueryTranslator

translatePattern

public org.w3c.dom.Document translatePattern(TriplePattern pattern,
                                             DIGAdapter da,
                                             Model premises)
Description copied from class: DIGQueryTranslator

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.

Specified by:
translatePattern in class DIGQueryTranslator

translateResponseHook

public ExtendedIterator translateResponseHook(org.w3c.dom.Document Response,
                                              TriplePattern query,
                                              DIGAdapter da)
Not needed in this class - delegated to the specific query handlers



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