Class SimVarMapParameterContext

java.lang.Object
net.simplace.core.jexl.FWParameterContext
net.simplace.sim.util.SimVarMapParameterContext
All Implemented Interfaces:
org.apache.commons.jexl3.JexlContext

public class SimVarMapParameterContext extends FWParameterContext
Parameter context of a simulation variable map for FWParameterResolver: placeholders are replaced by the variable values (dates as date and time, arrays as {v1,v2,...}), expressions get the variable values themselves (e.g. arrays for ${x}[2]), as the rules of a solution do. Provides the project lines.
Author:
Andreas Enders
  • Constructor Details

    • SimVarMapParameterContext

      public SimVarMapParameterContext(FWSimVarMap aVarMap)
      Parameters:
      aVarMap - the variable map providing the values
  • Method Details

    • getText

      protected String getText(String aName)
      Specified by:
      getText in class FWParameterContext
      Parameters:
      aName - parameter name
      Returns:
      the value as text for token replacement (empty for an existing parameter without value), or null if the parameter does not exist
    • getObject

      protected Object getObject(String aName)
      Specified by:
      getObject in class FWParameterContext
      Parameters:
      aName - parameter name
      Returns:
      the value for expressions, or null if the parameter does not exist
    • contains

      protected boolean contains(String aName)
      Specified by:
      contains in class FWParameterContext
      Parameters:
      aName - parameter name
      Returns:
      true if the source has the parameter
    • store

      protected void store(String aName, String aValue)
      Description copied from class: FWParameterContext
      Stores the temporary directory created by _TEMPDIR_ in the source.
      Specified by:
      store in class FWParameterContext
      Parameters:
      aName - parameter name
      aValue - the value
    • getProjectLines

      protected Integer[] getProjectLines()
      Overrides:
      getProjectLines in class FWParameterContext
      Returns:
      the project lines of the current simulation, or null outside of simulations
    • getLogSource

      protected Object getLogSource()
      Overrides:
      getLogSource in class FWParameterContext
      Returns:
      the object named as source in log messages