Klasse FWSimOutputManager

java.lang.Object
net.simplace.sim.io.output.FWSimOutputManager

public class FWSimOutputManager extends Object
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
Autor:
Andreas Enders
  • Konstruktordetails

    • FWSimOutputManager

      public FWSimOutputManager(FWSimSession aFwSimSession)
      Parameter:
      aFwSimSession -
  • Methodendetails

    • 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
      Parameter:
      aOutput -
      aVarMap -
      aProjectMode -
      Siehe auch:
    • addOutput

      public void addOutput(FWSimOutput aOutput)
      Parameter:
      aOutput - to add
    • getOutput

      public FWSimOutput getOutput(String aName)
      Parameter:
      aName -
      Gibt zurück:
      the FWSimOutput with given name
    • OUTPUT

      public void OUTPUT(LocalDateTime aCurrentDate, FWSimVarMap aVarMap, String aOutputType)
      outputs the content of VarMap to all configured output adapters
      Parameter:
      aCurrentDate -
      aVarMap -
      aOutputType -
    • outputCalibrationResult

      public void outputCalibrationResult(FWSimVarMap aVarMap)
      outputs the content of VarMap to all configured output adapters
      Parameter:
      aVarMap - Array of selected Simulations data
    • calculateStatistics

      public void calculateStatistics(FWSimVarMap aVarMap)
      outputs the content of VarMap to all configured output adapters
      Parameter:
      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

      public boolean updateInterface(FWSimInterface<?> aInterface, FWSimVarMap aVarMap)
      Parameter:
      aInterface -
      aVarMap -
      Gibt zurück:
      true, if an interface was updated successfully, otherwise returns false
    • initializeOutputs

      public void initializeOutputs(FWSimVarMap aVarMap, FWSimProject.PROJECT_MODE aProject_MODE)
      Parameter:
      aVarMap -
      aProject_MODE -
    • isOutputStillWriting

      public boolean isOutputStillWriting()
      run all output writers in own threads - started once after initializing the system.
      Gibt zurück:
      if output queue is still writing
    • reset

      public void reset() throws Exception
      Löst aus:
      Exception
      Siehe auch:
    • getOutputAdapters

      public ArrayList<FWSimOutputAdapter> getOutputAdapters()
      Gibt zurück:
      all the output adapters
    • getInterface

      public FWSimInterface<?> getInterface(String aName)
      Parameter:
      aName -
      Gibt zurück:
      the connected Interface to the output adapters
    • registerOutputListener

      public void registerOutputListener(FWSimOutputListener aOutputListener)
      Parameter:
      aOutputListener -
    • removeOutputListener

      public void removeOutputListener(FWSimOutputListener aOutputListener)
      Parameter:
      aOutputListener -
    • registerSimulations

      public void registerSimulations(List<FWSimSimulation> aSimulations)
      Parameter:
      aSimulations -
    • finishSimulationOutputs

      public void finishSimulationOutputs(FWSimVarMap aVarMap)
      removes the output caches from the outputs.
      Parameter:
      aVarMap -
    • clearSimulations

      public void clearSimulations()
    • isWriterThreadStarted

      public boolean isWriterThreadStarted()
      Gibt zurück:
      the isWriterThreadStarted
    • checkSkipAboveSize

      public boolean checkSkipAboveSize(FWSimVarMap aVarMap)
      Parameter:
      aVarMap -
      Gibt zurück:
      if project should be skiped
    • updateAdapter

      public void updateAdapter(FWSimVarMap aVarMap)
      updates the FWSimVarMap in all stored FWSimResourceCache
      Parameter:
      aVarMap -
    • removeAdapter

      public void removeAdapter(FWSimFieldContainer aFieldContainer)
      removes an FWSimOutput to remove it from solution - used in GUI
      Parameter:
      aFieldContainer -
    • toXML

      public org.jdom2.Element toXML()
      removes an FWSimOutput to remove it from solution - used in GUI
      Parameter:
      aFieldContainer -