public class MeasurementToRule extends AbstractSequencerRule
Modifier and Type | Field and Description |
---|---|
protected boolean |
abortOnMissingTargetAttr |
protected boolean |
allowColumnMismatch |
protected java.lang.String |
defaultQuantity |
protected java.lang.String |
defaultUnit |
protected java.lang.String |
errorReasonProperty |
protected boolean |
ignoreMissingValuesToAppend |
protected java.lang.String |
insertMode |
protected java.lang.String |
keyword |
protected boolean |
logExisting |
protected java.lang.String |
meaHolderRef |
protected ODSCache |
odsCache |
protected java.lang.String |
odsCacheRef |
protected boolean |
performCleanup |
protected boolean |
rememberInstancesId |
protected boolean |
versionIsLong |
protected boolean |
writeCatalogs |
cleanAfterGet, localNVU
loggerName, postMethods, preMethods, sessionRef
arguments, ctx, descriptor, NEW_LINE
Constructor and Description |
---|
MeasurementToRule() |
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 void |
checkQuantities(ElementHolder[] meqHolders,
ElementHolder qtyHolder) |
protected void |
checkUnits(ElementHolder[] meqHolders,
ElementHolder unitHolder) |
protected TS_ValueSeq |
createInvalidValueSeq(DataType dt,
int nrOfNewValues)
Create a TS_ValueSeq with invalid values of the specified data type
|
protected void |
elementToOdsCache(java.lang.String baseElement,
NameValueUnit[][] nvu) |
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) |
protected java.util.HashSet<java.lang.String> |
getIndependentColumns(ValueMatrix vm) |
NameValueUnit[][] |
getValue()
The getValue method, return the values of the
AbstractSequencerRule.localNVU field. |
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 |
setValue(NameValueUnit[][] nvu)
Set the named values to rule.
|
void |
terminate()
The terminate method reset the class variables.
|
execute
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 meaHolderRef
protected java.lang.String keyword
protected boolean rememberInstancesId
protected java.lang.String insertMode
protected boolean writeCatalogs
protected boolean performCleanup
protected boolean logExisting
protected boolean versionIsLong
protected java.lang.String defaultUnit
protected java.lang.String defaultQuantity
protected boolean abortOnMissingTargetAttr
protected boolean ignoreMissingValuesToAppend
protected java.lang.String errorReasonProperty
protected boolean allowColumnMismatch
protected java.lang.String odsCacheRef
public NameValueUnit[][] getValue() throws RuleException
AbstractSequencerRule
AbstractSequencerRule.localNVU
field.
If rule property 'CLEANAFTERGET' was set to true,
the nvu field of the rule is wiped to clear memory.getValue
in interface RuleIF
getValue
in class AbstractSequencerRule
RuleException
RuleIF.getValue()
public void setValue(NameValueUnit[][] nvu) throws RuleException
RuleIF
nvu
- The name value of the rule.RuleException
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
AoException
protected java.util.HashSet<java.lang.String> getIndependentColumns(ValueMatrix vm) throws AoException
AoException
protected void checkUnits(ElementHolder[] meqHolders, ElementHolder unitHolder) throws RuleException
RuleException
protected void checkQuantities(ElementHolder[] meqHolders, ElementHolder qtyHolder) throws RuleException
RuleException
protected void elementToOdsCache(java.lang.String baseElement, NameValueUnit[][] nvu) throws RuleException
RuleException
public void init() throws InitializationFailedException
init
in interface ImplementationIF
init
in class AbstractSequencerRule
InitializationFailedException
- if the initialization fails.public void terminate() throws TerminationException
AbstractSequencerRule
terminate
in interface ExecutableIF
terminate
in class AbstractSequencerRule
TerminationException
- if termination fails.AbstractRule.terminate()