Class TransitNetworkLoader
java.lang.Object
id.klacak.bus_navigator.TransitNetworkLoader
Loads transit networks from XML resources on the application classpath.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TransitNetworkLoads routes and stops from a classpath XML resource.static voidPrints every loaded route and its stops to standard output.
-
Constructor Details
-
TransitNetworkLoader
public TransitNetworkLoader()Creates a transit-network loader.
-
-
Method Details
-
load
Loads routes and stops from a classpath XML resource. A leading./is ignored when resolving the resource path.- Parameters:
xmlPath- path of the XML resource relative to the classpath root- Returns:
- the transit network described by the resource
- Throws:
Exception- if the resource is missing or cannot be parsed
-
main
-