Examples of WFSConfig


Examples of org.geotools.data.wfs.internal.WFSConfig

        WFSDataStore wfsds = new WFSDataStore(wfs);
        return wfsds;
    }

    private WFSClient mockUpWfsClient() throws Exception {
        WFSConfig config = new WFSConfig();
        String baseDirectory = "GeoServer_2.0/1.1.0/";

        return new IntegrationTestWFSClient(baseDirectory, config);
    }
View Full Code Here

Examples of org.geotools.data.wfs.internal.WFSConfig

        InputStream stream = TestData.openStream(WFSTestData.class, capabilitiesFileName);
        GetCapabilitiesResponse response = new GetCapabilitiesResponse(response(stream));
        WFSGetCapabilities capabilities = response.getCapabilities();
        real.setCapabilities(capabilities);
        real.setConfig(new WFSConfig());
        return real;
    }
View Full Code Here

Examples of org.geotools.data.wfs.internal.WFSConfig

    }

    @Before
    public void setUp() throws Exception {
        wfs = new IntegrationTestWFSClient("GeoServer_1.7.x/1.0.0/", new WFSConfig());
        dataStore = new WFSDataStore(wfs);
    }
View Full Code Here

Examples of org.geotools.data.wfs.internal.WFSConfig

     */
    @Override
    public WFSDataStore createDataStore(final Map<String, Serializable> params)
            throws IOException {

        final WFSConfig config = WFSConfig.fromParams(params);

        {
            String user = config.getUser();
            String password = config.getPassword();
            if (((user == null) && (password != null))
                    || ((config.getPassword() == null) && (config.getUser() != null))) {
                throw new IOException(
                        "Cannot define only one of USERNAME or PASSWORD, must define both or neither");
            }
        }

        final HTTPClient http = new SimpleHttpClient();// new MultithreadedHttpClient();
        // TODO: let HTTPClient be configured for gzip
        // http.setTryGzip(tryGZIP);
        http.setUser(config.getUser());
        http.setPassword(config.getPassword());
        int timeoutMillis = config.getTimeoutMillis();
        http.setConnectTimeout(timeoutMillis / 1000);

        final URL capabilitiesURL = (URL) URL.lookUp(params);

        // WFSClient performs version negotiation and selects the correct strategy
        WFSClient wfsClient;
        try {
            wfsClient = new WFSClient(capabilitiesURL, http, config);
        } catch (ServiceException e) {
            throw new IOException(e);
        }

        WFSDataStore dataStore = new WFSDataStore(wfsClient);
        // factories
        dataStore.setFilterFactory(CommonFactoryFinder.getFilterFactory(null));
        dataStore.setGeometryFactory(new GeometryFactory(
                PackedCoordinateSequenceFactory.DOUBLE_FACTORY));
        dataStore.setFeatureTypeFactory(new FeatureTypeFactoryImpl());
        dataStore.setFeatureFactory(CommonFactoryFinder.getFeatureFactory(null));
        dataStore.setDataStoreFactory(this);
        dataStore.setNamespaceURI(config.getNamespaceOverride());

        return dataStore;
    }
View Full Code Here

Examples of org.vfny.geoserver.config.WFSConfig

        String fees = descriptionForm.getFees();
        String maintainer = descriptionForm.getMaintainer();
        String keywords = descriptionForm.getKeywords();
        String _abstract = descriptionForm.get_abstract();

        WFSConfig config = getWFSConfig();
        config.setName(name);
        config.setTitle(title);
        config.setAccessConstraints(accessConstraints);
        config.setFees(fees);
        config.setMaintainer(maintainer);
        config.setAbstract(_abstract);

        String[] array = (keywords != null)
            ? keywords.split(System.getProperty("line.separator")) : new String[0];

        config.setKeywords(array);
        getApplicationState().notifyConfigChanged();

        return mapping.findForward("config");
    }
View Full Code Here

Examples of org.vfny.geoserver.config.WFSConfig

        String onlineResource = contentForm.getOnlineResource();
        String[] selectedFeatures = contentForm.getSelectedFeatures();
        String[] features = contentForm.getFeatures();

        WFSConfig config = getWFSConfig();
        config.setSrsXmlStyle(srsXmlStyle);
        config.setEnabled(enabled);
        config.setOnlineResource(new URL(onlineResource));
        config.setServiceLevel(contentForm.getServiceLevel());
        config.setCiteConformanceHacks(citeConformanceHacks);
        config.setFeatureBounding(featureBounding);
        getApplicationState().notifyConfigChanged();

        return mapping.findForward("config");
    }
View Full Code Here

Examples of org.vfny.geoserver.config.WFSConfig

     */
    public void reset(ActionMapping arg0, HttpServletRequest arg1) {
        super.reset(arg0, arg1);

        ServletContext context = getServlet().getServletContext();
        WFSConfig config = (WFSConfig) context.getAttribute(WFSConfig.CONFIG_KEY);

        this.maintainer = config.getMaintainer();
        this.title = config.getTitle();
        this.accessConstraints = config.getAccessConstraints();
        this.name = config.getName();
        this._abstract = config.getAbstract();
        this.fees = config.getFees();

        String out = "";

        for (int i = 0; i < config.getKeywords().length; i++) {
            out = out + config.getKeywords()[i] + System.getProperty("line.separator");
        }

        this.keywords = out;

    }
View Full Code Here

Examples of org.vfny.geoserver.config.WFSConfig

        srsXmlStyleChecked = false;
        citeConformanceHacksChecked = false;
        featureBoundingChecked = false;

        ServletContext context = getServlet().getServletContext();
        WFSConfig config = (WFSConfig) context.getAttribute(WFSConfig.CONFIG_KEY);

        citeConformanceHacks = config.getCiteConformanceHacks();
        featureBounding = config.isFeatureBounding();

        serviceLevel = config.getServiceLevel();
        this.enabled = config.isEnabled();
        this.srsXmlStyle = config.isSrsXmlStyle();

        URL url = config.getOnlineResource();

        if (url != null) {
            this.onlineResource = url.toString();
        } else {
            this.onlineResource = "";
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.