Class EntityReplacementStrategyFactory


  • public class EntityReplacementStrategyFactory
    extends Object
    Factory for constructing EntityReplacementStrategy instances from file data. You can setup entity mappings using the setEntityMappings(Map) to supply the mappings and then create() to generate the strategy instance. What do the mappings look like? The setEntityMappings(Map) method accepts a map of class to file objects, where the class indicates the entity type to perform replacement on and the file specifies the actual id mappings. The file takes the following format: # Comments are supported agencyId_replacementEntityIdA agencyId_toBeReplacedEntityIdB [...] agencyId_replacementEntityIdC agencyId_toBeReplacedEntityIdD [...] Here entity ids are of the string serialized form of AgencyAndId, as parsed by AgencyAndIdLibrary. The first entity on a line is the replacement entity id, while all subsequent entities (separated by whitespace) are entity ids that should be replaced with the replacement id.
    Author:
    bdferris
    See Also:
    EntityReplacementStrategy, GtfsReadingSupport, GtfsMultiReaderImpl, EntityReplacementStrategyImpl