public class XmlNetworkLaneParserOld 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 | Field and Description |
---|---|
protected Map<String,ConnectorTag> |
connectorTags
The UNprocessed connectors for further reference.
|
protected org.opentrafficsim.road.network.factory.xml.old.GlobalTag |
globalTag
Global values from the GLOBAL tag.
|
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.GTUMixTag> |
gtuMixTags
The GTUmix tags for further reference.
|
Map<String,GTUTag> |
gtuTags
The GTU tags for further reference.
|
Map<String,GTUType> |
gtuTypes
The GTUTypes that have been created.
|
protected Map<String,LaneType> |
laneTypes
The LaneTypes that have been created.
|
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.LaneTypeTag> |
laneTypeTags
The LaneType tags that have been created.
|
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.LinkTag> |
linkTags
The UNprocessed links for further reference.
|
protected OTSRoadNetwork |
network
The network to register the nodes, links, roads, lanes, and GTUs in.
|
protected NetworkAnimation |
networkAnimation
The network to register the drawing information for the network in.
|
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.NodeTag> |
nodeTags
The UNprocessed nodes for further reference.
|
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.RoadLayoutTag> |
roadLayoutTags
The road layout tags for further reference.
|
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.RoadTypeTag> |
roadTypeTags
The road type tags for further reference.
|
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.RouteMixTag> |
routeMixTags
The route mix tags for further reference.
|
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.RouteTag> |
routeTags
The route tags for further reference.
|
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.ShortestRouteMixTag> |
shortestRouteMixTags
The shortest route mix tags for further reference.
|
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.ShortestRouteTag> |
shortestRouteTags
The shortest route tags for further reference.
|
protected OTSSimulatorInterface |
simulator
The simulator for creating the animation.
|
Constructor and Description |
---|
XmlNetworkLaneParserOld(OTSSimulatorInterface simulator) |
XmlNetworkLaneParserOld(OTSSimulatorInterface simulator,
GTUColorer colorer) |
Modifier and Type | Method and Description |
---|---|
OTSRoadNetwork |
build(InputStream stream,
boolean interpretXMLComments) |
OTSRoadNetwork |
build(InputStream stream,
OTSRoadNetwork otsNetwork,
boolean interpretXMLComments) |
OTSRoadNetwork |
build(URL url,
boolean interpretXMLComments) |
OTSRoadNetwork |
build(URL url,
OTSRoadNetwork otsNetwork,
boolean interpretXMLComments) |
NetworkAnimation |
getNetworkAnimation() |
ImmutableList<String> |
getXMLComments()
Obtain an immutable copy of the collected XML comments.
|
String |
toString() |
protected org.opentrafficsim.road.network.factory.xml.old.GlobalTag globalTag
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.NodeTag> nodeTags
protected Map<String,ConnectorTag> connectorTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.LinkTag> linkTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.GTUMixTag> gtuMixTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.RouteTag> routeTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.RouteMixTag> routeMixTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.ShortestRouteTag> shortestRouteTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.ShortestRouteMixTag> shortestRouteMixTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.RoadTypeTag> roadTypeTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.RoadLayoutTag> roadLayoutTags
public Map<String,GTUType> gtuTypes
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.LaneTypeTag> laneTypeTags
protected OTSSimulatorInterface simulator
protected OTSRoadNetwork network
protected NetworkAnimation networkAnimation
public XmlNetworkLaneParserOld(OTSSimulatorInterface simulator)
simulator
- OTSSimulatorInterface; the simulator for creating the animation. Null if no animation needed.public XmlNetworkLaneParserOld(OTSSimulatorInterface simulator, GTUColorer colorer)
simulator
- OTSSimulatorInterface; the simulator for creating the animation. Null if no animation needed.colorer
- GTUColorer; GTU colorerpublic final OTSRoadNetwork build(URL url, boolean interpretXMLComments) throws NetworkException, ParserConfigurationException, SAXException, IOException, NamingException, GTUException, OTSGeometryException, SimRuntimeException, ValueException, ParameterException
url
- 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 OTSRoadNetwork build(InputStream stream, boolean interpretXMLComments) throws NetworkException, ParserConfigurationException, SAXException, IOException, NamingException, GTUException, OTSGeometryException, SimRuntimeException, ValueException, ParameterException
stream
- InputStream; 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 OTSRoadNetwork build(URL url, OTSRoadNetwork otsNetwork, boolean interpretXMLComments) throws NetworkException, ParserConfigurationException, SAXException, IOException, NamingException, GTUException, OTSGeometryException, SimRuntimeException, ValueException, ParameterException
url
- URL; the file with the network in the agreed xml-grammar.otsNetwork
- OTSRoadNetwork; 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 OTSRoadNetwork build(InputStream stream, OTSRoadNetwork otsNetwork, boolean interpretXMLComments) throws NetworkException, ParserConfigurationException, SAXException, IOException, NamingException, GTUException, OTSGeometryException, SimRuntimeException, ValueException, ParameterException
stream
- InputStream; the input stream with the network in the agreed xml-grammar.otsNetwork
- OTSRoadNetwork; 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()
public final NetworkAnimation getNetworkAnimation()
Copyright © 2014–2019 Delft University of Technology. All rights reserved.