Examples of CapabilitiesHandler


Examples of org.vfny.geoserver.util.requests.CapabilitiesHandler

  public Request read(Reader reader, HttpServletRequest req)
      throws WcsException {
    InputSource requestSource = new InputSource(reader);

    // instantiante parsers and content handlers
    CapabilitiesHandler currentRequest = new CapabilitiesHandler(
        new WCSCapabilitiesRequest((WCSInfo) getService()));

    // read in XML file and parse to content handler
    try {
      SAXParserFactory factory = SAXParserFactory.newInstance();
      SAXParser parser = factory.newSAXParser();
      ParserAdapter adapter = new ParserAdapter(parser.getParser());
      adapter.setContentHandler(currentRequest);
      adapter.parse(requestSource);
      LOGGER.fine("just parsed: " + requestSource);
    } catch (SAXException e) {
      throw new WcsException(e, "XML capabilities request parsing error",
          getClass().getName());
    } catch (IOException e) {
      throw new WcsException(e, "XML capabilities request input error",
          getClass().getName());
    } catch (ParserConfigurationException e) {
      throw new WcsException(e, "Some sort of issue creating parser",
          getClass().getName());
    }

    Request r = currentRequest.getRequest(req);

    if (r.getService() != null) {
      final String service = r.getService();

      if (!service.trim().toUpperCase().startsWith("WCS")) {
View Full Code Here

Examples of org.vfny.geoserver.util.requests.CapabilitiesHandler

        throws WmsException {
        InputSource requestSource = new InputSource(reader);

        // instantiante parsers and content handlers
        WMSCapabilitiesRequest request = new WMSCapabilitiesRequest(wmsConfig);
        CapabilitiesHandler currentRequest = new CapabilitiesHandler(request);

        // read in XML file and parse to content handler
        try {
            SAXParserFactory factory = SAXParserFactory.newInstance();
            SAXParser parser = factory.newSAXParser();
            ParserAdapter adapter = new ParserAdapter(parser.getParser());
            adapter.setContentHandler(currentRequest);
            adapter.parse(requestSource);
            LOGGER.fine("just parsed: " + requestSource);
        } catch (SAXException e) {
            throw new WmsException(e, "XML capabilities request parsing error", getClass().getName());
        } catch (IOException e) {
            throw new WmsException(e, "XML capabilities request input error", getClass().getName());
        } catch (ParserConfigurationException e) {
            throw new WmsException(e, "Some sort of issue creating parser", getClass().getName());
        }

        Request r = currentRequest.getRequest(req);

        return r;
    }
View Full Code Here

Examples of org.vfny.geoserver.util.requests.CapabilitiesHandler

     */
    public Request read(Reader reader, HttpServletRequest req) throws WmsException {
        InputSource requestSource = new InputSource(reader);

        // instantiante parsers and content handlers
        CapabilitiesHandler currentRequest = new CapabilitiesHandler();

        // read in XML file and parse to content handler
        try {
            SAXParserFactory factory = SAXParserFactory.newInstance();
            SAXParser parser = factory.newSAXParser();
            ParserAdapter adapter = new ParserAdapter(parser.getParser());
            adapter.setContentHandler(currentRequest);
            adapter.parse(requestSource);
            LOGGER.fine("just parsed: " + requestSource);
        } catch (SAXException e) {
            throw new WmsException(e, "XML capabilities request parsing error",
                getClass().getName());
        } catch (IOException e) {
            throw new WmsException(e, "XML capabilities request input error",
                getClass().getName());
        } catch (ParserConfigurationException e) {
            throw new WmsException(e, "Some sort of issue creating parser",
                getClass().getName());
        }

        Request r = currentRequest.getRequest(req);
        return r;
    }
View Full Code Here

Examples of org.vfny.geoserver.util.requests.CapabilitiesHandler

     */
    public Request read(Reader reader, HttpServletRequest req) throws WfsException {
        InputSource requestSource = new InputSource(reader);

        // instantiante parsers and content handlers
        CapabilitiesHandler currentRequest = new CapabilitiesHandler();

        // read in XML file and parse to content handler
        try {
            SAXParserFactory factory = SAXParserFactory.newInstance();
            SAXParser parser = factory.newSAXParser();
            ParserAdapter adapter = new ParserAdapter(parser.getParser());

            adapter.setContentHandler(currentRequest);
            adapter.parse(requestSource);
            LOGGER.fine("just parsed: " + requestSource);
        } catch (SAXException e) {
            throw new WfsException(e, "XML capabilities request parsing error",
                getClass().getName());
        } catch (IOException e) {
            throw new WfsException(e, "XML capabilities request input error",
                getClass().getName());
        } catch (ParserConfigurationException e) {
            throw new WfsException(e, "Some sort of issue creating parser",
                getClass().getName());
        }
        Request r = currentRequest.getRequest(req);
        return r;
    }
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.