Permalink
Browse files

more api fixups

  • Loading branch information...
1 parent 1312195 commit 1823ff4303ab64197c9df0d9a5c50d1cde8a48ad novalis committed Oct 18, 2012
@@ -18,15 +18,15 @@
import java.util.List;
import java.util.TimeZone;
-import org.opentripplanner.routing.core.TraverseMode;
-import org.opentripplanner.routing.patch.Alert;
-
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
+import org.opentripplanner.routing.core.TraverseMode;
+import org.opentripplanner.routing.patch.Alert;
import org.opentripplanner.util.model.EncodedPolylineBean;
+import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
/**
@@ -154,8 +154,9 @@
* This field is optional i.e. it is always null unless "showIntermediateStops" parameter is set to "true" in the planner request.
*/
@XmlElementWrapper(name = "intermediateStops")
+ @JsonProperty(value="intermediateStops")
public List<Place> stop;
-
+
/**
* The leg's geometry.
*/
@@ -165,6 +166,7 @@
* A series of turn by turn instructions used for walking, biking and driving.
*/
@XmlElementWrapper(name = "steps")
+ @JsonProperty(value="steps")
public List<WalkStep> walkSteps;
/**
@@ -18,6 +18,8 @@
import java.util.List;
import javax.xml.bind.annotation.XmlElementWrapper;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
/**
* A TripPlan is a set of ways to get from point A to point B at time T.
@@ -41,6 +43,7 @@
* A list of possible itineraries.
*/
@XmlElementWrapper(name="itineraries")
+ @JsonProperty(value="itineraries")
public List<Itinerary> itinerary = new ArrayList<Itinerary>();
public TripPlan() {}
@@ -18,10 +18,13 @@
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
@XmlRootElement
public class GraphComponentPolygons {
@XmlElementWrapper(name="components")
+ @JsonProperty(value="components")
public List<GraphComponent> components;
@@ -20,6 +20,8 @@
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
@XmlRootElement
public class GeocoderResults {
@@ -50,6 +52,7 @@ public void setError(String error) {
@XmlElementWrapper(name="results")
@XmlElement(name="result")
+ @JsonProperty(value="results")
public Collection<GeocoderResult> getResults() {
return results;
}

0 comments on commit 1823ff4

Please sign in to comment.