Package org.geoserver.wms

Examples of org.geoserver.wms.GetCapabilitiesRequest


        catalog = new CatalogImpl();
        geosConfig.setCatalog(catalog);

        wmsConfig = new WMS(geosConfig);

        req = new GetCapabilitiesRequest();
        req.setBaseUrl(baseUrl);

        Map<String, String> namespaces = new HashMap<String, String>();
        namespaces.put("xlink", "http://www.w3.org/1999/xlink");
        XMLUnit.setXpathNamespaceContext(new SimpleNamespaceContext(namespaces));
View Full Code Here


    @Override
    public void write(final Object value, final OutputStream output, final Operation operation)
            throws IOException, ServiceException {

        final GetCapabilitiesTransformer transformer = (GetCapabilitiesTransformer) value;
        final GetCapabilitiesRequest request = (GetCapabilitiesRequest) operation.getParameters()[0];

        final String internalDTDDeclaration = getInternalDTDDeclaration(request);

        if (internalDTDDeclaration == null) {
            // transform directly to output
View Full Code Here

     */
    @SuppressWarnings("rawtypes")
    @Override
    public Object read(Object request, Reader reader, Map kvp) throws Exception {
        // instantiante parsers and content handlers
        GetCapabilitiesRequest req = new GetCapabilitiesRequest();
        CapabilitiesHandler currentRequest = new CapabilitiesHandler(req);

        // read in XML file and parse to content handler
        try {
            SAXParserFactory factory = SAXParserFactory.newInstance();
View Full Code Here

    }

    @SuppressWarnings({ "rawtypes", "unchecked" })
    @Override
    public GetCapabilitiesRequest read(Object req, Map kvp, Map rawKvp) throws Exception {
        GetCapabilitiesRequest request = (GetCapabilitiesRequest) super.read(req, kvp, rawKvp);
        request.setRawKvp(rawKvp);

        String version = request.getVersion();
        if (null == version || version.length() == 0) {
            version = (String) rawKvp.get("WMTVER");
        }
       
        //kind of a silly check but the cite tests put some rules about using WMTVER vs VERSION
        // depending on which one shows up as a kvp parameter first in order, which actualy
        // violates http get, but we do a check here to throw out one if it does not match
        // an available wms version
        if (rawKvp.containsKey("VERSION") && rawKvp.containsKey("WMTVER")) {
            String ver = (String) rawKvp.get("VERSION");
            String wmtver = (String) rawKvp.get("WMTVER");
           
            if (WMS.version(ver, true) != null && WMS.version(wmtver, true) == null) {
                version = ver;
            }
            else if (WMS.version(ver, true) == null && WMS.version(wmtver, true) != null) {
                version = wmtver;
            }
        }
        // version negotation
        Version requestedVersion = WMS.version(version);
        Version negotiatedVersion = wms.negotiateVersion(requestedVersion);
        request.setVersion(negotiatedVersion.toString());
       
        return request;
    }
View Full Code Here

TOP

Related Classes of org.geoserver.wms.GetCapabilitiesRequest

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.