org.onebusaway.transit_data_federation.services
Class AgencyAndIdLibrary
java.lang.Object
org.onebusaway.transit_data_federation.services.AgencyAndIdLibrary
public class AgencyAndIdLibrary
- extends Object
By convention, we make entity ids unique by prepending the agency id for the
resource. So an id will take the form "agencyId_entityId". Agency ids are
typically numeric by convention. This library provides convenience methods
for parsing and constructing these ids from AgencyAndId
objects.
- Author:
- bdferris
Method Summary |
static org.onebusaway.gtfs.model.AgencyAndId |
convertFromString(String value)
Given an id of the form "agencyId_entityId", parses into a
AgencyAndId id object. |
static String |
convertToString(org.onebusaway.gtfs.model.AgencyAndId aid)
Given an AgencyAndId object, creates a string representation of the
form "agencyId_entityId" |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ID_SEPARATOR
public static final char ID_SEPARATOR
- See Also:
- Constant Field Values
AgencyAndIdLibrary
public AgencyAndIdLibrary()
convertFromString
public static org.onebusaway.gtfs.model.AgencyAndId convertFromString(String value)
- Given an id of the form "agencyId_entityId", parses into a
AgencyAndId
id object.
- Parameters:
value
- id of the form "agencyId_entityId"
- Returns:
- an id object
convertToString
public static String convertToString(org.onebusaway.gtfs.model.AgencyAndId aid)
- Given an
AgencyAndId
object, creates a string representation of the
form "agencyId_entityId"
- Parameters:
aid
- an id object
- Returns:
- a string representation of the form "agencyId_entityId"
Copyright © 2012 OneBusAway. All Rights Reserved.