1 package org.opentrafficsim.road.network.factory.opendrive;
2
3 import java.io.Serializable;
4 import java.util.ArrayList;
5 import java.util.List;
6
7 import org.opentrafficsim.core.network.NetworkException;
8 import org.w3c.dom.Node;
9 import org.w3c.dom.NodeList;
10 import org.xml.sax.SAXException;
11
12
13
14
15
16
17
18
19
20
21 class LateralProfileTag implements Serializable
22 {
23
24
25 private static final long serialVersionUID = 20150723L;
26
27
28 @SuppressWarnings("checkstyle:visibilitymodifier")
29 List<SuperElevationTag> superElevationTags = new ArrayList<SuperElevationTag>();
30
31
32
33
34
35
36
37
38
39 @SuppressWarnings("checkstyle:needbraces")
40 static void parseElevationProfile(final NodeList nodeList, final OpenDriveNetworkLaneParser parser, final RoadTag roadTag)
41 throws SAXException, NetworkException
42 {
43 for (Node node0 : XMLParser.getNodes(nodeList, "lateralProfile"))
44 {
45 int superElevationCount = 0;
46 for (Node node : XMLParser.getNodes(node0.getChildNodes(), "superelevation"))
47 {
48 LateralProfileTag lateralProfileTag = new LateralProfileTag();
49 roadTag.lateralProfileTag = lateralProfileTag;
50
51 SuperElevationTag superElevationTag = SuperElevationTag.parseSuperElevation(node, parser);
52 superElevationTag.id = superElevationCount;
53 superElevationCount++;
54
55 lateralProfileTag.superElevationTags.add(superElevationTag);
56 }
57 }
58 }
59
60
61 @Override
62 public final String toString()
63 {
64 return "LateralProfileTag [superElevationTags=" + this.superElevationTags + "]";
65 }
66 }