com.ge.grc.acuity.scriptprocessing
Class AcuityScriptProcessor

java.lang.Object
  extended bycom.ge.grc.acuity.scriptprocessing.AcuityScriptProcessor
Direct Known Subclasses:
SingleValueProcessor, SPARQLProcessor, ValueListProcessor, XRDQLProcessor

public abstract class AcuityScriptProcessor
extends java.lang.Object

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

Constructor Summary
AcuityScriptProcessor()
           
 
Method Summary
abstract  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 combineResultsOfMultipleQueries(java.util.List results)
           
static java.lang.Object convertQueryColumnsToStandardDataTableListArray(java.util.List[] resultLists)
          Call this method to convert a List[] with name, values in each element to the data table format of List[2], 0th element a List of column names, 1st element a List of Lists of rows of data.
abstract  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.
abstract  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.
static java.lang.Object tryNumericReduction(java.lang.String v)
          Call this method to try to convert the input String to a number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AcuityScriptProcessor

public AcuityScriptProcessor()
Method Detail

process

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

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 abstract java.lang.Object process(AcuityController ac,
                                         com.hp.hpl.jena.ontology.Individual script,
                                         java.util.List filters)
                                  throws AcuityException
Call this method to process a Script represented by an Individual in the model.

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

analyze

public abstract InteractionContent analyze(AcuityController ac,
                                           com.hp.hpl.jena.ontology.Individual script,
                                           InteractionContent ic)
                                    throws AcuityException
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.

Parameters:
ac -
ic -
Returns:
Throws:
AcuityException

convertQueryColumnsToStandardDataTableListArray

public static java.lang.Object convertQueryColumnsToStandardDataTableListArray(java.util.List[] resultLists)
Call this method to convert a List[] with name, values in each element to the data table format of List[2], 0th element a List of column names, 1st element a List of Lists of rows of data.

Parameters:
resultLists -
Returns:

combineResultsOfMultipleQueries

public java.lang.Object combineResultsOfMultipleQueries(java.util.List results)
                                                 throws AcuityException
Parameters:
results -
Returns:
Throws:
AcuityException

tryNumericReduction

public static java.lang.Object tryNumericReduction(java.lang.String v)
Call this method to try to convert the input String to a number.

Parameters:
v -
Returns:
- Integer or Float