|
||||||||
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.CacheQueryReformulationProvider
public class CacheQueryReformulationProvider
Modified verions of the GAVQueryReformulationProvider
that does not require the schemes in a query to be only from the
global schema.
Field Summary | |
---|---|
private QueryProcessorConfiguration |
_qpc
|
protected java.util.logging.Logger |
logger
|
protected Schema |
sourceSchema
|
protected Schema[] |
targetSchemata
|
protected java.util.HashMap |
viewmap
Viewmap contains the constructs of the source schema in the LHS and the IQL view of each construct of the LHS in the RHS. |
Constructor Summary | |
---|---|
protected |
CacheQueryReformulationProvider()
|
|
CacheQueryReformulationProvider(Schema sourceschema,
Schema[] targetschemata)
Deprecated. use #GAVQueryReformulationProvider(Schema, Schema[], QueryProcessorConfiguration) instead |
|
CacheQueryReformulationProvider(Schema sourceSchema,
Schema[] targetSchemata,
QueryProcessorConfiguration qpc)
|
Method Summary | |
---|---|
private void |
branch(Cell n,
Schema fromSchema,
java.lang.Object[] tos)
Updates the view definitions (viewmap). |
protected void |
buildViews()
Traverses BAV pathways and builds GAV views. |
private void |
changeSchemaRef(Cell n,
Schema fromSchema,
Schema to)
Updates the view definition hashmap when the 'from' schema has only one 'to' schema. |
private void |
checkFinalConstructs()
|
void |
finalize()
|
static void |
main(java.lang.String[] args)
|
private static void |
o(java.lang.Object s)
|
private void |
populateViewMapLHS(Schema sourceSchema)
Populates the LHS of the viewmap with schemes from source schema |
private void |
processTransformation(Schema fromSchema,
Schema toSchema)
|
void |
reformulate(ASG g,
QueryProcessorConfiguration qpc)
Reformulates the query represented by the ASG g according to the view defintions it has stored. |
private void |
replace(SchemeInfo si,
Cell q,
Cell root)
|
private void |
replaceNullSchemaRefs(Cell r,
java.lang.String sName)
|
private void |
showViewMap()
|
private void |
tempFun(Cell c)
|
private void |
unifyViewDefinitions()
Performs variable unification on each view definition in the viewmap. |
private void |
updateSchemeInfo(Cell c)
|
private void |
updateSchemeInfoInViewMap()
Method goes through all view definitions and updates SchemeInfo objects with Model, ConstructType and Type information (if present in the repository). |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.logging.Logger logger
protected Schema sourceSchema
protected Schema[] targetSchemata
protected java.util.HashMap viewmap
private QueryProcessorConfiguration _qpc
Constructor Detail |
---|
protected CacheQueryReformulationProvider()
public CacheQueryReformulationProvider(Schema sourceschema, Schema[] targetschemata) throws QueryReformulationException
#GAVQueryReformulationProvider(Schema, Schema[], QueryProcessorConfiguration)
instead
QueryReformulationException
public CacheQueryReformulationProvider(Schema sourceSchema, Schema[] targetSchemata, QueryProcessorConfiguration qpc) throws QueryReformulationException
sourceschema
- the source schematargetschemata
- the target schemataqpc
- the input configuration
QueryReformulationException
- if there was a problem building the view definitions of the source schema constructs over target schema
constructsMethod Detail |
---|
protected void buildViews() throws QueryReformulationException
QueryReformulationException
IntegrityException
NotFoundException
private void showViewMap()
private void populateViewMapLHS(Schema sourceSchema)
sourceSchema
- the source schemaprivate void unifyViewDefinitions() throws QueryReformulationException
QueryReformulationException
QueryReformulationException
private void updateSchemeInfoInViewMap() throws NotFoundException
NotFoundException
private void updateSchemeInfo(Cell c) throws NotFoundException
NotFoundException
private void processTransformation(Schema fromSchema, Schema toSchema) throws NotFoundException, QueryReformulationException
NotFoundException
QueryReformulationException
private void replaceNullSchemaRefs(Cell r, java.lang.String sName)
private void replace(SchemeInfo si, Cell q, Cell root)
private void changeSchemaRef(Cell n, Schema fromSchema, Schema to) throws NotFoundException
n
- the view to be updatedfromSchema
- the 'from' schemato
- the 'to' schema
NotFoundException
private void branch(Cell n, Schema fromSchema, java.lang.Object[] tos) throws NotFoundException, QueryReformulationException
n
- the view definition to be updatedfromSchema
- the schema where the branching occurstos
- the schemas resulting from the branching
NotFoundException
QueryReformulationException
public void reformulate(ASG g, QueryProcessorConfiguration qpc) throws QueryReformulationException
QueryReformulationException
private void tempFun(Cell c)
public void finalize()
finalize
in class java.lang.Object
private void checkFinalConstructs()
private static 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 |