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);


// Public Instance Methods
public void fillVarMapFromCache(FWSimVarMap aSimVarMap);

default method to get data out of this resource: Fill in
public void addVariable(FWSimVariable aVariable); // Defines
net.simplace.sim.io.FWSimCache


use this method with care - data has to be synchronized with the HeaderVariables
public FWSimVariable getVariable(String aID); // Defines
net.simplace.sim.io.FWSimCache


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 Collection getOutputVariables(); // Defines
net.simplace.sim.io.FWSimCache


delivers a list from the header information
public Collection getInputVariables(); // Defines
net.simplace.sim.io.FWSimCache


returned list will always be empty! Resources have not input fields
public FWSimVariable.CONTENT_TYPE getContentType(); // Defines
net.simplace.sim.io.FWSimCache


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 FWSimInputAdapter getResourceAdapter();


returns
public LinkedList splitCache(LinkedHashMap aKeyMap);


returns a list of splitted cache maps
public FWSimVarMap getVarMap();

public FWSimInterface.INTERFACE_TYPE getInterfaceType();


returns the interfaceType
public void setInterfaceType(FWSimInterface.INTERFACE_TYPE aInterfaceType);



}



Hierarchy: java.lang.Object - net.simplace.sim.io.FWSimCache (net.simplace.sim.util.FWSimFieldContainer) - FWSimResourceCache



Extended by: NetCDFResourceCache



Returned by: FWSimInputAdapter.getData(), net.simplace.sim.io.resources.adapter.XMLResourceAdapter.getData(), net.simplace.sim.io.resources.adapter.NetCDFResourceAdapter.getData(), net.simplace.sim.io.resources.adapter.JSONResourceAdapter.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(), net.simplace.sim.io.resources.adapter.JSONResourceAdapter.getData(), FWSimResourceManager.getResourceCache(), FWSimResourceTransformer.getSourceResourceCache(), net.simplace.sim.io.interfaces.XMLInterface.read(), net.simplace.sim.io.interfaces.NetCDFInterface.read(), net.simplace.sim.io.interfaces.MEMORYInterface.read(), net.simplace.sim.io.interfaces.JSONInterface.read(), net.simplace.sim.io.interfaces.FWSimInterface.read(), net.simplace.sim.io.interfaces.DatabaseInterface.read(), net.simplace.sim.io.interfaces.CSVInterface.read(), net.simplace.sim.io.sync.FWSimSyncAdapter.sync()