INRIA & friends

fr.inrialpes.exmo.align.service
Class QueryMediator

java.lang.Object
  extended byfr.inrialpes.exmo.align.service.QueryMediator
All Implemented Interfaces:
QueryProcessor

public class QueryMediator
extends java.lang.Object
implements QueryProcessor

QueryMediator A query processor that mediates queries through an ontology alignment. This implementation rely on an embedded QueryProcessor. Another possible implementation would be to subclass a query processor. This would however provide few benefits (speed gained by no indirection) against loss in generality.

Author:
Arun Sharma

Field Summary
private  Alignment alignment
           
private  QueryProcessor processor
           
private  java.lang.String query
           
 
Constructor Summary
QueryMediator(Alignment a)
           
QueryMediator(QueryProcessor proc, Alignment a)
           
QueryMediator(QueryProcessor proc, java.lang.String alignmentURI)
           
QueryMediator(java.lang.String alignmentURI)
           
 
Method Summary
 int getType(java.lang.String query)
           
 void loadOntology(java.lang.String uri)
           
 Result query(java.lang.String query)
           
 Result query(java.lang.String query, Type type)
           
 java.lang.String queryWithStringResults(java.lang.String query)
           
 java.lang.String rewriteQuery(java.lang.String aQuery)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

query

private java.lang.String query

alignment

private Alignment alignment

processor

private QueryProcessor processor
Constructor Detail

QueryMediator

public QueryMediator(QueryProcessor proc,
                     Alignment a)

QueryMediator

public QueryMediator(QueryProcessor proc,
                     java.lang.String alignmentURI)
              throws org.xml.sax.SAXException,
                     javax.xml.parsers.ParserConfigurationException,
                     java.io.IOException

QueryMediator

public QueryMediator(Alignment a)

QueryMediator

public QueryMediator(java.lang.String alignmentURI)
              throws org.xml.sax.SAXException,
                     javax.xml.parsers.ParserConfigurationException,
                     java.io.IOException
Method Detail

query

public Result query(java.lang.String query,
                    Type type)
Specified by:
query in interface QueryProcessor
Parameters:
query - -- The query string
type - -- The query type, can be one of SELECT, ASK, CONSTRUCT, or DESCRIBE

query

public Result query(java.lang.String query)
Specified by:
query in interface QueryProcessor
Parameters:
query - -- The query string

queryWithStringResults

public java.lang.String queryWithStringResults(java.lang.String query)
Specified by:
queryWithStringResults in interface QueryProcessor
Parameters:
query - -- The query string

getType

public int getType(java.lang.String query)
Specified by:
getType in interface QueryProcessor
Parameters:
query - -- the query string

loadOntology

public void loadOntology(java.lang.String uri)
Specified by:
loadOntology in interface QueryProcessor

rewriteQuery

public java.lang.String rewriteQuery(java.lang.String aQuery)
                              throws AlignmentException
Parameters:
aQuery - query to be re-written
Throws:
AlignmentException

INRIA & friends

..no bottom yet...