|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.bbk.dcs.automed.qproc.reformulate.QueryReformulator
public class QueryReformulator
Responsible for reformulating a query along AutoMed pathways (GAV, LAV or BAV). Reformulation logic is the same irrespective of the reformulation technique(GAV, BAV, LAV). This is because the functionality to create composite views takes care of providing the correct set of views to the reformulation class. Query reformulator is constructed as an empty instance. When using the reformulate() method, the source schema, target schema and the query processor configuration is provided. Because of caching of composite and atomics views at lower levels, its very cheap to have any number of instances of this class and just use reformulate method whenever needed.
Field Summary | |
---|---|
protected java.util.logging.Logger |
_logger
|
protected java.lang.String |
_schemaPrefix
|
protected QueryProcessorConfiguration |
originalQpc
|
Constructor Summary | |
---|---|
QueryReformulator()
Constructs an instance of this class. |
Method Summary | |
---|---|
private void |
changeCollectionSemantics(Cell c,
java.lang.String desiredColType)
|
private void |
convertQueryToTargets(Cell qc,
Schema source,
Schema[] targets,
java.lang.String integrationSemantics,
QueryProcessorConfiguration qpc)
|
protected void |
convertSchemeToTarget(Cell n,
Schema source,
Schema[] targets,
java.lang.String integrationSemantics,
QueryProcessorConfiguration qpc)
|
private java.lang.String |
createIdQueryString(java.lang.String integrationSemantics,
Schema[] targets)
|
private CompositeViewMap |
getCompositeViewMap(Schema source,
Schema target,
QueryProcessorConfiguration qpc)
|
private Schema |
getDualModelDataSource(Schema target)
|
private java.lang.String |
getIdSemanticsFromPathways(Schema source,
Schema[] targets)
|
private Cell |
getTargetsIdSemantics(java.lang.String integrationSemantics,
Schema source,
Schema[] targets)
Semantics of how to combine the results from data sources. |
static void |
main(java.lang.String[] args)
|
protected void |
o(java.lang.Object s)
|
protected void |
o(java.lang.Object s,
java.util.logging.Level logLevel)
Logging functionality |
void |
reformulate(ASG query,
Schema source,
Schema[] targets,
java.lang.String integrationSemantics,
QueryProcessorConfiguration qpc)
Reformulate an IQL query based on a given configuration |
protected void |
reformulateInternal(Cell query,
Schema source,
Schema[] targets,
java.lang.String integrationSemantics,
QueryProcessorConfiguration qpc)
|
private void |
replaceIdGraph(Cell idc,
java.util.Map finalViewMap)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final java.lang.String _schemaPrefix
protected java.util.logging.Logger _logger
protected QueryProcessorConfiguration originalQpc
Constructor Detail |
---|
public QueryReformulator()
Method Detail |
---|
public void reformulate(ASG query, Schema source, Schema[] targets, java.lang.String integrationSemantics, QueryProcessorConfiguration qpc) throws QueryReformulationException
QueryReformulationProvider
reformulate
in interface QueryReformulationProvider
query
- an ASG
object of an IQL queryintegrationSemantics
- Semantics of how to combine results from various target
databases.qpc
- a
{@link QueryProcessingConfiguration) object specific for query reformulation
QueryReformulationException
protected void reformulateInternal(Cell query, Schema source, Schema[] targets, java.lang.String integrationSemantics, QueryProcessorConfiguration qpc) throws QueryReformulationException
QueryReformulationException
private void convertQueryToTargets(Cell qc, Schema source, Schema[] targets, java.lang.String integrationSemantics, QueryProcessorConfiguration qpc) throws QueryReformulationException
QueryReformulationException
protected void convertSchemeToTarget(Cell n, Schema source, Schema[] targets, java.lang.String integrationSemantics, QueryProcessorConfiguration qpc) throws QueryReformulationException
QueryReformulationException
private Schema getDualModelDataSource(Schema target)
private CompositeViewMap getCompositeViewMap(Schema source, Schema target, QueryProcessorConfiguration qpc) throws QueryReformulationException
QueryReformulationException
private void replaceIdGraph(Cell idc, java.util.Map finalViewMap) throws QueryReformulationException
QueryReformulationException
private Cell getTargetsIdSemantics(java.lang.String integrationSemantics, Schema source, Schema[] targets) throws QueryReformulationException
QueryReformulationException
private java.lang.String createIdQueryString(java.lang.String integrationSemantics, Schema[] targets)
private java.lang.String getIdSemanticsFromPathways(Schema source, Schema[] targets)
private void changeCollectionSemantics(Cell c, java.lang.String desiredColType)
protected void o(java.lang.Object s, java.util.logging.Level logLevel)
s
- logLevel
- protected void o(java.lang.Object s)
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |