Class FWSimResourceAlias
java.lang.Object
net.simplace.sim.io.FWSimIOAdapter
net.simplace.sim.io.resources.FWSimInputAdapter
net.simplace.sim.io.resources.FWSimResourceAlias
- All Implemented Interfaces:
FWSimFieldContainer
An alias (
alias element) makes the data of another resource (attribute resource)
available under a second id. It reads nothing itself but returns the cache of the original resource.- Author:
- admin
-
Nested Class Summary
Nested classes/interfaces inherited from class FWSimIOAdapter
FWSimIOAdapter.FREQUENCE -
Field Summary
Fields inherited from class FWSimInputAdapter
iJexlScript, iShouldCacheToDBFields inherited from class FWSimIOAdapter
iArrayMode, iFieldcount, iFrequence, iHeaderVariables, iInterface, iJexlRule, iKeyMap, iName, iOrderNumber, iProcessTime, iResourceElement, iSession, iSourceKey -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFWSimResourceAlias(org.jdom2.Element aResourceElement, FWSimSession aSession, int aOrderNumber) Creates the alias from its element. -
Method Summary
Modifier and TypeMethodDescriptionstatic FWSimResourceAliascreateResourceAlias(FWSimSession aSession, org.jdom2.Element aAliasElement, int aOrderNumber) Factory method: creates an alias.getData(FWSimVarMap aVarMap) Returns the current cache of the original resource.org.jdom2.ElementtoXML()Creates thealiaselement with id, original resource, frequency, rule and header.Methods inherited from class FWSimInputAdapter
getContentType, getInputVariables, getJexlScript, getOutputVariables, getVarMap, isTransformer, setFrequenceAndRule, shouldCacheToDB, toHTMLTablestringMethods inherited from class FWSimIOAdapter
addProcessTime, addVariable, checkCondition, createFormFields, createVariables, finalize, getCreateFormXML, getEditFormXML, getFieldMap, getFrequence, getHeaderVariables, getHeaderXML, getInterface, getJexlRule, getKeyMap, getName, getOrderNumber, getVariable, isArrayMode, isConditionCheck, removeVariable, setInterface, setOrderNumber, toString, writeHeaderList
-
Constructor Details
-
FWSimResourceAlias
protected FWSimResourceAlias(org.jdom2.Element aResourceElement, FWSimSession aSession, int aOrderNumber) Creates the alias from its element.- Parameters:
aResourceElement- thealiaselementaSession- the sessionaOrderNumber- order number of the alias
-
-
Method Details
-
createResourceAlias
public static FWSimResourceAlias createResourceAlias(FWSimSession aSession, org.jdom2.Element aAliasElement, int aOrderNumber) throws MissingSimResourceException, DuplicateSimFieldException Factory method: creates an alias.- Parameters:
aSession- the sessionaAliasElement- thealiaselementaOrderNumber- order number of the alias- Returns:
- the created alias
- Throws:
MissingSimResourceException- if the attributeresourceis missingDuplicateSimFieldException- if a resource with the same id already exists
-
toXML
public org.jdom2.Element toXML()Creates thealiaselement with id, original resource, frequency, rule and header.- Returns:
- an XML element with all settings of this container
- See Also:
-
getData
Returns the current cache of the original resource.- Specified by:
getDatain classFWSimInputAdapter- Parameters:
aVarMap- variable map of the simulation (e.g. for the key values of the rule)- Returns:
- the cache containing the data read
- Throws:
MissingSimResourceException- if the original resource has no cache- See Also:
-
getResourceCache
- Returns:
- the cache of the original resource from the last
getData(FWSimVarMap)call
-