Package net.simplace.sim.io.resources
Klasse FWSimResourceManager
java.lang.Object
net.simplace.sim.io.resources.FWSimResourceManager
With the resources part of the main configuration xml the resources are instantiated
Singleton implementation
Holds different resources for the model threads as
FWSimResourceCache
Ensures the efficient use of the resources
Presents data via Objects
Able to abstract data access format as
Database via SQL
Excel (csv)
XML
Uses File Access Pool and Connection Pool via IO Interfaces- Autor:
- Andreas Enders
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungaddAlias(FWSimSession aSession, org.jdom2.Element aAlias) addResource(FWSimSession aSession, org.jdom2.Element aResource) adds a Resource with given configuration in XML (jdom)voidaddResourceCreator(FWSimInputAdapter aAdapter) Resources and Transformers can be added by this method passing theaddTransform(FWSimSession aSession, org.jdom2.Element aTransform) calls all createVariable methods on all resourceCreators andgetResourceCache(String aSourceName) getResourceCreator(String aName) Resources and Transformers can be got by this getter method passing thereferenceKeys(LinkedHashMap<String, FWSimVariable<?>> aHeaderVariables, FWSimSolution aSolution) voidreset()booleanupdateInterface(FWSimInterface<?> aInterface, FWSimVarMap aVarMap) booleanupdateResources(FWSimVarMap aVarMap) resources are updated only for new projectsvoidupdateVarMap(FWSimVarMap aVarMap, boolean aForceUpdate) updates theFWSimVarMapin all storedFWSimResourceCache
-
Konstruktordetails
-
FWSimResourceManager
public FWSimResourceManager()
-
-
Methodendetails
-
addResource
public String addResource(FWSimSession aSession, org.jdom2.Element aResource) throws MissingSimResourceException, DuplicateSimFieldException adds a Resource with given configuration in XML (jdom)- Parameter:
aSession-aResource-- Gibt zurück:
- Name of the Resource
- Löst aus:
MissingSimResourceExceptionDuplicateSimFieldException
-
addTransform
public String addTransform(FWSimSession aSession, org.jdom2.Element aTransform) throws MissingSimResourceException, DuplicateSimFieldException - Parameter:
aSession-aTransform-- Gibt zurück:
- Name of the Transform
- Löst aus:
MissingSimResourceExceptionDuplicateSimFieldException
-
addAlias
public String addAlias(FWSimSession aSession, org.jdom2.Element aAlias) throws MissingSimResourceException, DuplicateSimFieldException - Parameter:
aSession-aAlias-- Gibt zurück:
- Name of the Alias
- Löst aus:
MissingSimResourceExceptionDuplicateSimFieldException
-
updateResources
resources are updated only for new projects- Parameter:
aVarMap-- Gibt zurück:
- boolean success
- Löst aus:
MissingSimResourceException
-
getResourceCreator
Resources and Transformers can be got by this getter method passing the- Parameter:
aName- to the method- Gibt zurück:
FWSimResourceAdapterorFWSimResourceTransformer
-
addResourceCreator
Resources and Transformers can be added by this method passing the- Parameter:
aAdapter- to add to the Collection of creators the method
-
updateInterface
- Parameter:
aInterface-aVarMap-- Gibt zurück:
- if update found an adaptor to update
-
createVariables
calls all createVariable methods on all resourceCreators and- Gibt zurück:
- the field map of all these
-
getResourceCache
- Parameter:
aSourceName-- Gibt zurück:
- the selected
FWSimResourceCache - Löst aus:
MissingSimResourceException
-
updateVarMap
updates theFWSimVarMapin all storedFWSimResourceCache- Parameter:
aVarMap-aForceUpdate-
-
getResourceAdapters
- Gibt zurück:
- all the resource creators
-
referenceKeys
public static Map<String,String> referenceKeys(LinkedHashMap<String, FWSimVariable<?>> aHeaderVariables, FWSimSolution aSolution) - Parameter:
aHeaderVariables-aSolution-- Gibt zurück:
- Map of referenced keys
-
reset
- Löst aus:
Exception- Siehe auch:
-