public class XmlNetworkLaneParser extends Object implements Serializable
Copyright (c) 2013-2018 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(DEVSSimulatorInterface.TimeDoubleUnit simulator) |
XmlNetworkLaneParser(DEVSSimulatorInterface.TimeDoubleUnit simulator,
GTUColorer colorer) |
| Modifier and Type | Method and Description |
|---|---|
OTSNetwork |
build(InputStream stream,
boolean interpretXMLComments) |
OTSNetwork |
build(InputStream stream,
OTSNetwork otsNetwork,
boolean interpretXMLComments) |
OTSNetwork |
build(URL url,
boolean interpretXMLComments) |
OTSNetwork |
build(URL url,
OTSNetwork otsNetwork,
boolean interpretXMLComments) |
ImmutableList<String> |
getXMLComments()
Obtain an immutable copy of the collected XML comments.
|
String |
toString() |
protected org.opentrafficsim.road.network.factory.xml.GlobalTag globalTag
protected Map<String,org.opentrafficsim.road.network.factory.xml.NodeTag> nodeTags
protected Map<String,ConnectorTag> connectorTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.LinkTag> linkTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.GTUMixTag> gtuMixTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.RouteTag> routeTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.RouteMixTag> routeMixTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.ShortestRouteTag> shortestRouteTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.ShortestRouteMixTag> shortestRouteMixTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.RoadTypeTag> roadTypeTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.RoadLayoutTag> roadLayoutTags
public Map<String,GTUType> gtuTypes
protected Map<String,org.opentrafficsim.road.network.factory.xml.LaneTypeTag> laneTypeTags
protected DEVSSimulatorInterface.TimeDoubleUnit simulator
protected OTSNetwork network
public XmlNetworkLaneParser(DEVSSimulatorInterface.TimeDoubleUnit simulator)
simulator - the simulator for creating the animation. Null if no animation needed.public XmlNetworkLaneParser(DEVSSimulatorInterface.TimeDoubleUnit simulator, GTUColorer colorer)
simulator - the simulator for creating the animation. Null if no animation needed.colorer - GTU colorerpublic final OTSNetwork build(URL url, boolean interpretXMLComments) throws NetworkException, ParserConfigurationException, SAXException, IOException, NamingException, GTUException, OTSGeometryException, SimRuntimeException, ValueException, ParameterException
url - the file with the network in the agreed xml-grammar.interpretXMLComments - boolean; if true; interpret specifically formatted XML comments and modify the network
accordinglyNetworkException - in case of parsing problems.SAXException - in case of parsing problems.ParserConfigurationException - in case of parsing problems.IOException - in case of file reading problems.NamingException - in case the animation context cannot be foundGTUException - in case of a problem with creating the LaneBlock (which is a GTU right now)OTSGeometryException - when construction of a lane contour or offset design line failsSimRuntimeException - when simulator cannot be used to schedule GTU generationParameterException - ...ValueException - ...public final OTSNetwork build(InputStream stream, boolean interpretXMLComments) throws NetworkException, ParserConfigurationException, SAXException, IOException, NamingException, GTUException, OTSGeometryException, SimRuntimeException, ValueException, ParameterException
stream - the input stream with the network in the agreed xml-grammar.interpretXMLComments - boolean; if true; interpret specifically formatted XML comments and modify the network
accordinglyNetworkException - in case of parsing problems.SAXException - in case of parsing problems.ParserConfigurationException - in case of parsing problems.IOException - in case of file reading problems.NamingException - in case the animation context cannot be foundGTUException - in case of a problem with creating the LaneBlock (which is a GTU right now)OTSGeometryException - when construction of a lane contour or offset design line failsSimRuntimeException - when simulator cannot be used to schedule GTU generationParameterException - ...ValueException - ...public final OTSNetwork build(URL url, OTSNetwork otsNetwork, boolean interpretXMLComments) throws NetworkException, ParserConfigurationException, SAXException, IOException, NamingException, GTUException, OTSGeometryException, SimRuntimeException, ValueException, ParameterException
url - the file with the network in the agreed xml-grammar.otsNetwork - OTSNetwork; the networkinterpretXMLComments - boolean; if true; interpret specifically formatted XML comments and modify the network
accordinglyNetworkException - in case of parsing problems.SAXException - in case of parsing problems.ParserConfigurationException - in case of parsing problems.IOException - in case of file reading problems.NamingException - in case the animation context cannot be foundGTUException - in case of a problem with creating the LaneBlock (which is a GTU right now)OTSGeometryException - when construction of a lane contour or offset design line failsSimRuntimeException - when simulator cannot be used to schedule GTU generationParameterException - ...ValueException - ...public final OTSNetwork build(InputStream stream, OTSNetwork otsNetwork, boolean interpretXMLComments) throws NetworkException, ParserConfigurationException, SAXException, IOException, NamingException, GTUException, OTSGeometryException, SimRuntimeException, ValueException, ParameterException
stream - the input stream with the network in the agreed xml-grammar.otsNetwork - OTSNetwork; the networkinterpretXMLComments - boolean; if true; interpret specifically formatted XML comments and modify the network
accordinglyNetworkException - in case of parsing problems.SAXException - in case of parsing problems.ParserConfigurationException - in case of parsing problems.IOException - in case of file reading problems.NamingException - in case the animation context cannot be foundGTUException - in case of a problem with creating the LaneBlock (which is a GTU right now)OTSGeometryException - when construction of a lane contour or offset design line failsSimRuntimeException - when simulator cannot be used to schedule GTU generationParameterException - ...ValueException - ...public ImmutableList<String> getXMLComments()
Copyright © 2014–2018 Delft University of Technology. All rights reserved.