VertexBean from = getVertexAsBean(beansByVertex, vertex);
List<EdgeNarrativeBean> edgeNarratives = new ArrayList<EdgeNarrativeBean>();
for (Edge edge : edges) {
if (edge instanceof EdgeNarrative) {
EdgeNarrative narrative = (EdgeNarrative) edge;
EdgeNarrativeBean narrativeBean = new EdgeNarrativeBean();
narrativeBean.setName(narrative.getName());
Geometry geom = narrative.getGeometry();
if (geom != null) {
List<CoordinatePoint> path = new ArrayList<CoordinatePoint>();
appendGeometryToPath(geom, path, true);
EncodedPolylineBean polyline = PolylineEncoder.createEncodings(path);
narrativeBean.setPath(polyline.getPoints());
}
narrativeBean.setFrom(from);
narrativeBean.setTo(getVertexAsBean(beansByVertex,
narrative.getToVertex()));
Map<String, Object> tags = new HashMap<String, Object>();
if (edge instanceof StreetEdge) {
StreetEdge streetEdge = (StreetEdge) edge;
StreetTraversalPermission permission = streetEdge.getPermission();