public final class XmlNetworkLaneParser extends Object implements Serializable
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $,
initial version Jul 23, 2015
| Modifier and Type | Method and Description |
|---|---|
static nl.tudelft.simulation.dsol.experiment.Experiment.TimeDoubleUnit<OTSSimulatorInterface> |
build(InputStream xmlStream,
OTSRoadNetwork otsNetwork,
OTSSimulatorInterface simulator)
Parse the XML input stream and build the network.
|
static nl.tudelft.simulation.dsol.experiment.Experiment.TimeDoubleUnit<OTSSimulatorInterface> |
build(OTS ots,
OTSRoadNetwork otsNetwork,
OTSSimulatorInterface simulator)
Build the network from an OTS object (probably constructed by parsing an OTS XML file; e.g.
|
static OTSRoadNetwork |
build(String filename,
OTSRoadNetwork otsNetwork,
OTSSimulatorInterface simulator)
Parse the XML file and build the network.
|
static nl.tudelft.simulation.dsol.experiment.Experiment.TimeDoubleUnit<OTSSimulatorInterface> |
build(URL xmlURL,
OTSRoadNetwork otsNetwork,
OTSSimulatorInterface simulator)
Parse the XML file and build the network.
|
static void |
main(String[] args) |
static OTS |
parseXML(InputStream xmlStream)
Parse an OTS XML input stream and build an OTS object.
|
static OTS |
parseXML(URL xmlURL)
Parse an OTS XML input stream and build an OTS object.
|
public static OTSRoadNetwork build(String filename, OTSRoadNetwork otsNetwork, OTSSimulatorInterface simulator) throws JAXBException, URISyntaxException, NetworkException, OTSGeometryException, XmlParserException, SAXException, ParserConfigurationException, nl.tudelft.simulation.dsol.SimRuntimeException, GTUException
filename - String; the name of the file to parseotsNetwork - OTSRoadNetwork; the network to insert the parsed objects insimulator - OTSSimulatorInterface; the simulatorJAXBException - when the parsing failsURISyntaxException - when the filename is not validNetworkException - when the objects cannot be inserted into the network due to inconsistenciesOTSGeometryException - when the design line of a link is invalidXmlParserException - when the stripe type cannot be recognizedParserConfigurationException - on error with parser configurationSAXException - on error creating SAX parsernl.tudelft.simulation.dsol.SimRuntimeException - in case of simulation problems building the car generatorGTUException - when construction of the Strategical Planner failedpublic static nl.tudelft.simulation.dsol.experiment.Experiment.TimeDoubleUnit<OTSSimulatorInterface> build(InputStream xmlStream, OTSRoadNetwork otsNetwork, OTSSimulatorInterface simulator) throws JAXBException, URISyntaxException, NetworkException, OTSGeometryException, XmlParserException, SAXException, ParserConfigurationException, nl.tudelft.simulation.dsol.SimRuntimeException, GTUException
xmlStream - InputStream; the xml input streamotsNetwork - OTSRoadNetwork; the network to insert the parsed objects insimulator - OTSSimulatorInterface; the simulatorJAXBException - when the parsing failsURISyntaxException - when the filename is not validNetworkException - when the objects cannot be inserted into the network due to inconsistenciesOTSGeometryException - when the design line of a link is invalidXmlParserException - when the stripe type cannot be recognizedParserConfigurationException - on error with parser configurationSAXException - on error creating SAX parsernl.tudelft.simulation.dsol.SimRuntimeException - in case of simulation problems building the car generatorGTUException - when construction of the Strategical Planner failedpublic static OTS parseXML(URL xmlURL) throws JAXBException, SAXException, ParserConfigurationException
xmlURL - URL; the URL for the xml file or streamJAXBException - when the parsing failsParserConfigurationException - on error with parser configurationSAXException - on error creating SAX parserpublic static OTS parseXML(InputStream xmlStream) throws JAXBException, SAXException, ParserConfigurationException
xmlStream - inputStream; the xml streamJAXBException - when the parsing failsParserConfigurationException - on error with parser configurationSAXException - on error creating SAX parserpublic static nl.tudelft.simulation.dsol.experiment.Experiment.TimeDoubleUnit<OTSSimulatorInterface> build(URL xmlURL, OTSRoadNetwork otsNetwork, OTSSimulatorInterface simulator) throws JAXBException, URISyntaxException, NetworkException, OTSGeometryException, XmlParserException, SAXException, ParserConfigurationException, nl.tudelft.simulation.dsol.SimRuntimeException, GTUException
xmlURL - URL; the URL for the xml input fileotsNetwork - OTSRoadNetwork; the network to insert the parsed objects insimulator - OTSSimulatorInterface; the simulatorJAXBException - when the parsing failsURISyntaxException - when the filename is not validNetworkException - when the objects cannot be inserted into the network due to inconsistenciesOTSGeometryException - when the design line of a link is invalidXmlParserException - when the stripe type cannot be recognizedParserConfigurationException - on error with parser configurationSAXException - on error creating SAX parsernl.tudelft.simulation.dsol.SimRuntimeException - in case of simulation problems building the car generatorGTUException - when construction of the Strategical Planner failedpublic static nl.tudelft.simulation.dsol.experiment.Experiment.TimeDoubleUnit<OTSSimulatorInterface> build(OTS ots, OTSRoadNetwork otsNetwork, OTSSimulatorInterface simulator) throws JAXBException, URISyntaxException, NetworkException, OTSGeometryException, XmlParserException, SAXException, ParserConfigurationException, nl.tudelft.simulation.dsol.SimRuntimeException, GTUException
ots - OTS; the OTS objectotsNetwork - OTSRoadNetwork; the network to insert the parsed objects insimulator - OTSSimulatorInterface; the simulatorJAXBException - when the parsing failsURISyntaxException - when the filename is not validNetworkException - when the objects cannot be inserted into the network due to inconsistenciesOTSGeometryException - when the design line of a link is invalidXmlParserException - when the stripe type cannot be recognizedParserConfigurationException - on error with parser configurationSAXException - on error creating SAX parsernl.tudelft.simulation.dsol.SimRuntimeException - in case of simulation problems building the car generatorGTUException - when construction of the Strategical Planner failedCopyright © 2014–2019 Delft University of Technology. All rights reserved.