public 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
| Constructor and Description |
|---|
XmlNetworkLaneParser() |
| Modifier and Type | Method and Description |
|---|---|
static OTSNetwork |
build(InputStream xmlStream,
OTSNetwork otsNetwork,
OTSSimulatorInterface simulator)
Parse the XML file and build the network.
|
static OTSNetwork |
build(String filename,
OTSNetwork otsNetwork,
OTSSimulatorInterface simulator)
Parse the XML file and build the network.
|
static void |
main(String[] args) |
public static OTSNetwork build(String filename, OTSNetwork otsNetwork, OTSSimulatorInterface simulator) throws JAXBException, URISyntaxException, NetworkException, OTSGeometryException, XmlParserException
filename - the name of the file to parseotsNetwork - the network to insert the parsed objects insimulator - 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 recognizedpublic static OTSNetwork build(InputStream xmlStream, OTSNetwork otsNetwork, OTSSimulatorInterface simulator) throws JAXBException, URISyntaxException, NetworkException, OTSGeometryException, XmlParserException
xmlStream - InputStream; the xml input streamotsNetwork - the network to insert the parsed objects insimulator - 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 recognizedCopyright © 2014–2019 Delft University of Technology. All rights reserved.