nl.tudelft.simulation.xml.dsol

## Class ExperimentParser

- java.lang.Object
- - nl.tudelft.simulation.xml.dsol.ExperimentParser

    public class ExperimentParser
    extends Object

The ExperimentParser parses xml-based experiments into their java objects.

Copyright (c) 2002-2018 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://simulation.tudelft.nl/dsol/3.0/license.html.

Author:
  Peter Jacobs

### Constructor Summary

Constructors
`protected` `ExperimentParser()` constructs a new ExperimentParser This is a Utility Class.

### Method Summary

All Methods Static Methods Concrete Methods
`static Experiment<?,?,?,?>` `parseExperiment(Element rootElement, URL url)` parses an experiment xml-file.
`static ExperimentalFrame` `parseExperimentalFrame(URL input)` parses an experimentalFrame xml-file.
`static ExperimentalFrame` `parseExperimentalFrameTimeDouble(URL input)` parses an experimentalFrame xml-file.
`static Experiment.TimeDouble` `parseExperimentTimeDouble(Element rootElement, URL url)` parses an experiment xml-file.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ExperimentParser

    protected ExperimentParser()

constructs a new ExperimentParser This is a Utility Class.

### Method Detail

#### parseExperimentalFrame

    public static ExperimentalFrame parseExperimentalFrame(URL input)
                                                    throws IOException

parses an experimentalFrame xml-file.

Parameters:
  `input` - URL; the url of the xmlfile
Returns:
  ExperimentalFrame the experimentalFrame
Throws:
  `IOException` - whenever parsing fails

#### parseExperimentalFrameTimeDouble

    public static ExperimentalFrame parseExperimentalFrameTimeDouble(URL input)
                                                              throws IOException

parses an experimentalFrame xml-file.

Parameters:
  `input` - URL; the url of the xmlfile
Returns:
  ExperimentalFrame the experimentalFrame
Throws:
  `IOException` - whenever parsing fails

#### parseExperiment

    public static Experiment<?,?,?,?> parseExperiment(Element rootElement,
                                                      URL url)
                                               throws IOException

parses an experiment xml-file.

Parameters:
  `url` - URL; the url of the experimentfile
  `rootElement` - Element; the element representing the experiment
Returns:
  ExperimentalFrame the experiment
Throws:
  `IOException` - whenever parsing fails

#### parseExperimentTimeDouble

    public static Experiment.TimeDouble parseExperimentTimeDouble(Element rootElement,
                                                                  URL url)
                                                           throws IOException

parses an experiment xml-file.

Parameters:
  `url` - URL; the url of the experimentfile
  `rootElement` - Element; the element representing the experiment
Returns:
  ExperimentalFrame the experiment
Throws:
  `IOException` - whenever parsing fails