Permalink
Browse files

Remove unnecessary dependency

1 parent 3a51a3b commit 9a31318549db30bfebc23e6de95fe45527ba05a2 @jmarin jmarin committed Oct 25, 2012
Showing with 5 additions and 27 deletions.
  1. +0 −8 pom.xml
  2. +5 −19 src/main/java/org/geo/spatialsearch/rest/api/impl/CensusResourceImpl.java
View
@@ -269,14 +269,6 @@
<version>${metrics.version}</version>
</dependency>
- <!-- Documentation -->
- <dependency>
- <groupId>com.wordnik</groupId>
- <artifactId>swagger-jaxrs_2.9.1</artifactId>
- <version>1.1.0</version>
- <scope>compile</scope>
- </dependency>
-
<!-- Testing -->
<dependency>
<groupId>junit</groupId>
@@ -22,9 +22,6 @@
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
-import com.wordnik.swagger.annotations.Api;
-import com.wordnik.swagger.annotations.ApiOperation;
-import com.wordnik.swagger.annotations.ApiParam;
import com.yammer.metrics.annotation.Timed;
/**
@@ -38,7 +35,6 @@
@Scope(value = "singleton")
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML,
"application/x-javascript" })
-@Api(value = "census", basePath = "/census", description = "Census API")
public class CensusResourceImpl implements CensusResource {
@Autowired
@@ -49,25 +45,17 @@
@Qualifier("exceptionHandler")
private ExceptionHandler handler;
- // private static final String CENSUS_BY_COORDINATES =
- // "Census-findByCoordinates";
- // private static final String CENSUS_BY_FIPSCODE =
- // "Census-findGeographyByFips";
- // private static final String CENSUS_BY_GEOGRAPHY_NAME =
- // "Census-findGeographyByName";
-
@Override
@Path(value = "{geography}")
@GET
@Timed
- @ApiOperation(value = "Find Geography by Coordinates", notes = "Returns a Census Geography at a certain latitude, longitude", httpMethod = "GET")
public Response findByCoordinates(
@Context UriInfo uriInfo,
- @ApiParam(value = "geography", required = true) @PathParam(value = "geography") String geography,
- @ApiParam(value = "latitude", required = true) @QueryParam(value = "latitude") double latitude,
- @ApiParam(value = "longitude", required = true) @QueryParam(value = "longitude") double longitude,
- @ApiParam(value = "format", required = false) @DefaultValue("xml") @QueryParam(value = "format") String format,
- @ApiParam(value = "callback", required = false) @QueryParam(value = "callback") String callback) {
+ @PathParam(value = "geography") String geography,
+ @QueryParam(value = "latitude") double latitude,
+ @QueryParam(value = "longitude") double longitude,
+ @DefaultValue("xml") @QueryParam(value = "format") String format,
+ @QueryParam(value = "callback") String callback) {
CensusGeographyEnum geographyType = CensusGeographyEnum
.getGeographyTypeWithKey(geography);
CensusLookupResponse apiResponse = new CensusLookupResponse();
@@ -79,8 +67,6 @@ public Response findByCoordinates(
handler.handle(apiResponse, ex);
exception = ex;
}
- // APIStatsProfiler.captureStatistics(CENSUS_BY_COORDINATES,
- // apiResponse,uriInfo, true, exception);
Response response = RestFormatUtil
.format(format, callback, apiResponse);
return response;

0 comments on commit 9a31318

Please sign in to comment.