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

org.opentripplanner.graph_builder.issues.StopNotLinkedForTransfers Maven / Gradle / Ivy

The newest version!
package org.opentripplanner.graph_builder.issues;

import org.locationtech.jts.geom.Geometry;
import org.opentripplanner.graph_builder.issue.api.DataImportIssue;
import org.opentripplanner.street.model.vertex.TransitStopVertex;
import org.opentripplanner.street.model.vertex.Vertex;

public record StopNotLinkedForTransfers(TransitStopVertex stop) implements DataImportIssue {
  private static final String FMT = "Stop %s not near any other stops; no transfers are possible.";

  private static final String HTMLFMT =
    "Stop \"%s (%s)\" not near any other stops; no transfers are possible.";

  @Override
  public String getMessage() {
    return String.format(FMT, stop);
  }

  @Override
  public String getHTMLMessage() {
    return String.format(
      HTMLFMT,
      stop.getLat(),
      stop.getLon(),
      stop.getDefaultName(),
      stop.getStop().getId()
    );
  }

  @Override
  public Vertex getReferencedVertex() {
    return this.stop;
  }

  @Override
  public Geometry getGeometry() {
    return stop.getStop().getGeometry();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy