Class AgencyMergeStrategy
java.lang.Object
org.onebusaway.gtfs_merge.strategies.AbstractEntityMergeStrategy
org.onebusaway.gtfs_merge.strategies.AbstractSingleEntityMergeStrategy<org.onebusaway.gtfs.model.Agency>
org.onebusaway.gtfs_merge.strategies.AbstractIdentifiableSingleEntityMergeStrategy<org.onebusaway.gtfs.model.Agency>
org.onebusaway.gtfs_merge.strategies.AgencyMergeStrategy
- All Implemented Interfaces:
EntityMergeStrategy
public class AgencyMergeStrategy
extends AbstractIdentifiableSingleEntityMergeStrategy<org.onebusaway.gtfs.model.Agency>
Entity merge strategy for handling
Agency entities.- Author:
- bdferris
-
Nested Class Summary
Nested classes/interfaces inherited from class org.onebusaway.gtfs_merge.strategies.AbstractIdentifiableSingleEntityMergeStrategy
AbstractIdentifiableSingleEntityMergeStrategy.ScoringTask<T> -
Field Summary
Fields inherited from class org.onebusaway.gtfs_merge.strategies.AbstractIdentifiableSingleEntityMergeStrategy
_duplicateScoringStrategyFields inherited from class org.onebusaway.gtfs_merge.strategies.AbstractSingleEntityMergeStrategy
_entityTypeFields inherited from class org.onebusaway.gtfs_merge.strategies.AbstractEntityMergeStrategy
_duplicateDetectionStrategy, _logDuplicatesStrategy, _minElementDuplicateScoreForFuzzyMatch, _minElementsDuplicateScoreForAutoDetect, _minElementsInCommonScoreForAutoDetect -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidrename(GtfsMergeContext context, org.onebusaway.gtfs.model.IdentityBean<?> entity) Rename the id of the specified identity to avoid an raw GTFS identifier collision in the merged output feed.protected voidreplaceDuplicateEntry(GtfsMergeContext context, org.onebusaway.gtfs.model.Agency oldAgency, org.onebusaway.gtfs.model.Agency newAgency) 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.Methods inherited from class org.onebusaway.gtfs_merge.strategies.AbstractIdentifiableSingleEntityMergeStrategy
getFuzzyDuplicate, getIdentityDuplicate, pickBestDuplicateDetectionStrategy, save, toStringMethods inherited from class org.onebusaway.gtfs_merge.strategies.AbstractSingleEntityMergeStrategy
getDescription, getEntityTypes, merge, mergeEntity, rejectDuplicateOverDifferencesMethods inherited from class org.onebusaway.gtfs_merge.strategies.AbstractEntityMergeStrategy
determineDuplicateDetectionStrategy, getDuplicateRenamingStrategy, setDuplicateDetectionStrategy, setDuplicateRenamingStrategy, setLogDuplicatesStrategy
-
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:AbstractSingleEntityMergeStrategyIf 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:
replaceDuplicateEntryin classAbstractSingleEntityMergeStrategy<org.onebusaway.gtfs.model.Agency>- Parameters:
context-oldAgency- the old entity in the source feed that should be replacednewAgency- the new entity in the output merged feed that duplicates the old entity
-
rename
Description copied from class:AbstractIdentifiableSingleEntityMergeStrategyRename the id of the specified identity to avoid an raw GTFS identifier collision in the merged output feed.- Overrides:
renamein classAbstractIdentifiableSingleEntityMergeStrategy<org.onebusaway.gtfs.model.Agency>- Parameters:
context-entity-
-