org.opentripplanner.netex.loader.mapping.FeedScopedIdFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
package org.opentripplanner.netex.loader.mapping;
import org.opentripplanner.model.FeedScopedId;
/**
* GTFS uses the term agency_id, which is used to scope the ids of all other elements in OTP. Since NeTEx does not
* contain this id and also assumes ids are already unique, it is necessary to specify an id to use in the OTP model.
*
* This factory is used to set the feed id once and then apply it to elements as they are created.
*
* This class should only be used by the Netex import/mapping process.
*/
class FeedScopedIdFactory {
private final String feedId;
public FeedScopedIdFactory(String feedId) {
this.feedId = feedId;
}
public FeedScopedId createId(String netexId) {
return new FeedScopedId(feedId, netexId);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy