org.opentripplanner.ext.legacygraphqlapi.datafetchers.LegacyGraphQLGeometryImpl 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.ext.legacygraphqlapi.datafetchers;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import org.opentripplanner.ext.legacygraphqlapi.generated.LegacyGraphQLDataFetchers;
import org.opentripplanner.util.model.EncodedPolylineBean;
public class LegacyGraphQLGeometryImpl implements LegacyGraphQLDataFetchers.LegacyGraphQLGeometry {
@Override
public DataFetcher length() {
return environment -> getSource(environment).getLength();
}
@Override
public DataFetcher points() {
return environment -> getSource(environment).getPoints();
}
private EncodedPolylineBean getSource(DataFetchingEnvironment environment) {
return environment.getSource();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy