use of org.onebusaway.api.model.transit.service_alerts.SituationConditionDetailsV2Bean in project onebusaway-application-modules by camsys.
the class BeanFactoryV2 method getSituationConsequence.
private SituationConsequenceV2Bean getSituationConsequence(SituationConsequenceBean consequence) {
SituationConsequenceV2Bean bean = new SituationConsequenceV2Bean();
if (consequence.getEffect() != null)
bean.setCondition(consequence.getEffect().toString().toLowerCase());
if (_includeConditionDetails && (consequence.getDetourPath() != null || !CollectionsLibrary.isEmpty(consequence.getDetourStopIds()))) {
SituationConditionDetailsV2Bean detailsBean = new SituationConditionDetailsV2Bean();
if (consequence.getDetourPath() != null) {
EncodedPolylineBean poly = new EncodedPolylineBean();
poly.setPoints(consequence.getDetourPath());
detailsBean.setDiversionPath(poly);
}
detailsBean.setDiversionStopIds(consequence.getDetourStopIds());
bean.setConditionDetails(detailsBean);
}
return bean;
}
Aggregations