Examples of ReflectiveJSONFormat


Examples of org.geoserver.rest.format.ReflectiveJSONFormat

    //JD: we create custom formats here because we need to set up the collection aliases
    // correctly, basically whatever collection we get back we ant to alias to layers, featureTypes,
    // coverages, styles, etc...
    @Override
    protected ReflectiveJSONFormat createJSONFormat(Request request, Response response) {
        final ReflectiveJSONFormat f = super.createJSONFormat(request, response);
        return new ReflectiveJSONFormat() {
            @Override
            public XStream getXStream() {
                return f.getXStream();
            }
           
            @Override
            protected void write(Object data, OutputStream output) throws IOException {
                aliasCollection(data, f.getXStream());
                f.getXStream().toXML(data, output);
            }
        };
    }
View Full Code Here

Examples of org.geoserver.rest.format.ReflectiveJSONFormat

        };
    }
   
    @Override
    protected ReflectiveJSONFormat createJSONFormat(Request request,Response response) {
        return new ReflectiveJSONFormat() {
            @Override
            protected void write(Object data, OutputStream output)
                    throws IOException {
                XStreamPersister p = xpf.createJSONPersister();
                p.setCatalog(catalog);
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.