uk.ac.ic.doc.automed.p2p.qproc
Class SMRQueryProcessor

java.lang.Object
  extended by uk.ac.bbk.dcs.automed.qproc.QueryProcessor
      extended by uk.ac.ic.doc.automed.p2p.qproc.SMRQueryProcessor

public class SMRQueryProcessor
extends QueryProcessor

A customised query processor for the SMR overlay network

Author:
Duc Minh Le

Field Summary
protected  java.util.logging.Logger _logger
           
protected  long afterEv
           
protected  long afterLO
           
protected  long afterQAFP
           
protected  long afterQR
           
protected  long afterSubmit
           
protected  long afterTranslation
           
protected  long afterVU
           
protected  long beforeTranslation
           
private static java.util.List idLog
          a list of id log
private static long QPROC_MIN_TIME
          min processing time in millsecs
 
Fields inherited from class uk.ac.bbk.dcs.automed.qproc.QueryProcessor
_annQ, _jAnnQ, _optQ, _orgQ, _qbTransl, _refQ, _vunQ, annotationTime, evaluationTime, evaluationWrappersTime, METRIC_ANNOTATION_TIME, METRIC_EVALUATION_TIME, METRIC_EVALUATION_WRAPPERS_TIME, METRIC_OPTIMISATION_TIME, METRIC_POSTQUERYING_TIME, METRIC_PREQUERYING_TIME, METRIC_REFORMULATION_TIME, METRIC_TOTAL_PROCESSING_TIME, METRIC_TRANSLATION_TIME, METRIC_UNIFICATION_TIME, optimisationTime, postqueryingTime, prequeryingTime, QUERY_AFTER_ANNOTATION, QUERY_AFTER_JOIN_ANNOTATION, QUERY_AFTER_OPTIMISATION, QUERY_AFTER_REFORMULATION, QUERY_AFTER_VARIABLE_UNIFICATION, QUERY_BEFORE_PROCESSING, reformulationTime, totalProcessingTime, translationTime, unificationTime
 
Constructor Summary
SMRQueryProcessor()
          Create an instance of the Query Processor.
 
Method Summary
protected  java.util.List concurrentEvaluation(ASG g, QueryProcessorConfiguration qpc)
          Evaluate sub-queries concurrently
protected  void evaluate(ASG g, QueryProcessorConfiguration qpc)
          Override the evaluator() method of the standard QueryProcessor class.
private  void evaluateSubqueries(java.util.List wrappers, QueryProcessorConfiguration qpc)
           
static java.lang.String getDefaultReformulatorAlgorithmName()
           
static java.lang.Object[] getSMRReformulatorAlgorithmNames()
           
private  void identifySubqueries(java.lang.String rootQueryID, Cell c, java.util.List wrappers, QueryProcessorConfiguration qpc)
           
static void insertIDLog(java.lang.String id)
           
 
Methods inherited from class uk.ac.bbk.dcs.automed.qproc.QueryProcessor
annotate, evaluateIncrementally, getConfiguration, getDataSourceTargets, getMetric, getQuery, loggingInit, logInputParameters, logPerformance, optimise, postQuerying, prepareIQLQuery, preQuerying, process, process, process, process, processIncrementally, processIncrementally, processIncrementally, processPreparedIQLQuery, reformulate, unify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_logger

protected java.util.logging.Logger _logger

QPROC_MIN_TIME

private static final long QPROC_MIN_TIME
min processing time in millsecs

See Also:
Constant Field Values

afterSubmit

protected long afterSubmit

afterQR

protected long afterQR

afterVU

protected long afterVU

afterLO

protected long afterLO

afterQAFP

protected long afterQAFP

afterEv

protected long afterEv

beforeTranslation

protected long beforeTranslation

afterTranslation

protected long afterTranslation

idLog

private static java.util.List idLog
a list of id log

Constructor Detail

SMRQueryProcessor

public SMRQueryProcessor()
Create an instance of the Query Processor. More than one instance can be created without possibility of inteference with any other instance of the query processor.

Method Detail

getSMRReformulatorAlgorithmNames

public static java.lang.Object[] getSMRReformulatorAlgorithmNames()

getDefaultReformulatorAlgorithmName

public static java.lang.String getDefaultReformulatorAlgorithmName()

insertIDLog

public static void insertIDLog(java.lang.String id)

evaluate

protected void evaluate(ASG g,
                        QueryProcessorConfiguration qpc)
                 throws QProcException
Override the evaluator() method of the standard QueryProcessor class. In this method, we basically 'merge' the ASG lists of each sub-query result into an ASG (Bag-type). Conventional query processing operators (e.g. join etc.) do not apply here.

Overrides:
evaluate in class QueryProcessor
Parameters:
g -
qpc -
Throws:
QProcException

concurrentEvaluation

protected java.util.List concurrentEvaluation(ASG g,
                                              QueryProcessorConfiguration qpc)
                                       throws QueryEvaluationException
Evaluate sub-queries concurrently

Throws:
QueryEvaluationException

evaluateSubqueries

private void evaluateSubqueries(java.util.List wrappers,
                                QueryProcessorConfiguration qpc)
                         throws QueryEvaluationException
Throws:
QueryEvaluationException

identifySubqueries

private void identifySubqueries(java.lang.String rootQueryID,
                                Cell c,
                                java.util.List wrappers,
                                QueryProcessorConfiguration qpc)
                         throws ProviderInitialisationException
Throws:
ProviderInitialisationException