public class InsertPointsInExistingMeasurement extends AbstractMeasurementRule
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
errorReasonProperty |
protected boolean |
ignoreMissingValuesToAppend |
protected java.lang.String |
insertMode |
protected ODSCache |
odsCache |
protected java.lang.String |
odsCacheRef |
dumpFilePath, ignoreMissingValues, measurementHolderRef, resultRef
loggerName, postMethods, preMethods, sessionRef
arguments, ctx, descriptor, NEW_LINE
Constructor and Description |
---|
InsertPointsInExistingMeasurement() |
Modifier and Type | Method and Description |
---|---|
protected void |
appendInvalidValues(ValueMatrix vm,
java.lang.String name,
int nrOfNewValues)
Append invalid values to a local column that was removed from an existing submatrix
|
protected TS_ValueSeq |
createInvalidValueSeq(DataType dt,
int nrOfNewValues)
Create a TS_ValueSeq with invalid values of the specified data type
|
void |
execute()
Execute the program.
|
protected int |
getAttributeIndex(NameValueUnit[] nvu,
java.lang.String attrName)
Get the index on an attribute in the NameValueUnit[] of an instance
|
protected java.lang.String |
getAttributeValueAsString(NameValueUnit[] nvu,
java.lang.String attrName)
Get the values in the TS_Union as a String
|
protected java.util.Hashtable<java.lang.String,java.lang.Integer> |
getExistingColumns(ValueMatrix vm)
Get a Hashtable with name and Index of all columns in a valuematrix.
|
void |
init()
Check the properties and store them in fields for the execute() and
writeElement() methods.
|
short[] |
insertNewValuesToExisting(DataType dt,
TS_Value vNew,
TS_ValueSeq vOld,
short[] newFlags,
int indexToInsert)
Insert the new points in the correct position.
|
void |
terminate()
Terminate the execution.
|
getDumpFilePath, getMeasurementHolder, getValue, setValue, storeResult
execute, executePostMethods, executePreMethods, getAoSessionFromContextWithSessionRef, getId, getOdsCache, getPointTo, getSessionRef, getType, isPedantic, setGathermode, setId, setPointTo, setPostMethods, setPreMethods, setSessionRef, setType, toString, toString, toString
addAttributesToNameValueUnitArray, addAttributeToNameValueUnitArray, addStringValueToNameValueUnitArray, checkDirectoy, checkDirectoy, checkDirectoy, checkFile, checkFile, checkFile, checkIntValue, checkStringValue, compressNvuArray, createMessageFromPropertyFile, createMessageFromPropertyFile, createMessageFromPropertyFile, createTsUnionFromObject, deleteRowWithAttributes, getArguments, getContext, getDescriptor, getListFromProperty, getMandatoryProperty, getMandatoryProperty, getMandatoryPropertyAsInt, getMandatoryPropertyAsList, getMandatoryPropertyWithRuleException, getNvuArrayFromMap, getNvuArrayFromMap, getNvuObjectWithName, getNvuObjectWithName, getNvuObjectWithName, getOdsCacheFromProperty, getOptioanlPropertyAsInt, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsList, makeUpperCaseKeyword, removeAttributeFromNameValueUnitArray, removeAttributeFromNameValueUnitArray, setArguments, setContext, setDescriptor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getContext, getDescriptor, setArguments, setContext, setDescriptor
protected ODSCache odsCache
protected java.lang.String insertMode
protected boolean ignoreMissingValuesToAppend
protected java.lang.String errorReasonProperty
protected java.lang.String odsCacheRef
public void execute() throws ExecutableException
AbstractRule
execute
in interface ExecutableIF
execute
in class AbstractMeasurementRule
ExecutableException
- if execution fails.protected java.lang.String getAttributeValueAsString(NameValueUnit[] nvu, java.lang.String attrName)
nvu
- The NameValueUnit[] with the attributes of an instanceattrName
- The name of the attribute to get the TS_Union fromprotected int getAttributeIndex(NameValueUnit[] nvu, java.lang.String attrName)
nvu
- The NameValueUnit[] holding the attributes of an instanceattrName
- The attribute namepublic short[] insertNewValuesToExisting(DataType dt, TS_Value vNew, TS_ValueSeq vOld, short[] newFlags, int indexToInsert)
dt
- DataType of the valuesvNew
- The TS_Value structure with the new valuesvOld
- The TS_ValueSeq struchture with the existing valuesnewFlags
- The flags for the new valuesindexToInsert
- The index where the new values must be insertedprotected void appendInvalidValues(ValueMatrix vm, java.lang.String name, int nrOfNewValues) throws AoException, RuleException
vm
- The valuematrix with the existing valuesname
- The name of the local columnsnrOfNewValues
- The number of new valuesAoException
RuleException
protected TS_ValueSeq createInvalidValueSeq(DataType dt, int nrOfNewValues) throws RuleException
dt
- The data type of the valuesnrOfNewValues
- The number of values to createRuleException
protected java.util.Hashtable<java.lang.String,java.lang.Integer> getExistingColumns(ValueMatrix vm) throws AoException
vm
- The valueMatrix.AoException
public void init() throws InitializationFailedException
init
in interface ImplementationIF
init
in class AbstractMeasurementRule
InitializationFailedException
- if the initialization fails.public void terminate() throws TerminationException
AbstractRule
terminate
in interface ExecutableIF
terminate
in class AbstractRule
TerminationException
- if termination fails.