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

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

public class DIGQueryParentsTranslator
extends DIGQueryAncestorsTranslator

Translator that generates DIG parents/childre queries in response to a find queries:

 :X direct-subClassOf *
 *  direct-subClassOf :X
 
or similar.

Version:
Release @release@ ($Id: DIGQueryParentsTranslator.java,v 1.9 2008/01/02 12:07:09 andy_seaborne Exp $)
Author:
Ian Dickinson, HP Labs (email)

Field Summary
 
Fields inherited from class com.hp.hpl.jena.reasoner.dig.DIGQueryTranslator
ALL
 
Constructor Summary
DIGQueryParentsTranslator(java.lang.String predicate, boolean parents)
          Construct a translator for the DIG query 'parents'.
DIGQueryParentsTranslator(java.lang.String subject, java.lang.String predicate, java.lang.String object, boolean parents)
          Construct a translator for the DIG query 'parents', with explicit subject and object values.
 
Method Summary
 org.w3c.dom.Document translatePattern(TriplePattern pattern, DIGAdapter da)
          Answer a query that will generate the direct class hierarchy (one level up or down) for a node
 
Methods inherited from class com.hp.hpl.jena.reasoner.dig.DIGQueryAncestorsTranslator
checkObject, checkSubject, translatePattern, translateResponseHook
 
Methods inherited from class com.hp.hpl.jena.reasoner.dig.DIGQueryTranslator
checkPredicate, checkTriple, find, find, translateResponse, trigger
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DIGQueryParentsTranslator

public DIGQueryParentsTranslator(java.lang.String predicate,
                                 boolean parents)

Construct a translator for the DIG query 'parents'.

Parameters:
predicate - The predicate URI to trigger on
parents - If true, we are searching for parents of the class; if false, the children

DIGQueryParentsTranslator

public DIGQueryParentsTranslator(java.lang.String subject,
                                 java.lang.String predicate,
                                 java.lang.String object,
                                 boolean parents)

Construct a translator for the DIG query 'parents', with explicit subject and object values.

Parameters:
subject - The subject URI to trigger on
predicate - The predicate URI to trigger on
object - The object URI to trigger on
parents - If true, we are searching for parents of the class; if false, the children
Method Detail

translatePattern

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

Answer a query that will generate the direct class hierarchy (one level up or down) for a node

Overrides:
translatePattern in class DIGQueryAncestorsTranslator


Copyright � 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP