fr.inrialpes.exmo.align.service
Class QueryMediator
java.lang.Object
fr.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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
query
private java.lang.String query
alignment
private Alignment alignment
processor
private QueryProcessor processor
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
query
public Result query(java.lang.String query,
Type type)
- Specified by:
query
in interface QueryProcessor
- Parameters:
query
- -- The query stringtype
- -- 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
..no bottom yet...