Package org.arakhne.afc.gis.bus.io.xml
Class XMLBusNetworkUtil
- java.lang.Object
-
- org.arakhne.afc.gis.bus.io.xml.XMLBusNetworkUtil
-
public final class XMLBusNetworkUtil extends Object
This class provides tools to create an XML representation of a bus network or to create a bus network from an XML representation.- Since:
- 15.0
- Version:
- 17.0 2020-01-04 14:41:56
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.gis
- Maven Artifact Id:
- gisbusinputoutput
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTR_ROADID
<roadId />
.static String
NODE_BUSHALT
<halt />
.static String
NODE_BUSHALTS
<halts />
.static String
NODE_BUSHUB
<hub />
.static String
NODE_BUSHUBS
<hubs />
.static String
NODE_BUSITINERARIES
<itineraries />
.static String
NODE_BUSITINERARY
<itinerary />
.static String
NODE_BUSLINE
<line />
.static String
NODE_BUSLINES
<lines />
.static String
NODE_BUSNETWORK
<busNetwork />
.static String
NODE_BUSSTOP
<stop />
.static String
NODE_BUSSTOPS
<stops />
.static String
NODE_ROADS
<roads />
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BusNetwork
readBusNetwork(Element xmlNode, RoadNetwork roadNetwork, PathBuilder pathBuilder, XMLResources resources)
Create and reply the bus network which is described by the given XML representation.static Node
writeBusNetwork(BusNetwork busNetwork, XMLBuilder builder, XMLResources resources)
Create and reply an XML representation of the given bus network.
-
-
-
Field Detail
-
NODE_BUSHALTS
public static final String NODE_BUSHALTS
<halts />
.- See Also:
- Constant Field Values
-
NODE_BUSHALT
public static final String NODE_BUSHALT
<halt />
.- See Also:
- Constant Field Values
-
NODE_BUSHUBS
public static final String NODE_BUSHUBS
<hubs />
.- See Also:
- Constant Field Values
-
NODE_BUSHUB
public static final String NODE_BUSHUB
<hub />
.- See Also:
- Constant Field Values
-
NODE_BUSITINERARIES
public static final String NODE_BUSITINERARIES
<itineraries />
.- See Also:
- Constant Field Values
-
NODE_BUSITINERARY
public static final String NODE_BUSITINERARY
<itinerary />
.- See Also:
- Constant Field Values
-
NODE_BUSLINES
public static final String NODE_BUSLINES
<lines />
.- See Also:
- Constant Field Values
-
NODE_BUSLINE
public static final String NODE_BUSLINE
<line />
.- See Also:
- Constant Field Values
-
NODE_BUSNETWORK
public static final String NODE_BUSNETWORK
<busNetwork />
.- See Also:
- Constant Field Values
-
NODE_BUSSTOPS
public static final String NODE_BUSSTOPS
<stops />
.- See Also:
- Constant Field Values
-
NODE_BUSSTOP
public static final String NODE_BUSSTOP
<stop />
.- See Also:
- Constant Field Values
-
NODE_ROADS
public static final String NODE_ROADS
<roads />
.- See Also:
- Constant Field Values
-
ATTR_ROADID
public static final String ATTR_ROADID
<roadId />
.- See Also:
- Constant Field Values
-
-
Method Detail
-
writeBusNetwork
public static Node writeBusNetwork(BusNetwork busNetwork, XMLBuilder builder, XMLResources resources) throws IOException
Create and reply an XML representation of the given bus network.- Parameters:
busNetwork
- is the bus network to translate into XML.builder
- is the tool that permits to create XML elements.resources
- is the tool that permits to gather the resources.- Returns:
- the XML representation of the given bus network.
- Throws:
IOException
- in case of error.
-
readBusNetwork
public static BusNetwork readBusNetwork(Element xmlNode, RoadNetwork roadNetwork, PathBuilder pathBuilder, XMLResources resources) throws IOException
Create and reply the bus network which is described by the given XML representation.- Parameters:
xmlNode
- is the node to explore.roadNetwork
- is the road network on which the bus network is mapped.pathBuilder
- is the tool that permits to make absolute paths.resources
- is the tool that permits to gather the resources.- Returns:
- the bus network.
- Throws:
IOException
- in case of error.
-
-