|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ic.doc.rodex.qproc.QueryRewriteProcessor
public class QueryRewriteProcessor
Field Summary | |
---|---|
static int |
TYPE_BUCKET
|
static int |
TYPE_INVERSE_RULE
|
static int |
TYPE_MINICON
|
static int |
TYPE_MINICON_ADAPTIVE
|
static int |
TYPE_MINICON_DISTRIBUTED
|
static int |
TYPE_MINICON_NONCONJUNCTIVE
|
static int |
TYPE_RANGE_BASED
|
Constructor Summary | |
---|---|
QueryRewriteProcessor(Schema querySchema,
ASG query,
int type)
|
|
QueryRewriteProcessor(Schema querySchema,
QueryAnalyser qa,
int type)
|
Method Summary | |
---|---|
java.lang.String |
getExecutionalQuery(boolean rebuildIfExist)
Rewrite optimised query the same way as in getInternalQuery(boolean rebuildIfExist) to construct the executional query. |
java.lang.String |
getExternalQuery()
Get external query |
java.lang.String |
getFormuatedQuery()
Return the original formulated query |
java.lang.String |
getInternalQuery(boolean rebuildIfExist)
Rewrite formulated query string so that each scheme (sub-goal) is replaced by a unique scheme-obj-id in the repository. |
static SchemaObject[] |
getQueriedSchemaObjects(QueryAnalyser qa)
Return an array of schema objects being queried. |
QueryAnalyser |
getQueryMetadata()
Return the metadata ( QueryAnalyser ) object of the external query |
static java.lang.String |
getRepositoryFriendlyQuery(Schema defaultSchema,
QueryAnalyser qa)
A common method for building the repository-oriented representation of an IQL query One requirement for this is that the rewritting query must contain schema name for each scheme (subgoal) that it contains. |
ASG |
getResultASG()
Return the ASG representation of the cached views |
java.lang.String |
getResultString()
Return the String representation of the cached views |
void |
initRewriterEngine(ASG extent)
Create a new QueryWriter instance for range-based queries |
void |
initRewriterEngine(java.util.List cachedViews)
Create a new QueryWriter instance from a List of cached view String s |
void |
initRewriterEngine(QueryAnalyser[] viewMetadata)
Create a new QueryWriter instance from an array of metadata objects |
static java.lang.String |
joinIQLResult(java.util.List asgObjects)
|
void |
produceIQLResult(java.util.List asgObjects)
Once rewriting is performed, produce the IQL results |
QueryRewriterResult |
rewrite()
Rewrite query to produce QueryRewriterResult object |
void |
setFormulatedQuery(ASG formulatedQuery)
Setter for formulated query (i.e. |
void |
setOptimisedQuery(ASG optimisedQuery)
Store result of query optimisation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TYPE_BUCKET
public static final int TYPE_INVERSE_RULE
public static final int TYPE_MINICON
public static final int TYPE_MINICON_NONCONJUNCTIVE
public static final int TYPE_MINICON_ADAPTIVE
public static final int TYPE_MINICON_DISTRIBUTED
public static final int TYPE_RANGE_BASED
Constructor Detail |
---|
public QueryRewriteProcessor(Schema querySchema, ASG query, int type)
public QueryRewriteProcessor(Schema querySchema, QueryAnalyser qa, int type)
Method Detail |
---|
public void initRewriterEngine(java.util.List cachedViews)
QueryWriter
instance from a List
of cached view String
s
views
- a List
of cached views for rewriting querypublic void initRewriterEngine(QueryAnalyser[] viewMetadata) throws QueryRewriterException
QueryWriter
instance from an array of metadata objects
viewMetadata
- an array of QueryAnalyser
objects of the cached views
QueryRewriterException
public void initRewriterEngine(ASG extent)
QueryWriter
instance for range-based queries
viewMetadata
- an array of QueryAnalyser
objects of the cached viewspublic void setOptimisedQuery(ASG optimisedQuery)
public void setFormulatedQuery(ASG formulatedQuery)
public java.lang.String getFormuatedQuery()
public java.lang.String getExternalQuery()
public java.lang.String getInternalQuery(boolean rebuildIfExist) throws QueryIntegrityException
Schema
class
rebuildIfExist
- true|false
: whether to rebuild query if one already exists
QueryIntegrityException
public java.lang.String getExecutionalQuery(boolean rebuildIfExist) throws QueryIntegrityException
getInternalQuery(boolean rebuildIfExist)
rebuildIfExist
- true|false
: whether to rebuild query if one already exists
QueryIntegrityException
public static java.lang.String getRepositoryFriendlyQuery(Schema defaultSchema, QueryAnalyser qa) throws QueryIntegrityException
defaultSchema
- reference to the public Schema
to which schemes are attached{@link
- QueryAnalyser} the analyser object for looking up query elements
QueryIntegrityException
public static SchemaObject[] getQueriedSchemaObjects(QueryAnalyser qa) throws QueryIntegrityException
qa
- the QueryAnalyser
object associated to a query
QueryIntegrityException
public QueryRewriterResult rewrite() throws AutoMedException
QueryRewriterResult
object
AutoMedException
public QueryAnalyser getQueryMetadata() throws QueryIntegrityException
QueryAnalyser
) object of the external query
QueryIntegrityException
public void produceIQLResult(java.util.List asgObjects) throws QueryResultException
QueryResultException
public static java.lang.String joinIQLResult(java.util.List asgObjects) throws QueryResultException
QueryResultException
public java.lang.String getResultString()
String
representation of the cached views
public ASG getResultASG() throws ParseException
ASG
representation of the cached views
ParseException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |