Class XmlNetworkLaneParserOld
java.lang.Object
org.opentrafficsim.road.network.factory.xml.old.XmlNetworkLaneParserOld
- All Implemented Interfaces:
Serializable
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
- Author:
- Alexander Verbraeck
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,ConnectorTag>connectorTagsThe UNprocessed connectors for further reference.protected org.opentrafficsim.road.network.factory.xml.old.GlobalTagglobalTagGlobal values from the GLOBAL tag.protected Map<String,org.opentrafficsim.road.network.factory.xml.old.GTUMixTag>gtuMixTagsThe GTUmix tags for further reference.Map<String,GTUTag>gtuTagsThe GTU tags for further reference.Map<String,GTUType>gtuTypesThe GTUTypes that have been created.protected Map<String,LaneType>laneTypesThe LaneTypes that have been created.protected Map<String,org.opentrafficsim.road.network.factory.xml.old.LaneTypeTag>laneTypeTagsThe LaneType tags that have been created.protected Map<String,org.opentrafficsim.road.network.factory.xml.old.LinkTag>linkTagsThe UNprocessed links for further reference.protected OTSRoadNetworknetworkThe network to register the nodes, links, roads, lanes, and GTUs in.protected NetworkAnimationnetworkAnimationThe network to register the drawing information for the network in.protected Map<String,org.opentrafficsim.road.network.factory.xml.old.NodeTag>nodeTagsThe UNprocessed nodes for further reference.protected Map<String,org.opentrafficsim.road.network.factory.xml.old.RoadLayoutTag>roadLayoutTagsThe road layout tags for further reference.protected Map<String,org.opentrafficsim.road.network.factory.xml.old.RoadTypeTag>roadTypeTagsThe road type tags for further reference.protected Map<String,org.opentrafficsim.road.network.factory.xml.old.RouteMixTag>routeMixTagsThe route mix tags for further reference.protected Map<String,org.opentrafficsim.road.network.factory.xml.old.RouteTag>routeTagsThe route tags for further reference.protected Map<String,org.opentrafficsim.road.network.factory.xml.old.ShortestRouteMixTag>shortestRouteMixTagsThe shortest route mix tags for further reference.protected Map<String,org.opentrafficsim.road.network.factory.xml.old.ShortestRouteTag>shortestRouteTagsThe shortest route tags for further reference.protected OTSSimulatorInterfacesimulatorThe simulator for creating the animation. -
Constructor Summary
Constructors Constructor Description XmlNetworkLaneParserOld(OTSSimulatorInterface simulator)XmlNetworkLaneParserOld(OTSSimulatorInterface simulator, GTUColorer colorer) -
Method Summary
Modifier and Type Method Description OTSRoadNetworkbuild(InputStream stream, boolean interpretXMLComments)OTSRoadNetworkbuild(InputStream stream, OTSRoadNetwork otsNetwork, boolean interpretXMLComments)OTSRoadNetworkbuild(URL url, boolean interpretXMLComments)OTSRoadNetworkbuild(URL url, OTSRoadNetwork otsNetwork, boolean interpretXMLComments)NetworkAnimationgetNetworkAnimation()ImmutableList<String>getXMLComments()Obtain an immutable copy of the collected XML comments.StringtoString()
-
Field Details
-
globalTag
protected org.opentrafficsim.road.network.factory.xml.old.GlobalTag globalTagGlobal values from the GLOBAL tag. -
nodeTags
The UNprocessed nodes for further reference. -
connectorTags
The UNprocessed connectors for further reference. -
linkTags
The UNprocessed links for further reference. -
gtuTags
The GTU tags for further reference. -
gtuMixTags
The GTUmix tags for further reference. -
routeTags
The route tags for further reference. -
routeMixTags
The route mix tags for further reference. -
shortestRouteTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.ShortestRouteTag> shortestRouteTagsThe shortest route tags for further reference. -
shortestRouteMixTags
protected Map<String,org.opentrafficsim.road.network.factory.xml.old.ShortestRouteMixTag> shortestRouteMixTagsThe shortest route mix tags for further reference. -
roadTypeTags
The road type tags for further reference. -
roadLayoutTags
The road layout tags for further reference. -
gtuTypes
The GTUTypes that have been created. public to make it accessible from LaneAttributes. -
laneTypeTags
The LaneType tags that have been created. -
laneTypes
The LaneTypes that have been created. -
simulator
The simulator for creating the animation. Null if no animation needed. -
network
The network to register the nodes, links, roads, lanes, and GTUs in. -
networkAnimation
The network to register the drawing information for the network in.
-
-
Constructor Details
-
XmlNetworkLaneParserOld
- Parameters:
simulator- OTSSimulatorInterface; the simulator for creating the animation. Null if no animation needed.
-
XmlNetworkLaneParserOld
- Parameters:
simulator- OTSSimulatorInterface; the simulator for creating the animation. Null if no animation needed.colorer- GTUColorer; GTU colorer
-
-
Method Details
-
build
public final OTSRoadNetwork build(URL url, boolean interpretXMLComments) throws NetworkException, ParserConfigurationException, SAXException, IOException, NamingException, GTUException, OTSGeometryException, SimRuntimeException, ValueRuntimeException, ParameterException- Parameters:
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 accordingly- Returns:
- the network with Nodes, Links, and Lanes.
- Throws:
NetworkException- 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- ...ValueRuntimeException- ...
-
build
public final OTSRoadNetwork build(InputStream stream, boolean interpretXMLComments) throws NetworkException, ParserConfigurationException, SAXException, IOException, NamingException, GTUException, OTSGeometryException, SimRuntimeException, ValueRuntimeException, ParameterException- Parameters:
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 accordingly- Returns:
- the network with Nodes, Links, and Lanes.
- Throws:
NetworkException- 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- ...ValueRuntimeException- ...
-
build
public final OTSRoadNetwork build(URL url, OTSRoadNetwork otsNetwork, boolean interpretXMLComments) throws NetworkException, ParserConfigurationException, SAXException, IOException, NamingException, GTUException, OTSGeometryException, SimRuntimeException, ValueRuntimeException, ParameterException- Parameters:
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 accordingly- Returns:
- the network with Nodes, Links, and Lanes.
- Throws:
NetworkException- 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- ...ValueRuntimeException- ...
-
build
public final OTSRoadNetwork build(InputStream stream, OTSRoadNetwork otsNetwork, boolean interpretXMLComments) throws NetworkException, ParserConfigurationException, SAXException, IOException, NamingException, GTUException, OTSGeometryException, SimRuntimeException, ValueRuntimeException, ParameterException- Parameters:
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 accordingly- Returns:
- the network with Nodes, Links, and Lanes.
- Throws:
NetworkException- 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- ...ValueRuntimeException- ...
-
getXMLComments
Obtain an immutable copy of the collected XML comments.- Returns:
- List<String>; a list of the XML comments
-
getNetworkAnimation
- Returns:
- the network animation data belonging to the network that was parsed.
-
toString
-