Java Doc for DIGQueryTranslator.java in  » RSS-RDF » Jena-2.5.5 » com » hp » hpl » jena » reasoner » dig » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » RSS RDF » Jena 2.5.5 » com.hp.hpl.jena.reasoner.dig 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.hp.hpl.jena.reasoner.dig.DIGQueryTranslator

All known Subclasses:   com.hp.hpl.jena.reasoner.dig.DIGQueryAllIndividualsTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryRoleAncestorsTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryIsEquivalentTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryIsRoleTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryRelatedIndividualsTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryAncestorsTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryInstanceTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryTypesTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryRoleFillersTranslator,  com.hp.hpl.jena.reasoner.dig.DIGIteratedQueryTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryInstancesTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQuerySubsumesTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryAllRolesTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryRoleFillerTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryDifferentFromTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryEquivalentsTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryAllConceptsTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryIsConceptTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryDisjointTranslator,  com.hp.hpl.jena.reasoner.dig.DIGQueryIsIndividualTranslator,
DIGQueryTranslator
abstract public class DIGQueryTranslator (Code)

Base class for translators that map incoming RDF find patterns to DIG queries.


author:
   Ian Dickinson, HP Labs (email)
version:
   Release @release@ ($Id: DIGQueryTranslator.java,v 1.20 2008/01/02 12:07:10 andy_seaborne Exp $)


Field Summary
final public static  StringALL
    

Constructor Summary
public  DIGQueryTranslator(String subject, String predicate, String object)
    

Method Summary
public  booleancheckObject(Node object, DIGAdapter da, Model premises)
    

Additional test on the object of the incoming find pattern.

public  booleancheckPredicate(Node pred, DIGAdapter da, Model premises)
    

Additional test on the predicate of the incoming find pattern.

public  booleancheckSubject(Node subject, DIGAdapter da, Model premises)
    

Additional test on the subject of the incoming find pattern.

public  booleancheckTriple(TriplePattern pattern, DIGAdapter da, Model premises)
    

An optional post-trigger check on the consituents of the triple pattern.

protected  ExtendedIteratorconceptSetNameCheck(Document response, DIGAdapter da, Node node, Triple result)
    
public  ExtendedIteratorfind(TriplePattern pattern, DIGAdapter da)
    

Translate the given pattern to a DIG query, and pass it on to the DIG adapter as a query.

public  ExtendedIteratorfind(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.

protected  FiltergetResultsTripleFilter(TriplePattern query)
    

Extension point: translators can add an optional filter stage to the translated result by providing a non-null filter here.

protected  booleanisFalse(Document response)
    

Answer true if the given document is the response <false> from a DIG reasoner.

protected  booleanisTrue(Document response)
    

Answer true if the given document is the response <true> from a DIG reasoner.

protected  NodemapNode(String uri)
    

Answer a node corresponding to the given URI.


Parameters:
  uri - A node URI, or the special string *, or null.
protected  ExtendedIteratortranslateConceptSetResponse(Document response, TriplePattern query, boolean object, DIGAdapter da)
    
protected  ExtendedIteratortranslateIndividualPairSetResponse(Document response, TriplePattern query)
    
protected  ExtendedIteratortranslateIndividualSetResponse(Document response, TriplePattern query, boolean object)
    
protected  ExtendedIteratortranslateNameSetResponse(Document response, TriplePattern query, boolean object, String[] path)
    
abstract public  DocumenttranslatePattern(TriplePattern query, DIGAdapter da)
    
abstract public  DocumenttranslatePattern(TriplePattern pattern, DIGAdapter da, Model premises)
    
final public  ExtendedIteratortranslateResponse(Document response, TriplePattern query, DIGAdapter da)
    
abstract protected  ExtendedIteratortranslateResponseHook(Document response, TriplePattern query, DIGAdapter da)
    
protected  ExtendedIteratortranslateRoleSetResponse(Document response, TriplePattern query, boolean object)
    
protected  ExtendedIteratortranslateSpecialConcepts(Document response, DIGAdapter da, Node ref, Node pred, boolean refSubject)
    
public  booleantrigger(TriplePattern pattern, DIGAdapter da, Model premises)
    
protected  booleantrigger(Node lhs, Node rhs, Model premises)
    

A node matches a trigger (lhs) node if either the lhs is null, or the nodes are equal.


Field Detail
ALL
final public static String ALL(Code)




Constructor Detail
DIGQueryTranslator
public DIGQueryTranslator(String subject, String predicate, String object)(Code)

Construct an abstract translator, given the URI's of nodes to match against or null to represent





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

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


Parameters:
  object - The object resource from the incoming pattern
Parameters:
  da - The current dig adapter
Parameters:
  premises - A model that conveys additional information about the premisesof the query, which might assist the check to suceed or fail. By default itis ignored. True if this object matches the trigger condition expressed by this translator instance



checkPredicate
public boolean checkPredicate(Node pred, DIGAdapter da, Model premises)(Code)

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


Parameters:
  pred - The predicate resource from the incoming pattern
Parameters:
  da - The current dig adapter
Parameters:
  premises - A model that conveys additional information about the premisesof the query, which might assist the check to suceed or fail. By default itis ignored. True if this predicate matches the trigger condition expressed by this translator instance



checkSubject
public boolean checkSubject(Node subject, DIGAdapter da, Model premises)(Code)

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


Parameters:
  subject - The subject resource from the incoming pattern
Parameters:
  da - The current dig adapter
Parameters:
  premises - A model that conveys additional information about the premisesof the query, which might assist the check to suceed or fail. By default itis ignored. True if this subject matches the trigger condition expressed by this translator instance



checkTriple
public boolean checkTriple(TriplePattern pattern, DIGAdapter da, Model premises)(Code)

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.


Parameters:
  pattern - The triple pattern
Parameters:
  da - The current dig adapter
Parameters:
  premises - Model denoting premises to the query, or null True if the pattern conforms to the prerequisites for a given translation step



conceptSetNameCheck
protected ExtendedIterator conceptSetNameCheck(Document response, DIGAdapter da, Node node, Triple result)(Code)

Check if a document representing a concept-set response from the DIG reasoner contains a given node as a value, and, if so, return a singleton iterator over the given result triple.


Parameters:
  response - The XML document to process
Parameters:
  da - The DIG adapter
Parameters:
  node - The node we are seeking
Parameters:
  result - The triple to return if node occurs in the concept set in response The singeleton iterator over result, or the null iterator if node is not presentin the response.



find
public ExtendedIterator find(TriplePattern pattern, DIGAdapter da)(Code)

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 DIGQueryTranslator.trigger .


Parameters:
  pattern - The pattern to translate to a DIG query
Parameters:
  da - The DIG adapter through which we communicate with a DIG reasoner



find
public ExtendedIterator find(TriplePattern pattern, DIGAdapter da, Model premises)(Code)

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.


Parameters:
  pattern - The pattern to translate to a DIG query
Parameters:
  da - The DIG adapter through which we communicate with a DIG reasoner
Parameters:
  premises - Model conveying additional information about the resourcesin the subject or object



getResultsTripleFilter
protected Filter getResultsTripleFilter(TriplePattern query)(Code)

Extension point: translators can add an optional filter stage to the translated result by providing a non-null filter here. The filter should accept triples, and return true for those triples that are to remain in the final result iterator.

An optional filter on the results of a DIG query



isFalse
protected boolean isFalse(Document response)(Code)

Answer true if the given document is the response <false> from a DIG reasoner.
Parameters:
  response - The document encoding the response True iff this is the response false.




isTrue
protected boolean isTrue(Document response)(Code)

Answer true if the given document is the response <true> from a DIG reasoner.
Parameters:
  response - The document encoding the response True iff this is the response true.




mapNode
protected Node mapNode(String uri)(Code)

Answer a node corresponding to the given URI.


Parameters:
  uri - A node URI, or the special string *, or null. A Jena Node corresponding to the given URI



translateConceptSetResponse
protected ExtendedIterator translateConceptSetResponse(Document response, TriplePattern query, boolean object, DIGAdapter da)(Code)

Translate a concept set document into an extended iterator of triples, placing the concept identities into either the subject or object position in the returned triple.


Parameters:
  response - The response XML document
Parameters:
  query - The original query
Parameters:
  object - Flag to indicate that the concept names should occupy the subject fieldof the returned triple, otherwise the object



translateIndividualPairSetResponse
protected ExtendedIterator translateIndividualPairSetResponse(Document response, TriplePattern query)(Code)

Translate an individualPairSet response, which lists pairs of related individuals for some queried relation p.


Parameters:
  response -
Parameters:
  query - An iterator over triples formed from the result pairs and the known query predicate



translateIndividualSetResponse
protected ExtendedIterator translateIndividualSetResponse(Document response, TriplePattern query, boolean object)(Code)

Translate an instance set document into an extended iterator of triples, placing the concept identities into either the subject or object position in the returned triple.


Parameters:
  response - The response XML document
Parameters:
  query - The original query
Parameters:
  object - Flag to indicate that the instance names should occupy the subject fieldof the returned triple, or the object



translateNameSetResponse
protected ExtendedIterator translateNameSetResponse(Document response, TriplePattern query, boolean object, String[] path)(Code)

Translate an document encoding a set of named entities into an extended iterator of triples, placing the concept identities into either the subject or object position in the returned triple.


Parameters:
  response - The response XML document
Parameters:
  query - The original query
Parameters:
  object - Flag to indicate that the instance names should occupy the subject fieldof the returned triple, or the object
Parameters:
  path - The element name path to follow from the root



translatePattern
abstract public Document translatePattern(TriplePattern query, DIGAdapter da)(Code)

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




translatePattern
abstract public Document translatePattern(TriplePattern pattern, DIGAdapter da, Model premises)(Code)

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.




translateResponse
final public ExtendedIterator translateResponse(Document response, TriplePattern query, DIGAdapter da)(Code)

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




translateResponseHook
abstract protected ExtendedIterator translateResponseHook(Document response, TriplePattern query, DIGAdapter da)(Code)

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




translateRoleSetResponse
protected ExtendedIterator translateRoleSetResponse(Document response, TriplePattern query, boolean object)(Code)

Translate a role set document into an extended iterator of triples, placing the concept identities into either the subject or object position in the returned triple.


Parameters:
  response - The response XML document
Parameters:
  query - The original query
Parameters:
  object - Flag to indicate that the role names should occupy the subject fieldof the returned triple, or the object



translateSpecialConcepts
protected ExtendedIterator translateSpecialConcepts(Document response, DIGAdapter da, Node ref, Node pred, boolean refSubject)(Code)

Answer an iterator that contains appropriate triples if the given response contains either top or bottom elements.


Parameters:
  response - The XML document to process
Parameters:
  da - The DIG adapter
Parameters:
  ref - The fixed node in the triple
Parameters:
  pred - The predicate in the triple
Parameters:
  refSubject - True if the reference node is to be the subject of anycreated triples An iterator over any subset of Thing and Nothing, if eitheror both of top and bottom appear as elements in the response document.



trigger
public boolean trigger(TriplePattern pattern, DIGAdapter da, Model premises)(Code)

Answer true if this translator applies to the given triple pattern.


Parameters:
  pattern - An incoming patter to match against
Parameters:
  da - The current dig adapter
Parameters:
  premises - An optional Model that is used to convey the statements in the additionalpremises to the query True if this translator applies to the pattern.



trigger
protected boolean trigger(Node lhs, Node rhs, Model premises)(Code)

A node matches a trigger (lhs) node if either the lhs is null, or the nodes are equal. Note: not matching in the same sense as triple patterns.


Parameters:
  lhs - The trigger node to match against
Parameters:
  rhs - The incoming pattern node
Parameters:
  premises - A model that conveys additional information about the premisesof the query, which might assist the trigger to suceed or fail. By default itis ignored. True if match



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.