All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opentripplanner.netex.loader.mapping.TariffZoneMapper Maven / Gradle / Ivy

There is a newer version: 2.5.0
Show newest version
package org.opentripplanner.netex.loader.mapping;

import org.opentripplanner.model.FeedScopedId;
import org.opentripplanner.model.FareZone;

public class TariffZoneMapper {

  private final FeedScopedIdFactory idFactory;

  public TariffZoneMapper(FeedScopedIdFactory idFactory) {
    this.idFactory = idFactory;
  }

  /**
   * Map Netex TariffZone to OTP TariffZone
   */
  public FareZone mapTariffZone(org.rutebanken.netex.model.TariffZone tariffZone) {
    FeedScopedId id = idFactory.createId(tariffZone.getId());
    String name = tariffZone.getName().getValue();
    return new FareZone(id, name);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy