Package org.geoserver.rest.format

Examples of org.geoserver.rest.format.DataFormat.toRepresentation()


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


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

    /**
     * Returns the map representation of the underlying target object in a GET request.
     * <p>
 
View Full Code Here

        DataFormat formatGet = getFormatGet();
        if (formatGet == null) {
            formatGet = new DirectoryJSONFormat(MediaType.APPLICATION_JSON);
        }

        getResponse().setEntity(formatGet.toRepresentation(response));
    }

    @Override
    public boolean allowPost() {
        return getAttribute("file") == null;
View Full Code Here

        Object lookupContext = lookupContext(true, false);
        if (lookupContext == null) {
            // this means a specific lookup failed
            getResponse().setStatus(Status.CLIENT_ERROR_NOT_FOUND);
        } else {
            getResponse().setEntity(formatGet.toRepresentation(lookupContext));
        }
    }

    @Override
    public boolean allowPost() {
View Full Code Here

            }
           
           
            //poach the coverage store data format
            DataFormat df = new CoverageStoreResource(getContext(),request,response,catalog).createXMLFormat(request, response);
            response.setEntity(df.toRepresentation(info));
            response.setStatus(Status.SUCCESS_CREATED);
        }
        catch( Exception e ) {
            if(e instanceof RestletException) {
                throw (RestletException) e;
View Full Code Here

                //TODO: update the layers pointing at this coverage
            }
           
            //poach the coverage store data format
            DataFormat df = new CoverageStoreResource(getContext(),request,response,catalog).createXMLFormat(request, response);
            response.setEntity(df.toRepresentation(info));
            response.setStatus(Status.SUCCESS_CREATED);
        }
        catch( Exception e ) {
            throw new RestletException( "Error auto-configuring coverage", Status.SERVER_ERROR_INTERNAL, e );
        }
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.