org.jbpm.sim.exe
Class ExperimentReader

java.lang.Object
  extended by org.jbpm.sim.exe.ExperimentReader
All Implemented Interfaces:
java.io.Serializable, org.jbpm.jpdl.xml.ProblemListener

public class ExperimentReader
extends java.lang.Object
implements org.jbpm.jpdl.xml.ProblemListener

The ExperimentReader is responsible for creating a org.jbpm.sim.exe.JbpmSimulationExperiment out of the experiment XML.

Author:
bernd.ruecker@camunda.com
See Also:
Serialized Form

Field Summary
protected  org.dom4j.Document experimentDoc
           
 
Constructor Summary
ExperimentReader(org.xml.sax.InputSource inputSource)
           
ExperimentReader(java.lang.String experimentXml)
           
 
Method Summary
 void addProblem(org.jbpm.jpdl.xml.Problem problem)
           
 void addProcessDefinition(java.lang.String processName, java.lang.String processXml)
          add a process definition to this reader, which can be referenced from a sim-process in a experiment.
protected  void addScenario(JbpmSimulationScenario scenario)
           
protected  void afterScenarioRead(JbpmSimulationScenario scenario, org.dom4j.Element scenarioElement, org.dom4j.Element baseScenarioElement)
           
protected  void beforeScenarioRead(JbpmSimulationScenario scenario, org.dom4j.Element scenarioElement, org.dom4j.Element baseScenarioElement)
           
protected  org.dom4j.Document getXmlDocument()
           
protected  java.lang.Double readCostPerTimeUnit(org.dom4j.Element resourcePoolElement)
           
static DistributionDefinition readDistribution(org.dom4j.Element distributionElement)
           
 JbpmSimulationExperiment readExperiment()
           
protected  JbpmSimulationScenario readScenario(org.dom4j.Element scenarioElement, org.dom4j.Element baseScenarioElement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

experimentDoc

protected org.dom4j.Document experimentDoc
Constructor Detail

ExperimentReader

public ExperimentReader(java.lang.String experimentXml)

ExperimentReader

public ExperimentReader(org.xml.sax.InputSource inputSource)
Method Detail

getXmlDocument

protected org.dom4j.Document getXmlDocument()

addProblem

public void addProblem(org.jbpm.jpdl.xml.Problem problem)
Specified by:
addProblem in interface org.jbpm.jpdl.xml.ProblemListener

addProcessDefinition

public void addProcessDefinition(java.lang.String processName,
                                 java.lang.String processXml)
add a process definition to this reader, which can be referenced from a sim-process in a experiment. This is useful in test cases, where you don't store the process in a XML file, but as a String.

Parameters:
pd -

readExperiment

public JbpmSimulationExperiment readExperiment()

addScenario

protected void addScenario(JbpmSimulationScenario scenario)

readDistribution

public static DistributionDefinition readDistribution(org.dom4j.Element distributionElement)

readScenario

protected JbpmSimulationScenario readScenario(org.dom4j.Element scenarioElement,
                                              org.dom4j.Element baseScenarioElement)

afterScenarioRead

protected void afterScenarioRead(JbpmSimulationScenario scenario,
                                 org.dom4j.Element scenarioElement,
                                 org.dom4j.Element baseScenarioElement)

beforeScenarioRead

protected void beforeScenarioRead(JbpmSimulationScenario scenario,
                                  org.dom4j.Element scenarioElement,
                                  org.dom4j.Element baseScenarioElement)

readCostPerTimeUnit

protected java.lang.Double readCostPerTimeUnit(org.dom4j.Element resourcePoolElement)


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.