com.ge.grc.acuity.scriptprocessing
Class XRDQLProcessor

java.lang.Object
  extended bycom.ge.grc.acuity.scriptprocessing.AcuityScriptProcessor
      extended bycom.ge.grc.acuity.scriptprocessing.XRDQLProcessor

public class XRDQLProcessor
extends AcuityScriptProcessor

Author:
200005201 TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Constructor Summary
XRDQLProcessor()
           
 
Method Summary
 InteractionContent analyze(AcuityController ac, com.hp.hpl.jena.ontology.Individual script, InteractionContent ic)
          This method is called to analyze a script to determine, if possible, the subject and predicate of of an InteractionContent.
 java.lang.Object process(AcuityController ac, com.hp.hpl.jena.ontology.Individual script)
          Call this method to process a Script represented by an Individual in the model.
 java.lang.Object process(AcuityController ac, com.hp.hpl.jena.ontology.Individual script, java.util.List filters)
          Call this method to process a Script represented by an Individual in the model.
 java.lang.Object process(AcuityController ac, java.util.List stmts)
           
 java.lang.Object process(AcuityController ac, java.util.Map queries)
           
 java.lang.Object process(AcuityController ac, java.lang.String query)
          Call this method to process any xRDQL query.
 java.lang.Object process(AcuityController ac, java.lang.String[] query)
          Call this method to process an array of xRDQL queries.
static com.hp.hpl.jena.rdql.QueryResults rdqlQuery(AcuityController ac, java.lang.String queryStr)
           
static java.util.List xRDQLParse(java.lang.String stmts)
          Call this method to parse a series of xRDQL statements into a list of xRDQL statements.
 
Methods inherited from class com.ge.grc.acuity.scriptprocessing.AcuityScriptProcessor
combineResultsOfMultipleQueries, convertQueryColumnsToStandardDataTableListArray, tryNumericReduction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XRDQLProcessor

public XRDQLProcessor()
Method Detail

process

public java.lang.Object process(AcuityController ac,
                                java.lang.String query)
                         throws AcuityException
Call this method to process any xRDQL query.

Parameters:
query - - the query to be evaluated
Returns:
- If the query is a SELECT or CREATE, the returned Object will be an array of Lists of results in standard ACUITy data table format: List[2] where 0th element is a List of variable names (data table column headers) 1st element is a List of Lists, one for row of data. Each row will contain the same number of elements as there are variables in the query and represent a set of variable values satisfying the query. (CREATE will only have one column, e.g., [{i},{{newIndividual}}]. If the query is an UPDATE or INSERT, the List elements will be the Statements added to the ontology. If the query is a DELETE, the List elements will be Strings of the form "Statement '...' removed."
Throws:
AcuityException

process

public java.lang.Object process(AcuityController ac,
                                java.lang.String[] query)
                         throws AcuityException
Call this method to process an array of xRDQL queries.

Parameters:
query - - the query to be evaluated
Returns:
- If the query is a SELECT or CREATE, the returned Object will be an array of Lists of results in standard ACUITy data table format: List[2] where 0th element is a List of variable names (data table column headers) 1st element is a List of Lists, one for row of data. Each row will contain the same number of elements as there are variables in the query and represent a set of variable values satisfying the query. (CREATE will only have one column, e.g., [{i},{{newIndividual}}]. If the query is an UPDATE or INSERT, the List elements will be the Statements added to the ontology. If the query is a DELETE, the List elements will be Strings of the form "Statement '...' removed."
Throws:
AcuityException

process

public java.lang.Object process(AcuityController ac,
                                java.util.Map queries)
                         throws AcuityException
Throws:
AcuityException

process

public java.lang.Object process(AcuityController ac,
                                java.util.List stmts)
                         throws AcuityException
Throws:
AcuityException

xRDQLParse

public static java.util.List xRDQLParse(java.lang.String stmts)
                                 throws AcuityException
Call this method to parse a series of xRDQL statements into a list of xRDQL statements.

Parameters:
stmts - - the series of statements
Returns:
- List of individual statements
Throws:
AcuityException

rdqlQuery

public static com.hp.hpl.jena.rdql.QueryResults rdqlQuery(AcuityController ac,
                                                          java.lang.String queryStr)
                                                   throws AcuityException
Throws:
AcuityException

analyze

public InteractionContent analyze(AcuityController ac,
                                  com.hp.hpl.jena.ontology.Individual script,
                                  InteractionContent ic)
                           throws AcuityException
Description copied from class: AcuityScriptProcessor
This method is called to analyze a script to determine, if possible, the subject and predicate of of an InteractionContent. This subject and predicate can allow, for certain kinds of scripts, the construction of a getter and/or a setter statement for an ontology triple.

Specified by:
analyze in class AcuityScriptProcessor
Parameters:
ac -
ic -
Returns:
Throws:
AcuityException

process

public java.lang.Object process(AcuityController ac,
                                com.hp.hpl.jena.ontology.Individual script)
                         throws AcuityException
Description copied from class: AcuityScriptProcessor
Call this method to process a Script represented by an Individual in the model.

Specified by:
process in class AcuityScriptProcessor
Parameters:
ac - - the AcuityController instance asking for the script processing
script - - the Individual of type Script to be processed
Returns:
- an array of Lists of results in standard ACUITy data table format: List[2] where 0th element is a List of variable names (data table column headers) 1st element is a List of Lists, one for row of data. Each row will contain the same number of elements as there are variables in the query and represent a set of variable values satisfying the query.
Throws:
AcuityException

process

public java.lang.Object process(AcuityController ac,
                                com.hp.hpl.jena.ontology.Individual script,
                                java.util.List filters)
                         throws AcuityException
Description copied from class: AcuityScriptProcessor
Call this method to process a Script represented by an Individual in the model.

Specified by:
process in class AcuityScriptProcessor
Parameters:
ac - - the AcuityController instance asking for the script processing
script - - the Individual of type Script to be processed
filters - - any filters which are to be applied to the returned data
Returns:
- an array of Lists of results in standard ACUITy data table format: List[2] where 0th element is a List of variable names (data table column headers) 1st element is a List of Lists, one for row of data. Each row will contain the same number of elements as there are variables in the query and represent a set of variable values satisfying the query.
Throws:
AcuityException