Route Data Type

All OTP Transit entities should extend this class. The purpose of the class is to enforce a common implementation of the identity:

  1. id - All entities should have an id. The id should be unique within the context the entity live. For aggregates which live in a global space the id must be unique. This apply to all entities listed in the index service.
  2. The hashCode()/equals() method is consistent and based on the id (identity). We frequently use this to index and lookup entities.

Implemented Interfaces
Serializable
Properties
name data type constraints description
branding Branding  
agency Agency   The 'agency' property represent a GTFS Agency and NeTEx the Authority. Note that Agency does NOT map 1-1 to Authority, it is rather a mix between Authority and Operator.
operator Operator   NeTEx Operator, not in use when importing GTFS files.
shortName string  
longName string  
desc string  
gtfsType number  
mode TransitMode  
url string  
color string  
textColor string  
bikesAllowed BikeAccess  
sortOrderSet boolean required
sortOrder number required
flexibleLineType string   Pass-through information from NeTEx FlexibleLineType. This information is not used by OTP.
name string   the route's short name, or the long name if the short name is null.
netexSubmode string  
Properties inherited from TransitEntity
id FeedScopedId  

Example

{
  "branding" : {
    "shortName" : "...",
    "name" : "...",
    "url" : "...",
    "image" : "...",
    "description" : "...",
    "id" : {
      "feedId" : "...",
      "id" : "..."
    }
  },
  "agency" : {
    "name" : "...",
    "url" : "...",
    "timezone" : "...",
    "lang" : "...",
    "phone" : "...",
    "fareUrl" : "...",
    "brandingUrl" : "...",
    "id" : {
      "feedId" : "...",
      "id" : "..."
    }
  },
  "operator" : {
    "name" : "...",
    "url" : "...",
    "phone" : "...",
    "id" : {
      "feedId" : "...",
      "id" : "..."
    }
  },
  "shortName" : "...",
  "longName" : "...",
  "desc" : "...",
  "gtfsType" : 12345,
  "mode" : "GONDOLA",
  "url" : "...",
  "color" : "...",
  "textColor" : "...",
  "bikesAllowed" : "ALLOWED",
  "sortOrderSet" : true,
  "sortOrder" : 12345,
  "flexibleLineType" : "...",
  "name" : "...",
  "netexSubmode" : "...",
  "id" : {
    "feedId" : "...",
    "id" : "..."
  }
}