org.onebusaway.gtfs.serialization.mappings
Class AgencyNotFoundForRouteException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.onebusaway.gtfs.csv.exceptions.CsvEntityException
                  extended by org.onebusaway.gtfs.serialization.mappings.AgencyNotFoundForRouteException
All Implemented Interfaces:
java.io.Serializable

public class AgencyNotFoundForRouteException
extends CsvEntityException

Error indicating that there was a problem finding the appropriate Agency instance to set in a call to Route.setAgency(Agency). When parsing a route from csv, we look at the "agency_id" field first. If it isn't empty, we look for an agency with the specified id. This exception is throw if an agency with the specified id could not be found. If no "agency_id" field is specified in the csv, we next use the id specified by GtfsReaderContext.getDefaultAgencyId(). If no default agencyId is specified, or an agency with the specified id cannot be found, we throw this exception.

Author:
bdferris
See Also:
Serialized Form

Constructor Summary
AgencyNotFoundForRouteException(java.lang.Class<?> entityType, Route route, java.lang.String agencyId)
           
 
Method Summary
 java.lang.String getAgencyId()
           
 Route getRoute()
           
 
Methods inherited from class org.onebusaway.gtfs.csv.exceptions.CsvEntityException
getEntityType
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AgencyNotFoundForRouteException

public AgencyNotFoundForRouteException(java.lang.Class<?> entityType,
                                       Route route,
                                       java.lang.String agencyId)
Method Detail

getRoute

public Route getRoute()

getAgencyId

public java.lang.String getAgencyId()


Copyright © 2011 OneBusAway. All Rights Reserved.