net.simplace.sim.io.resources.FWSimResourceCache
Out of performance reasons the data from resources is stored within the ResourceCache. Herein a
Object[] is used to make the data accessible very fast.
The class provides the feature of reading and caching the resources. A table in an internal
database is created to be able to use net.simplace.sim.transformers.DefaultSQLStatementTransformer.
Cache is used by FWSimResourceTransformers and FWSimResourceAdapter.
public class FWSimResourceCache extends net.simplace.sim.io.FWSimCache {
// Public Constructors
public FWSimResourceCache(FWSimSession aFwSimSession, LinkedHashMap aKeyMap,
FWSimInputAdapter aResourceAdapter, String aUniqueID,
FWSimInterface.INTERFACE_TYPE aInterfaceType);
// Class Methods public static
FWSimResourceCache fromResultSet(
FWSimSession aFwSimSession,
String aProjectID, ResultSet aResultSet, LinkedHashMap aKeyMap,
FWSimInputAdapter aResourceAdapter, String aUniqueID,
FWSimInterface.INTERFACE_TYPE aInterfaceType);
factory method for data out of databases
- aFwSimSession
- aProjectID
- aResultSet
- aKeyMap
- aResourceAdapter
- aUniqueID
- aInterfaceType
returns the new created FWSimResourceCache
public static
FWSimResourceCache fromXML(
FWSimSession aFwSimSession, String
aProjectID, Element aConfiguration, String aXPath, LinkedHashMap aKeyMap,
FWSimResourceAdapter aResourceAdapter, String aUniqueID,
FWSimInterface.INTERFACE_TYPE aInterfaceType);
factory method for data out of xml files
- aFwSimSession
- aProjectID
- aConfiguration
- aXPath
- aKeyMap
- aResourceAdapter
- aUniqueID
- aInterfaceType
returns the new created FWSimResourceCache
// Public Instance Methods public void
fillVarMapFromCache(
FWSimVarMap aSimVarMap);
default method to get data out of this resource: Fill in
public void
removeVariable(String aID);
// Defines
net.simplace.sim.io.FWSimCache
use this method with care - data has to be synchronized with the HeaderVariables
public LinkedHashMap getKeyMap();
returns the key map of this Resource
public boolean
shouldUpdate(
FWSimVarMap aVarMap);
returns boolean if the rule is true or false
public Element toXML();
public Element getCreateFormXML();
public Element getEditFormXML(boolean aEnabled);
public
FWSimSession getCurrentSession();
returns current {@link FWSimSession}
public String toString(); // Overrides java.lang.Object
public String getUniqueID();
public boolean isFromTransformer();
returns
public LinkedList
splitCache(LinkedHashMap aKeyMap);
returns a list of splitted cache maps
}
Hierarchy: java.lang.Object - net.simplace.sim.io.FWSimCache (net.simplace.sim.util.FWSimFieldContainer) - FWSimResourceCache
Extended by: NetCDFResourceCache
Returned by: fromCSV(), fromResultSet(), fromXML(), FWSimInputAdapter.getData(), net.simplace.sim.io.resources.adapter.XMLResourceAdapter.getData(), net.simplace.sim.io.resources.adapter.NetCDFResourceAdapter.getData(), net.simplace.sim.io.resources.adapter.DatabaseResourceAdapter.getData(), net.simplace.sim.io.resources.adapter.CSVResourceAdapter.getData(), net.simplace.sim.transformers.DefaultSQLStatementTransformer.getData(), net.simplace.sim.transformers.DefaultRuleTransformer.getData(), net.simplace.sim.io.resources.adapter.XMLResourceAdapter.getData(), net.simplace.sim.io.resources.adapter.NetCDFResourceAdapter.getData(), net.simplace.sim.io.resources.adapter.CSVResourceAdapter.getData(), FWSimResourceManager.getResourceCache(), FWSimResourceTransformer.getSourceResourceCache()