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

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

public class DIGQueryIsRoleTranslator
extends DIGQueryTranslator

Translator that generates a DIG query to test whether a ground name is an role atom

 x rdf:type owl:ObjectProperty
 
or similar.

Version:
Release @release@ ($Id: DIGQueryIsRoleTranslator.java,v 1.3 2004/12/07 09:56:35 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
DIGQueryIsRoleTranslator()
          Construct a translator for the DIG for a role name.
 
Method Summary
 boolean checkObject(Node object, DIGAdapter da, Model premises)
          Additional test on the object of the incoming find pattern.
 boolean checkSubject(Node subject, DIGAdapter da, Model premises)
          Additional test on the subject of the incoming find pattern.
 ExtendedIterator find(TriplePattern pattern, DIGAdapter da)
          Since known concept names are cached by the adapter, we can just look up the current set and map directly to triples
 ExtendedIterator find(TriplePattern pattern, DIGAdapter da, Model premises)
          For this translation, we ignore premises
 Document translatePattern(TriplePattern pattern, DIGAdapter da)
          Answer an XML document that presents the translation of the query into DIG query language.
 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 translateResponse(Document response, TriplePattern query, DIGAdapter da)
          Answer an extended iterator over the triples that result from translatig the given DIG response to RDF.
 
Methods inherited from class com.hp.hpl.jena.reasoner.dig.DIGQueryTranslator
checkPredicate, checkTriple, trigger
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DIGQueryIsRoleTranslator

public DIGQueryIsRoleTranslator()

Construct a translator for the DIG for a role name.

Method Detail

find

public ExtendedIterator find(TriplePattern pattern,
                             DIGAdapter da)

Since known concept names are cached by the adapter, we can just look up the current set and map directly to triples

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

find

public ExtendedIterator find(TriplePattern pattern,
                             DIGAdapter da,
                             Model premises)
For this translation, we ignore premises

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
premises - Model conveying additional information about the resources in the subject or object

translatePattern

public Document translatePattern(TriplePattern pattern,
                                 DIGAdapter da)
Description copied from class: DIGQueryTranslator

Answer an XML document that presents the translation of the query into DIG query language.

Specified by:
translatePattern in class DIGQueryTranslator

translatePattern

public 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

translateResponse

public ExtendedIterator translateResponse(Document response,
                                          TriplePattern query,
                                          DIGAdapter da)
Description copied from class: DIGQueryTranslator

Answer an extended iterator over the triples that result from translatig the given DIG response to RDF.

Specified by:
translateResponse in class DIGQueryTranslator

checkObject

public boolean checkObject(Node object,
                           DIGAdapter da,
                           Model premises)

Additional test on the object of the incoming find pattern.

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

checkSubject

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

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

Overrides:
checkSubject in class DIGQueryTranslator
Parameters:
subject - The subject 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 subject matches the trigger condition expressed by this translator instance


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