Package org.vfny.geoserver.global

Examples of org.vfny.geoserver.global.WFS


        //
        // And allways remember to release locks if we are failing:
        // - if we fail to aquire all the locks we will need to fail and
        //   itterate through the the FeatureSources to release the locks
        //
        WFS wfs = request.getWFS();
        GeoServer config = wfs.getGeoServer();
        Data catalog = wfs.getData();
        FeatureTypeInfo meta = null;
        NameSpaceInfo namespace;
        Query query;

        FeatureSource source;
View Full Code Here


    beans.put("catalog", new DefaultGeoServerCatalog());
    beans.put("controller", new PreferenceStoreImpl(new BlankStore()));
   
    wfsDTO.setService(new ServiceDTO());
    wfsDTO.getService().setEnabled(wfsEnabled );
    beans.put("wfs", new WFS(wfsDTO));
   
    wmsDTO.setService(new ServiceDTO());
    wmsDTO.getService().setEnabled(wmsEnabled);
    beans.put("wms", new WMS(wmsDTO));
  }
View Full Code Here

  public IStatusReport checkStatus() {
    int status = IStatusReport.OKAY;
    Exception message = null;
   
    WFS wfs = null;
    try {
      wfs = (WFS) applicationContext.getBean("wfs");
    } catch (Exception e) {
      status = IStatusReport.ERROR;
      message = e;
      return new DefaultStatusReport(NAME, status, message);
    }
   
    if (wfs == null) {
      status = IStatusReport.ERROR;
      message = new Exception("WFS failed to load. Please check server logs");
    } else if (!wfs.isEnabled()) {
      status = IStatusReport.ERROR;
      message = new Exception("WFS service is currently disabled");
    }
   
    return new DefaultStatusReport(NAME, status, message);
View Full Code Here

    //UserContainer user,
    HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException {
        ServletContext sc = request.getSession().getServletContext();

        WFS wfs = getWFS(request);

        if (wfs == null) {
            // lazy creation on load?
            loadGeoserver(mapping, form, request, response);
        }
View Full Code Here

        /**
         * DOCUMENT ME!
         */
        private void handleService() {
            WFS wfs = request.getWFS();
            start("Service");
            element("Name", wfs.getName());
            element("Title", wfs.getTitle());
            element("Abstract", wfs.getAbstract());

            List kwlist = wfs.getKeywords();
            handleKeywords(kwlist);

            URL or = wfs.getOnlineResource();
            element("OnlineResource", (or == null) ? "" : or.toExternalForm());
            element("Fees", wfs.getFees());
            element("AccessConstraints", wfs.getAccessConstraints());
            end("Service");
        }
View Full Code Here

        /**
         * DOCUMENT ME!
         */
        private void handleCapability() {
            WFS config = request.getWFS();

            start("Capability");
            start("Request");
            handleGetCapabilities();
            handleDescribeFT();
            handleGetFeature();

    if (config.getServiceLevel() >= WFSDTO.TRANSACTIONAL) {
                handleTransaction();
            }

    if (config.getServiceLevel() == WFSDTO.COMPLETE) {
                handleLock();
                handleFeatureWithLock();
            }

            end("Request");
View Full Code Here

          //DJB: (see above comment, this fixes it0
          //      WFS config now has a "citeConformanceHacks" boolean in it.
          //      true --> only publish GML2 in caps file
          //      false -> publish all
            WFS config = request.getWFS();
            boolean onlyGML2 = config.getCiteConformanceHacks();
           
            if (onlyGML2)
            {
              element("GML2",null);
            }
View Full Code Here

        /**
         * DOCUMENT ME!
         */
        private void handleFeatureTypes() {
            WFS wfs = request.getWFS();

            if (!wfs.isEnabled()) {
                // should we return anything if we are disabled?
            }

            start("FeatureTypeList");
            start("Operations");

            if ((wfs.getServiceLevel() | WFSDTO.SERVICE_BASIC) != 0) {
                element("Query", null);
            }

            if ((wfs.getServiceLevel() | WFSDTO.SERVICE_INSERT) != 0) {
                element("Insert", null);
            }

            if ((wfs.getServiceLevel() | WFSDTO.SERVICE_UPDATE) != 0) {
                element("Update", null);
            }

            if ((wfs.getServiceLevel() | WFSDTO.SERVICE_DELETE) != 0) {
                element("Delete", null);
            }

            if ((wfs.getServiceLevel() | WFSDTO.SERVICE_LOCKING) != 0) {
                element("Lock", null);
            }

            end("Operations");

            Collection featureTypes = wfs.getData().getFeatureTypeInfos()
                                         .values();
            FeatureTypeInfo ftype;

            for (Iterator it = featureTypes.iterator(); it.hasNext();) {
                ftype = (FeatureTypeInfo) it.next();
View Full Code Here

    WMS vp = Requests.getWMS( getHttpServletRequest() );
    return vp;
  }
 
  public WFS getWFS(){
    WFS vp = Requests.getWFS( getHttpServletRequest() );
    return vp;
  }
View Full Code Here

     */
    public void init(ActionServlet arg0, ModuleConfig arg1)
        throws ServletException {
        ServletContext sc = arg0.getServletContext();
        WMS wms = (WMS) sc.getAttribute(WMS.WEB_CONTAINER_KEY);
        WFS wfs = (WFS) sc.getAttribute(WFS.WEB_CONTAINER_KEY);

        if (wms == null || wfs == null) {
            GeoServerPlugIn gspi = new GeoServerPlugIn();
            gspi.init(arg0, arg1);
            wms = (WMS) sc.getAttribute(WMS.WEB_CONTAINER_KEY);
            wfs = (WFS) sc.getAttribute(WFS.WEB_CONTAINER_KEY);

            if (wms == null || wfs == null) {
                throw new ServletException(
                    "GeoServerPlugIn Failed. Thus ConfigPlugIn cannot run.");
            }
        }

        sc.setAttribute(WMSConfig.CONFIG_KEY, new WMSConfig((WMSDTO)wms.toDTO()));
        sc.setAttribute(WFSConfig.CONFIG_KEY, new WFSConfig((WFSDTO)wfs.toDTO()));
        sc.setAttribute(GlobalConfig.CONFIG_KEY,
            new GlobalConfig((GeoServerDTO)wfs.getGeoServer().toDTO()));
        sc.setAttribute(DataConfig.CONFIG_KEY, new DataConfig((DataDTO)wfs.getData().toDTO()));
       
        ValidationConfig vc = null;
    try{
      vc = new ValidationConfig((Map)wfs.getValidation().toPlugInDTO(), (Map)wfs.getValidation().toTestSuiteDTO());
    }catch(Exception e){
      //load error
      vc = new ValidationConfig();
    }
        sc.setAttribute(ValidationConfig.CONFIG_KEY, vc);
View Full Code Here

TOP

Related Classes of org.vfny.geoserver.global.WFS

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.