Permalink
Browse files
Add missing Jackson dependency, fix integration test
- Loading branch information...
|
@@ -228,6 +228,12 @@ |
|
|
<artifactId>jackson-jaxrs</artifactId>
|
|
|
<version>${jackson.version}</version>
|
|
|
</dependency>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.codehaus.jackson</groupId>
|
|
|
+ <artifactId>jackson-xc</artifactId>
|
|
|
+ <version>${jackson.version}</version>
|
|
|
+ </dependency>
|
|
|
+
|
|
|
|
|
|
<!-- Caching -->
|
|
|
<dependency>
|
|
|
|
@@ -18,10 +18,10 @@ |
|
|
@XmlType(name = "State")
|
|
|
@XmlRootElement(name = "State")
|
|
|
@Entity
|
|
|
-@Table(name = "state2000", schema = "census")
|
|
|
+@Table(name = "state2010", schema = "census")
|
|
|
public class State2010 extends CensusGeoBaseObject {
|
|
|
|
|
|
- @Column(name = "USPS10")
|
|
|
+ @Column(name = "STUSPS10")
|
|
|
private String stusps;
|
|
|
|
|
|
@Column(name = "GEOID10")
|
|
|
|
@@ -5,6 +5,7 @@ |
|
|
import javax.persistence.Column;
|
|
|
import javax.persistence.Id;
|
|
|
import javax.persistence.MappedSuperclass;
|
|
|
+import javax.persistence.Transient;
|
|
|
import javax.xml.bind.annotation.XmlAccessType;
|
|
|
import javax.xml.bind.annotation.XmlAccessorType;
|
|
|
import javax.xml.bind.annotation.XmlElement;
|
|
@@ -32,6 +33,7 @@ |
|
|
private Geometry geometry;
|
|
|
|
|
|
@XmlTransient
|
|
|
+ @Transient
|
|
|
private Envelope envelope;
|
|
|
|
|
|
public Long getId() {
|
|
|
|
@@ -22,7 +22,7 @@ public void setUp() throws Exception { |
|
|
|
|
|
@Test
|
|
|
public void testFindStateByCoordinates() throws JSONException {
|
|
|
- ClientResponse response = this.webResource.path("census").path("state")
|
|
|
+ ClientResponse response = this.webResource.path("census").path("state2010")
|
|
|
.queryParam("latitude", "42.919")
|
|
|
.queryParam("longitude", "-75.2517")
|
|
|
.queryParam("format", "json").get(ClientResponse.class);
|
|
@@ -35,10 +35,9 @@ public void testFindStateByCoordinates() throws JSONException { |
|
|
Assert.assertFalse(states.isNull(0));
|
|
|
JSONObject state = (JSONObject) states.get(0);
|
|
|
|
|
|
- assertEquals("36", state.get("fips"));
|
|
|
+ assertEquals("36", state.get("geoid"));
|
|
|
assertEquals("New York", state.get("name"));
|
|
|
- assertEquals("NY", state.get("stateCode"));
|
|
|
- assertEquals("STATE2000", state.get("geographyType"));
|
|
|
+ assertEquals("NY", state.get("stusps"));
|
|
|
}
|
|
|
|
|
|
}
|
0 comments on commit
b7b0016