Class JobEnvironment

java.lang.Object
weka.core.Environment
weka.knowledgeflow.JobEnvironment
All Implemented Interfaces:
RevisionHandler

public class JobEnvironment extends Environment
Extended Environment with support for storing results and property values to be set at a later date on the base schemes of WekaAlgorithmWrapper steps. The latter is useful in the case where variables are not supported for properties in a base scheme.
Version:
$Revision: $
Author:
Mark Hall (mhall{[at]}pentaho{[dot]}com)
  • Constructor Details

    • JobEnvironment

      public JobEnvironment()
      Constructor
    • JobEnvironment

      public JobEnvironment(Environment env)
      Construct a JobEnvironment by copying the contents of a standard Environment
      Parameters:
      env - the Environment to copy into this JobEnvironment
  • Method Details

    • addToResult

      public void addToResult(Data data)
      Add a non-incremental data object to the result
      Parameters:
      data - the data to add
    • addAllResults

      public void addAllResults(Map<String,LinkedHashSet<Data>> otherResults)
      Add all the results from the supplied map to this environment's results
      Parameters:
      otherResults - the results to add
    • getResultDataOfType

      public LinkedHashSet<Data> getResultDataOfType(String connName)
      Get a list of any result data objects of the supplied connection type
      Parameters:
      connName - the name of the connection to get result data objects for
      Returns:
      a list of result data objects for the specified connection type, or null if none exist
    • hasResultDataOfType

      public boolean hasResultDataOfType(String connName)
      Returns true if the results contain data of a particular connection type
      Parameters:
      connName - the name of the connection to check for data
      Returns:
      true if the results contain data of the supplied connection type
    • getResultData

      public Map<String,LinkedHashSet<Data>> getResultData()
      Get a map of all the result data objects
      Returns:
      a map of all result data
    • clearResultData

      public void clearResultData()
    • getStepProperties

      public Map<String,String> getStepProperties(String stepName)
      Get the step properties for a named step
      Parameters:
      stepName - the name of the step to get properties for
      Returns:
      a map of properties for the named step
    • clearStepProperties

      public void clearStepProperties()
      Clear all step properties
    • addToStepProperties

      public void addToStepProperties(Map<String,Map<String,String>> propsToAdd)
      Add the supplied map of step properties. The map contains properties for various base schemes owned by scheme-specific (WekaAlgorithmWrapper) steps. Outer map is keyed by step name, inner map by property name.
      Parameters:
      propsToAdd - properties to add