Package org.geoserver.wfs.response

Source Code of org.geoserver.wfs.response.WFSResponse

/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* (c) 2001 - 2013 OpenPlans
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.wfs.response;

import java.util.Set;

import org.geoserver.config.GeoServer;
import org.geoserver.ows.Response;
import org.geoserver.platform.Operation;
import org.geoserver.wfs.WFSInfo;

/**
* Base class for WFS response objects.
*
* @author Justin Deoliveira, OpenGeo
*
*/
public abstract class WFSResponse extends Response {

    protected GeoServer gs;
   
    public WFSResponse(GeoServer gs, Class binding) {
        super(binding);
        this.gs = gs;
    }
   
    public WFSResponse(GeoServer gs, Class binding, String outputFormat) {
        super(binding, outputFormat);
        this.gs = gs;
    }

    public WFSResponse(GeoServer gs, Class binding, Set<String> outputFormats) {
        super(binding, outputFormats);
        this.gs = gs;
    }
   
    protected WFSInfo getInfo() {
        WFSInfo wfs = gs.getService(WFSInfo.class);
        if (wfs == null) {
            throw new IllegalArgumentException("A valid WFS object must be provided");
        }
       
        return wfs;
    }
}
TOP

Related Classes of org.geoserver.wfs.response.WFSResponse

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.