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, localNVUloggerName, postMethods, preMethods, sessionRefarguments, 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.
|
executeexecute, executePostMethods, executePreMethods, getAoSessionFromContextWithSessionRef, getId, getOdsCache, getPointTo, getSessionRef, getType, isPedantic, setGathermode, setId, setPointTo, setPostMethods, setPreMethods, setSessionRef, setType, toString, toString, toStringaddAttributesToNameValueUnitArray, 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, setDescriptorclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetContext, getDescriptor, setArguments, setContext, setDescriptorprotected 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
AbstractSequencerRuleAbstractSequencerRule.localNVU field.
If rule property 'CLEANAFTERGET' was set to true,
the nvu field of the rule is wiped to clear memory.getValue in interface RuleIFgetValue in class AbstractSequencerRuleRuleExceptionRuleIF.getValue()public void setValue(NameValueUnit[][] nvu) throws RuleException
RuleIFnvu - The name value of the rule.RuleExceptionprotected 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 valuesAoExceptionRuleExceptionprotected TS_ValueSeq createInvalidValueSeq(DataType dt, int nrOfNewValues) throws RuleException
dt - The data type of the valuesnrOfNewValues - The number of values to createRuleExceptionprotected java.util.Hashtable<java.lang.String,java.lang.Integer> getExistingColumns(ValueMatrix vm) throws AoException
AoExceptionprotected java.util.HashSet<java.lang.String> getIndependentColumns(ValueMatrix vm) throws AoException
AoExceptionprotected void checkUnits(ElementHolder[] meqHolders, ElementHolder unitHolder) throws RuleException
RuleExceptionprotected void checkQuantities(ElementHolder[] meqHolders, ElementHolder qtyHolder) throws RuleException
RuleExceptionprotected void elementToOdsCache(java.lang.String baseElement,
NameValueUnit[][] nvu)
throws RuleException
RuleExceptionpublic void init()
throws InitializationFailedException
init in interface ImplementationIFinit in class AbstractSequencerRuleInitializationFailedException - if the initialization fails.public void terminate()
throws TerminationException
AbstractSequencerRuleterminate in interface ExecutableIFterminate in class AbstractSequencerRuleTerminationException - if termination fails.AbstractRule.terminate()