Class RouteMergeStrategy

All Implemented Interfaces:
EntityMergeStrategy

public class RouteMergeStrategy extends AbstractIdentifiableSingleEntityMergeStrategy<org.onebusaway.gtfs.model.Route>
Entity merge strategy for handling Route entities.
Author:
bdferris
  • Constructor Details

    • RouteMergeStrategy

      public RouteMergeStrategy()
  • Method Details

    • replaceDuplicateEntry

      protected void replaceDuplicateEntry(GtfsMergeContext context, org.onebusaway.gtfs.model.Route oldRoute, org.onebusaway.gtfs.model.Route newRoute)
      Description copied from class: AbstractSingleEntityMergeStrategy
      If we've detected a duplicate for an entity in the source feed with some entity in the merged output feed, we want to replace all references to the old entity with the new merged entity. Sub-classes will override this method to provide logic specific to particular entity types, as it relates to updating entity references.
      Specified by:
      replaceDuplicateEntry in class AbstractSingleEntityMergeStrategy<org.onebusaway.gtfs.model.Route>
      Parameters:
      context -
      oldRoute - the old entity in the source feed that should be replaced
      newRoute - the new entity in the output merged feed that duplicates the old entity