Package net.simplace.sim.io.output
Class FWSimOutputManager
java.lang.Object
net.simplace.sim.io.output.FWSimOutputManager
With the output part of the main configuration xml the outputters are
instantiated in their given format and field (var-Map), frequence (Yearly,
Monthly, Daily, Complex) and generalization method (Sum,Mean,Max, Min,
Complex Rule (Value at day of Anthesis)) Singleton implementation Holds
different out putters for the model threads Ensures the efficient use of the
resources Takes data via VarMap and the containing SimVariables Values are
piped into the different output adapters Division between Data format and
content using IO Interfaces Able to abstract data access format as Database
via SQL Excel (csv) Uses File Access Pool and Connection Pool Have own
Threads for writing output
- Author:
- Andreas Enders
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addOutput
(FWSimOutput aOutput) void
addOutput
(org.jdom2.Element aOutput, FWSimVarMap aVarMap, FWSimProject.PROJECT_MODE aProjectMode) adds an output to the list of outputs. for format description of the xml-structure seevoid
calculateStatistics
(FWSimVarMap aVarMap) outputs the content of VarMap to all configured output adaptersboolean
checkSkipAboveSize
(FWSimVarMap aVarMap) void
void
finishSimulationOutputs
(FWSimVarMap aVarMap) removes the output caches from the outputs.getInterface
(String aName) void
initializeOutputs
(FWSimVarMap aVarMap, FWSimProject.PROJECT_MODE aProject_MODE) boolean
run all output writers in own threads - started once after initializing the system.boolean
void
OUTPUT
(LocalDateTime aCurrentDate, FWSimVarMap aVarMap, String aOutputType) outputs the content of VarMap to all configured output adaptersvoid
outputCalibrationResult
(FWSimVarMap aVarMap) outputs the content of VarMap to all configured output adaptersvoid
registerOutputListener
(FWSimOutputListener aOutputListener) void
registerSimulations
(List<FWSimSimulation> aSimulations) void
removeAdapter
(FWSimFieldContainer aFieldContainer) removes anFWSimOutput
to remove it from solution - used in GUIvoid
removeOutputListener
(FWSimOutputListener aOutputListener) void
reset()
void
run all output writers in own threads - started once after initializing the system.void
stop all output writers in own threads - stopped imediately after stopping the session once after initializing the system.void
updateAdapter
(FWSimVarMap aVarMap) updates theFWSimVarMap
in all storedFWSimResourceCache
boolean
updateInterface
(FWSimInterface<?> aInterface, FWSimVarMap aVarMap)
-
Constructor Details
-
FWSimOutputManager
- Parameters:
aFwSimSession
-
-
-
Method Details
-
addOutput
public void addOutput(org.jdom2.Element aOutput, FWSimVarMap aVarMap, FWSimProject.PROJECT_MODE aProjectMode) adds an output to the list of outputs. for format description of the xml-structure see- Parameters:
aOutput
-aVarMap
-aProjectMode
-- See Also:
-
addOutput
- Parameters:
aOutput
- to add
-
getOutput
- Parameters:
aName
-- Returns:
- the FWSimOutput with given name
-
OUTPUT
outputs the content of VarMap to all configured output adapters- Parameters:
aCurrentDate
-aVarMap
-aOutputType
-
-
outputCalibrationResult
outputs the content of VarMap to all configured output adapters- Parameters:
aVarMap
- Array of selected Simulations data
-
calculateStatistics
outputs the content of VarMap to all configured output adapters- Parameters:
aVarMap
-
-
runOutputWriters
public void runOutputWriters()run all output writers in own threads - started once after initializing the system. -
stopOutputWriters
public void stopOutputWriters()stop all output writers in own threads - stopped imediately after stopping the session once after initializing the system. -
updateInterface
- Parameters:
aInterface
-aVarMap
-- Returns:
- true, if an interface was updated successfully, otherwise returns false
-
initializeOutputs
- Parameters:
aVarMap
-aProject_MODE
-
-
isOutputStillWriting
public boolean isOutputStillWriting()run all output writers in own threads - started once after initializing the system.- Returns:
- if output queue is still writing
-
reset
- Throws:
Exception
- See Also:
-
getOutputAdapters
- Returns:
- all the output adapters
-
getInterface
- Parameters:
aName
-- Returns:
- the connected Interface to the output adapters
-
registerOutputListener
- Parameters:
aOutputListener
-
-
removeOutputListener
- Parameters:
aOutputListener
-
-
registerSimulations
- Parameters:
aSimulations
-
-
finishSimulationOutputs
removes the output caches from the outputs.- Parameters:
aVarMap
-
-
clearSimulations
public void clearSimulations() -
isWriterThreadStarted
public boolean isWriterThreadStarted()- Returns:
- the isWriterThreadStarted
-
checkSkipAboveSize
- Parameters:
aVarMap
-- Returns:
- if project should be skiped
-
updateAdapter
updates theFWSimVarMap
in all storedFWSimResourceCache
- Parameters:
aVarMap
-
-
removeAdapter
removes anFWSimOutput
to remove it from solution - used in GUI- Parameters:
aFieldContainer
-
-