Package com.boundlessgeo.geoserver.json

Examples of com.boundlessgeo.geoserver.json.JSONArr.addObject()


                        .style().ysld("two.ysld").layer()
                        .featureType().defaults().store("store")
            .geoServer().build(geoServer);

        JSONArr arr = new JSONArr();
        arr.addObject().put("name", "two");
        arr.addObject().put("name", "one");

        MockHttpServletRequestBuilder req = put("/api/maps/foo/map/layers")
            .contentType(MediaType.APPLICATION_JSON)
            .content(arr.toString());
View Full Code Here


                        .featureType().defaults().store("store")
            .geoServer().build(geoServer);

        JSONArr arr = new JSONArr();
        arr.addObject().put("name", "two");
        arr.addObject().put("name", "one");

        MockHttpServletRequestBuilder req = put("/api/maps/foo/map/layers")
            .contentType(MediaType.APPLICATION_JSON)
            .content(arr.toString());
View Full Code Here

                if(!ICON_FORMATS.containsKey(ext.toLowerCase())){
                    continue;
                }

                JSONObj item = icon(arr.addObject(), ws, r, request);
                item.put("used", usedGraphics.contains(name));
            }
        }

        return arr;
View Full Code Here

            }
            try {
                InputStream data = file.getInputStream();               
                Resources.copy(data, styles, filename);

                icon(created.addObject(), ws, styles.get(filename), request);
            } catch (Exception e) {
                throw new FileUploadException("Unable to write "+filename,e);
            }
        }
View Full Code Here

    @RequestMapping(value = "/recent", method = RequestMethod.GET)
    public @ResponseBody JSONArr recent() throws Exception {
        JSONArr arr = new JSONArr();
        for (Map.Entry<String,CoordinateReferenceSystem> e : Proj.get().recent().entrySet()) {
            IO.proj(arr.addObject(), e.getValue(), e.getKey());
        }
        return arr;
    }

}
View Full Code Here

                    kind = "association";
                }
                else {
                    kind = "property";
                }
                JSONObj property = attributes.addObject()
                    .put("name", NAME )
                    .put("property", kind )
                    .put("type", t.getBinding().getSimpleName() );
               
                if( d instanceof GeometryDescriptor){
View Full Code Here

    }
    public static JSONObj schemaGrid( JSONObj schema, CoordinateReferenceSystem crs, boolean details){
        schema.put("name", "GridCoverage" );
        schema.put("simple", true );
        JSONArr attributes = schema.putArray("attributes");
        JSONObj geom = attributes.addObject()
            .put("name", "geom" )
            .put("property", "geometry" )
            .put("type", "Polygon" );

        if( crs != null ){
View Full Code Here

                .put("max-occurs",1)
                .put("nillable",true)
                .put("default-value",null);  
       
        }
        JSONObj grid = attributes.addObject()
            .put("name", "grid" )
            .put("property", "attribute" )
            .put("type", "grid" );
       
        if( details ){
View Full Code Here

                }
                StringBuilder trace = new StringBuilder();
                for( StackTraceElement e : t.getStackTrace()){
                    trace.append( e.toString()).append('\n');
                }
                cause.addObject()
                    .put("exception", t.getClass().getSimpleName())
                    .put("message", t.getMessage())
                    .put("trace",trace.toString());
            }
            if (message == null) {
View Full Code Here

    JSONArr list() {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd'T'HH:mm:ssZ");

        JSONArr arr = new JSONArr();
        for (HttpSession session : AppSessionDebugger.list()) {
            JSONObj obj = arr.addObject();
            obj.put("id", session.getId())
               .put("created", dateFormat.format(new Date(session.getCreationTime())))
               .put("updated", dateFormat.format(new Date(session.getLastAccessedTime())))
               .put("timeout", session.getMaxInactiveInterval());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.