Package org.geoserver.rest.format

Examples of org.geoserver.rest.format.DataFormat


                new ImportDataJSONFormat(MediaType.TEXT_HTML));
    }

    @Override
    public void handleGet() {
        DataFormat formatGet = getFormatGet();
        if (formatGet == null) {
            formatGet = new ImportDataJSONFormat(MediaType.APPLICATION_JSON);
        }

        ImportData data = null;

        ImportTask task = task(true);
        if (task != null) {
            data = task.getData();
        }
        else {
            data = context().getData();
        }

        getResponse().setEntity(formatGet.toRepresentation(data));
    }
View Full Code Here


        }
       
        Style rasterized = remapStyle(defaultStyle, rasterSymbolizer, min, max, classes, ramp, layer, digits, colormapType);
       
        //check the format, if specified as sld, return the sld itself
            DataFormat format = getFormatGet();
        if ( format instanceof SLDFormat ) {
          return rasterized;
            }
        return defaultStyle;
      }
View Full Code Here

    public void handleGet() {

        GeoXACMLConfig.reload();

        // get the appropriate format
        DataFormat format = getFormatGet();

        // transform the string "Hello World" to the appropriate response
        getResponse().setEntity(format.toRepresentation(ReloadedMsg));
    }
View Full Code Here

            throw new RestletException("Failed to locate transformation " + transform,
                    Status.CLIENT_ERROR_NOT_FOUND);
        }

        TransformInfo info = repository.getTransformInfo(transform);
        DataFormat format = getFormatGet();
        if (format instanceof XSLTDataFormat) {
            return repository.getTransformSheet(info);
        } else {
            return info;
        }
View Full Code Here

        }
       
        KmlEncodingContext encodingContext = new KmlEncodingContext(webMap.getMapContent(), wms, true);
        KmlEncodingBundle kml = buildKml(encodingContext);

        DataFormat format = getFormatGet();
        Representation representation = format.toRepresentation(kml);
        Response response = getResponse();
        response.setEntity(representation);
    }
View Full Code Here

        this.catalog = catalog;
    }

    @Override
    public void handleGet() {
        DataFormat format = getFormatGet();
        getResponse().setEntity(format.toRepresentation(catalog));
    }
View Full Code Here

     *
     * @see #handleObjectGet()
     */
    @Override
    public final void handleGet() {
        DataFormat format = getFormatGet();
        try {
            getResponse().setEntity(format.toRepresentation(handleObjectGet()));
        }
        catch (Exception e) {
            handleException(e);
        }
    }
View Full Code Here

     *
     * @see #handleObjectPost(Object)
     */
    @Override
    public final void handlePost() {
        DataFormat format = getFormatPostOrPut();
        Object object = format.toObject( getRequest().getEntity() );
        String location = null;
        try {
            location = handleObjectPost(object);
        }
        catch (Exception e) {
View Full Code Here

     *
     * @see #handleObjectPost(Object)
     */
    @Override
    public final void handlePut() {
        DataFormat format = getFormatPostOrPut();
        Object object = format.toObject( getRequest().getEntity() );
        try {
            handleObjectPut(object);
        }
        catch (Exception e) {
            handleException(e);
View Full Code Here

            map = getMap();
        }
        catch (Exception e) {
            throw new RestletException( "", Status.SERVER_ERROR_INTERNAL, e );
        }
        DataFormat format = getFormatGet();
        getResponse().setEntity(format.toRepresentation(map));
    }
View Full Code Here

TOP

Related Classes of org.geoserver.rest.format.DataFormat

Copyright © 2018 www.massapicom. 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.