public class OdsCache extends AbstractImplementation implements ExecutableIF
arguments, ctx, descriptor, NEW_LINE
Constructor and Description |
---|
OdsCache()
Constructor of the ODS Cache
|
Modifier and Type | Method and Description |
---|---|
void |
execute()
The execute, nothing to do.
|
void |
fillTS_ValueSeq(TS_ValueSeq val,
ApplRel ar,
java.lang.String[] strVals)
Fill the TS_ValueSeq with the values from the string values.
|
void |
fillTS_ValueSeq(TS_ValueSeq val,
java.lang.String elementName,
ApplAttr aa,
java.lang.String[] strVals)
Fill the TS_ValueSeq with the values from the string values.
|
ApplElemAccess |
getApplElemAccess()
Get the appl elem access object from cache.
|
ApplicationStructure |
getApplicationStructure()
Get the application structure object from cache.
|
ApplAttr |
getAttributeByBaseName(java.lang.String elementName,
java.lang.String baName)
Get the attribute of the element specified by the base attribute name.
|
ApplAttr |
getAttributeByName(java.lang.String elementName,
java.lang.String aaName)
Get the attribute of the element specified by the attribute name.
|
java.util.HashMap<java.lang.String,ApplAttr> |
getAttributes(java.lang.String elementName)
Get the attributes of the element.
|
T_LONGLONG |
getElementId(java.lang.String elementName)
Get the Id of the application element defined by the application element name.
|
java.lang.String |
getElementName(java.lang.Long aid)
Get the name of the application element defined by the application element Id.
|
java.lang.String |
getElementName(T_LONGLONG aid)
Get the name of the application element defined by the application element Id.
|
java.lang.String[] |
getElementNamesByBaseType(java.lang.String beType)
Get the names of the application element defined by base element name .
|
java.util.HashMap<java.lang.String,java.lang.Integer> |
getEnumDef(java.lang.String identifier)
Get the enumeration definition for the identifier.
|
java.util.HashMap<java.lang.String,java.lang.Integer> |
getEnumDef(java.lang.String aeName,
java.lang.String aaName)
Get the enumeration definition for the attribute of the element.
|
DataType |
getIdDataType()
Get the datatype of the Id.
|
T_LONGLONG |
getInstanceId(java.lang.String aeName,
java.lang.String ieName)
Get the Id of the instance element of the application.
|
ApplRel |
getRelation(java.lang.String elementName,
java.lang.String arName)
Get the relation of the element specified by the name.
|
ApplRel |
getRelationByBaseRelName(java.lang.String elementName,
java.lang.String brName)
Get the relation of the element specified by the base relation name.
|
java.util.HashMap<java.lang.String,ApplRel> |
getRelations(java.lang.String elementName)
Get the relations of the element.
|
AoSession |
getSession()
Get the ASAM ODS session.
|
ElemId |
getTargetElemId(java.lang.String identifier)
Get the element Id from the target from the identifier.
|
ElemId |
getTargetElemId(java.lang.String aeName,
java.lang.String id)
Get the element Id from the target from the application element name and instance Id.
|
void |
init()
Initialize the ODS Cache.
|
boolean |
isTopElement(java.lang.String elementName)
Get if the application element is a top level element.
|
java.lang.String[] |
listAttributes(java.lang.String elementName)
List the attributes from the element, in the list are all attributes given except the id, values, flags and
generation_parameters attribute.
|
java.lang.String[] |
listRelation(java.lang.String elementName,
boolean onlyNtoM)
List the relations from the element, not the forwards relations are reported.
|
java.lang.String |
makeIdentifier(java.lang.String aeName,
java.lang.String id)
Make an identifier from the application element name and the instance element Id.
|
void |
putEnumDef(java.lang.String identifier,
java.util.HashMap<java.lang.String,java.lang.Integer> enumDefMap)
Put the enumeration definition for an identifier in the map.
|
void |
putEnumDef(java.lang.String aeName,
java.lang.String aaName,
java.util.HashMap<java.lang.String,java.lang.Integer> enumDefMap)
Put the enumeration definition for an attribute of an element in the map.
|
void |
putTargetElemId(java.lang.String identifier,
ElemId iid)
Put the element Id from the target in the map for the given identifier.
|
void |
putTargetElemId(java.lang.String aeName,
java.lang.String id,
ElemId iid)
Put the element Id from the target in the map for the given application element name and instance Id.
|
void |
terminate()
the terminate, nothing to do.
|
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, toString, wait, wait, wait
getContext, getDescriptor, setArguments, setContext, setDescriptor
public void execute() throws ExecutableException
execute
in interface ExecutableIF
ExecutableException
- if execution fails.ExecutableIF.execute()
public void terminate() throws TerminationException
terminate
in interface ExecutableIF
TerminationException
- if termination fails.ExecutableIF.terminate()
public void init() throws InitializationFailedException
init
in interface ImplementationIF
init
in class AbstractImplementation
InitializationFailedException
- -
When one of the required arguments not exist.public DataType getIdDataType()
public java.lang.String getElementName(T_LONGLONG aid)
aid
- -
the application element Id.public java.lang.String getElementName(java.lang.Long aid)
aid
- -
the application element Id as long variablepublic java.lang.String[] getElementNamesByBaseType(java.lang.String beType)
beType
- -
the base element name.public T_LONGLONG getElementId(java.lang.String elementName)
elementName
- -
the application element name.public java.util.HashMap<java.lang.String,ApplAttr> getAttributes(java.lang.String elementName)
elementName
- -
the name of the element.public ApplAttr getAttributeByBaseName(java.lang.String elementName, java.lang.String baName)
elementName
- the name of the element.baName
- the name of the base attribute.public ApplAttr getAttributeByName(java.lang.String elementName, java.lang.String aaName)
elementName
- the name of the element.aaName
- the name of the attribute.public ApplRel getRelationByBaseRelName(java.lang.String elementName, java.lang.String brName)
elementName
- -
the name of the element.brName
- the name of the base relationpublic ApplRel getRelation(java.lang.String elementName, java.lang.String arName)
elementName
- -
the name of the element.arName
- the name of the relationpublic java.util.HashMap<java.lang.String,ApplRel> getRelations(java.lang.String elementName)
elementName
- -
the name of the element.public ElemId getTargetElemId(java.lang.String identifier)
identifier
- -
the identifierpublic ElemId getTargetElemId(java.lang.String aeName, java.lang.String id)
aeName
- -
the application element nameid
- -
the instance element Id.public void putTargetElemId(java.lang.String identifier, ElemId iid)
identifier
- -
the identifieriid
- -
the instance element Id.public void putTargetElemId(java.lang.String aeName, java.lang.String id, ElemId iid)
aeName
- -
the application element nameid
- -
the instance element Id.iid
- -
the instance element Id.public java.lang.String makeIdentifier(java.lang.String aeName, java.lang.String id)
aeName
- -
the application element nameid
- -
the instance element Id.public boolean isTopElement(java.lang.String elementName)
ElementName
- the name of the elementpublic void putEnumDef(java.lang.String aeName, java.lang.String aaName, java.util.HashMap<java.lang.String,java.lang.Integer> enumDefMap)
aeName
- -
the application element nameaaName
- -
the application attribute nameenumDefMap
- -
the map with the enumeration definition.public void putEnumDef(java.lang.String identifier, java.util.HashMap<java.lang.String,java.lang.Integer> enumDefMap)
identifier
- -
the application element nameenumDefMap
- -
the map with the enumeration definition.public java.util.HashMap<java.lang.String,java.lang.Integer> getEnumDef(java.lang.String aeName, java.lang.String aaName)
aeName
- -
the name of the application element.aaName
- -
the name of the application attributepublic java.util.HashMap<java.lang.String,java.lang.Integer> getEnumDef(java.lang.String identifier)
identifier
- the identifier.public ApplElemAccess getApplElemAccess()
public ApplicationStructure getApplicationStructure()
public AoSession getSession()
public java.lang.String[] listAttributes(java.lang.String elementName)
elementName
- -
the element namepublic java.lang.String[] listRelation(java.lang.String elementName, boolean onlyNtoM)
elementName
- -
the element nameonlyNtoM
- -
list only the names of the N:M relations.public void fillTS_ValueSeq(TS_ValueSeq val, java.lang.String elementName, ApplAttr aa, java.lang.String[] strVals) throws AoException
val
- -
the value sequenceelementName
- -
the name of the application element.aa
- -
the application attributestrVals
- -
the string values.AoException
- any occurring ASAM ODS exception or AO_NOT_IMPLEMENTED for the not implemented datatypes.public void fillTS_ValueSeq(TS_ValueSeq val, ApplRel ar, java.lang.String[] strVals) throws AoException
val
- -
the value sequenaa
- -
the application attributestrVals
- -
the string values.AoException
- any occring ASAM ODS exception or AO_NOT_IMPLEMENTED for the not implmented datatypes.public T_LONGLONG getInstanceId(java.lang.String aeName, java.lang.String ieName) throws AoException
aeName
- the application element nameieName
- the instance nameAoException
- any occuring ASAM ODS Exception