org.jactr.tools.itr.ortho.exec
Class ExecAnalyzer

java.lang.Object
  extended by org.jactr.tools.itr.ortho.exec.ExecAnalyzer
All Implemented Interfaces:
org.jactr.core.utils.parameter.IParameterized, ISliceAnalyzer

public class ExecAnalyzer
extends java.lang.Object
implements ISliceAnalyzer, org.jactr.core.utils.parameter.IParameterized

default slice analyzer that has a single parameter AnalysisScript which will be executed when the analysis is requested. This allows aribitrary analysis tools to be used.

There are special variables that can be expanded on the command line: ${parameters} will expand to a space separated list of key=value pairs for the parameters manipulated. ${start} and ${stop} expand to the iteration indexes for this slice. ${directories} expands to a space separated list of the model execution directories (relative to the root working directory). ${workingDir} expands to the location of the prefered working directory for this particular analysis (typically: {root}/report/{sliceNumber}).

This analyzer can also parse limited output from the analysis script. One item per line, the analyzer looks for the following tokens:
FIT: label key1 value1 key2 value2
DETAIL: label workingDirRelativeFileLocation
IMAGE: label workingDirRelativeFileLocation

DETAIL: and IMAGE: allow you to return the label and location of images or additional information files. FIT: allows you to return a label for the fit of a specific metric, followed by the actual statistic names and values. It also looks for a specific key of 'flag' and value 'true' or 'false', which it uses to highlight the particular slice.

Author:
harrison

Field Summary
static java.lang.String DETAIL_KEY
           
static java.lang.String DIRECTORIES_OPTION
           
static java.lang.String FIT_KEY
           
static java.lang.String IMAGE_KEY
           
static java.lang.String PARAMETERS_OPTION
           
static java.lang.String SCRIPT
           
static java.lang.String START_INDEX_OPTION
           
static java.lang.String STOP_INDEX_OPTION
           
static java.lang.String WORKING_DIRECTORY_OPTION
           
 
Constructor Summary
ExecAnalyzer()
           
 
Method Summary
 java.lang.Object analyze(ISliceAnalysis sliceAnalysis)
          analyze the specified slice and return some value.
 java.lang.String getParameter(java.lang.String key)
           
 java.util.Collection<java.lang.String> getPossibleParameters()
           
 java.util.Collection<java.lang.String> getSetableParameters()
           
 void setParameter(java.lang.String key, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCRIPT

public static final java.lang.String SCRIPT
See Also:
Constant Field Values

PARAMETERS_OPTION

public static final java.lang.String PARAMETERS_OPTION
See Also:
Constant Field Values

START_INDEX_OPTION

public static final java.lang.String START_INDEX_OPTION
See Also:
Constant Field Values

STOP_INDEX_OPTION

public static final java.lang.String STOP_INDEX_OPTION
See Also:
Constant Field Values

DIRECTORIES_OPTION

public static final java.lang.String DIRECTORIES_OPTION
See Also:
Constant Field Values

WORKING_DIRECTORY_OPTION

public static final java.lang.String WORKING_DIRECTORY_OPTION
See Also:
Constant Field Values

FIT_KEY

public static final java.lang.String FIT_KEY
See Also:
Constant Field Values

DETAIL_KEY

public static final java.lang.String DETAIL_KEY
See Also:
Constant Field Values

IMAGE_KEY

public static final java.lang.String IMAGE_KEY
See Also:
Constant Field Values
Constructor Detail

ExecAnalyzer

public ExecAnalyzer()
Method Detail

analyze

public java.lang.Object analyze(ISliceAnalysis sliceAnalysis)
Description copied from interface: ISliceAnalyzer
analyze the specified slice and return some value. This value is entirely modeler dependent, however it should likely be serializable so that the results can be collected and transmitted back when this finally supports distributed execution

Specified by:
analyze in interface ISliceAnalyzer
Returns:

getParameter

public java.lang.String getParameter(java.lang.String key)
Specified by:
getParameter in interface org.jactr.core.utils.parameter.IParameterized

getPossibleParameters

public java.util.Collection<java.lang.String> getPossibleParameters()
Specified by:
getPossibleParameters in interface org.jactr.core.utils.parameter.IParameterized

getSetableParameters

public java.util.Collection<java.lang.String> getSetableParameters()
Specified by:
getSetableParameters in interface org.jactr.core.utils.parameter.IParameterized

setParameter

public void setParameter(java.lang.String key,
                         java.lang.String value)
Specified by:
setParameter in interface org.jactr.core.utils.parameter.IParameterized