Class AgencyMergeStrategy

All Implemented Interfaces:
EntityMergeStrategy

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

    • AgencyMergeStrategy

      public AgencyMergeStrategy()
  • Method Details

    • replaceDuplicateEntry

      protected void replaceDuplicateEntry(GtfsMergeContext context, org.onebusaway.gtfs.model.Agency oldAgency, org.onebusaway.gtfs.model.Agency newAgency)
      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.Agency>
      Parameters:
      context -
      oldAgency - the old entity in the source feed that should be replaced
      newAgency - the new entity in the output merged feed that duplicates the old entity
    • rename

      protected void rename(GtfsMergeContext context, org.onebusaway.gtfs.model.IdentityBean<?> entity)
      Description copied from class: AbstractIdentifiableSingleEntityMergeStrategy
      Rename the id of the specified identity to avoid an raw GTFS identifier collision in the merged output feed.
      Overrides:
      rename in class AbstractIdentifiableSingleEntityMergeStrategy<org.onebusaway.gtfs.model.Agency>
      Parameters:
      context -
      entity -