public void createPathway(Stop from, Stop to, int mode, int traversalTime, int wheelchairTraversalTime, String id, String code, boolean reverse) {
if (to == null || to.getId() == null) {
_log.error("invalid to {}", to);
return;
}
if (from == null || from.getId() == null) {
_log.error("invalid from {}", from);
return;
}
Pathway pathway = new Pathway();
pathway.setFromStop(from);
pathway.setToStop(to);
pathway.setPathwayMode(mode);
pathway.setTraversalTime(traversalTime);
if (wheelchairTraversalTime > 0) {
pathway.setWheelchairTraversalTime(wheelchairTraversalTime);
}
pathway.setId(new AgencyAndId(agencyId, to.getId().getId() + "-" + id + "-IN"));
if (code != null) {
pathway.setPathwayCode(code);
}
if (reverse) {
Pathway reversePathway = reverse(pathway, new AgencyAndId(agencyId, to.getId().getId() + "-" + id + "-OUT"));
newPathways.add(reversePathway);
}
newPathways.add(pathway);
}