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

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

There is a newer version: 2.5.0
Show newest version
package org.opentripplanner.graph_builder.issues;

import org.opentripplanner.graph_builder.DataImportIssue;
import org.opentripplanner.routing.graph.Vertex;
import org.opentripplanner.routing.vertextype.TransitEntranceVertex;

public class EntranceUnlinked implements DataImportIssue {

  public static final String FMT = "Entrance %s not near any streets; it will not be usable.";
  public static final String HTMLFMT = "Entrance \"%s\" (%s) not near any streets; it will not be usable.";

  final TransitEntranceVertex entrance;

  public EntranceUnlinked(TransitEntranceVertex entrance) {
    this.entrance = entrance;
  }

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

  @Override
  public String getHTMLMessage() {
    return String.format(
        HTMLFMT,
        entrance.getEntrance().getLat(),
        entrance.getEntrance().getLon(),
        entrance.getName(),
        entrance.getEntrance().getId()
    );
  }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy