예제 #1
0
  @POST
  @Path("/getFilterInGEOJSON/{filter}")
  @Consumes(MediaType.APPLICATION_JSON)
  @Produces(MediaType.TEXT_PLAIN)
  public String getFilterInGEOJSON(WrapperFilter filter) {
    log.info("init getFilterInGEOJSON");
    ChronometerUtil c = new ChronometerUtil();
    c.start();
    try {
      String result =
          executeFilterWFS(
              filter,
              MapRequestBuilder.MidwareTypes.geoserver.name(),
              MapRequestBuilder.MidwareProduces.geojson.name());

      return result;

    } catch (Exception e) {

      log.throwing(WrapperResource.class.getSimpleName(), "getFilterInGEOJSON", e);
    } finally {
      log.info(c.stop("finish getFilterInGEOJSON"));
    }
    return null;
  }
예제 #2
0
 @GET
 @Path("/getSchema")
 @Produces(MediaType.APPLICATION_JSON)
 public WrapperFilter getSchema() {
   log.info("init getSchema");
   ChronometerUtil c = new ChronometerUtil();
   c.start();
   try {
     WrapperFilter f = new WrapperFilter();
     Operators[] operators =
         new Operators[] {new Operators(new String[] {"valor1", "valor2"}, "IN")};
     Filters[] filters = new Filters[] {new Filters("column", operators, "table")};
     f.setFilters(filters);
     Join[] joins = new Join[] {new Join("name", "column")};
     f.setJoin(joins);
     f.setLayer("layer");
     f.setTable(new Table("table"));
     return f;
   } catch (Exception e) {
     log.throwing(WrapperResource.class.getSimpleName(), "getFilterWfsURL", e);
   } finally {
     log.info(c.stop("finish getSchema"));
   }
   return null;
 }