Package org.geotools.util

Examples of org.geotools.util.Version


    @Override
    public Set<String> getServerSupportedOutputFormats(WFSOperationType operation) {
       
        String parameterName;

        final Version serviceVersion = getServiceVersion();
        final boolean wfs1_0 = Versions.v1_0_0.equals(serviceVersion);
        switch (operation) {
        case GET_FEATURE:
            parameterName = wfs1_0 ? "ResultFormat" : "outputFormat";
            break;
View Full Code Here


            List<Configuration> tryConfigs = Arrays.asList(WFS_2_0_CONFIGURATION,
                    WFS_1_1_CONFIGURATION, WFS_1_0_CAPABILITIES_CONFIGURATION);

            final String versionAtt = rawDocument.getDocumentElement().getAttribute("version");
            Version version = null;
            if (null != versionAtt) {
                version = new Version(versionAtt);
                if (Versions.v1_0_0.equals(version)) {
                    tryConfigs = Collections.singletonList(WFS_1_0_CAPABILITIES_CONFIGURATION);
                } else if (Versions.v1_1_0.equals(version)) {
                    tryConfigs = Collections.singletonList(WFS_1_1_CONFIGURATION);
                } else if (Versions.v2_0_0.equals(version)) {
View Full Code Here

    protected Map<String, String> buildGetFeatureParametersForGET(GetFeatureRequest request) {
        requestDebug("Creating GetFeature request parameters for ", request.getTypeName());

        Map<String, String> map = new HashMap<String, String>();
        map.put("SERVICE", "WFS");
        Version serviceVersion = getServiceVersion();
        map.put("VERSION", serviceVersion.toString());
        map.put("REQUEST", "GetFeature");
        String outputFormat = request.getOutputFormat();
        if (outputFormat == null) {
            outputFormat = getDefaultOutputFormat(WFSOperationType.GET_FEATURE);
        }
View Full Code Here

        String queryString = host.getQuery();
        queryString = queryString == null || "".equals(queryString.trim()) ? "" : queryString
                .toUpperCase();

        final Version defaultVersion = Versions.highest();
       
        // which version to use
        Version requestVersion = defaultVersion;

        if (queryString.length() > 0) {

            Map<String, String> params = new HashMap<String, String>();
            String[] split = queryString.split("&");
View Full Code Here

    public static Version find(String capsVersion) {
        if (capsVersion == null) {
            throw new IllegalArgumentException();
        }
        Version v = new Version(capsVersion);
        if (v1_0_0.equals(v)) {
            return v1_0_0;
        }
        if (v1_1_0.equals(v)) {
            return v1_1_0;
View Full Code Here

            if (segments.length == 4 && !segments[0].isEmpty()) {
                URI_Type uriType = URI_Type.get(segments[0]);
                if (uriType != null && !segments[1].isEmpty() && !segments[2].isEmpty()
                        && !segments[3].isEmpty()) {
                    String uriAuthority = segments[1];
                    Version uriVersion = segments[2].equals(UNVERSIONED) ? null : new Version(
                            segments[2]);
                    String uriCode = segments[3];
                    return new HTTP_URI_Parser(uriText, uriType, uriAuthority, uriVersion, uriCode);
                }
            }
View Full Code Here

                c.getAlternateTitles().add(Vocabulary.formatInternational(
                        VocabularyKeys.DATA_BASE_$3, "EPSG", version, engine));
                c.setEdition(new SimpleInternationalString(version));
                c.setEditionDate(date);
                authority = (Citation) c.unmodifiable();
                hints.put(Hints.VERSION, new Version(version))// For getImplementationHints()
            } else {
                authority = Citations.EPSG;
            }
            result.close();
            statement.close();
View Full Code Here

     * @throws FactoryException if an error occurred while creating the factory.
     */
    private AuthorityFactory getVersionedFactory(final URI_Parser parser)
            throws FactoryException
    {
        final Version version = parser.version;
        if (version == null) {
            return null;
        }
        AuthorityFactory factory;
        synchronized (byVersions) {
View Full Code Here

                    final URI_Type candidate = URI_Type.get(type);
                    if (candidate != null) {
                        final int nameEnd = code.indexOf(URN_SEPARATOR, typeEnd + 1);
                        if (nameEnd >= 0) {
                            final int lastEnd = code.lastIndexOf(URN_SEPARATOR);
                            Version urnVersion = (lastEnd <= nameEnd) ? null : new Version(
                                    code.substring(nameEnd + 1, lastEnd));
                            String urnAuthority = code.substring(typeEnd + 1, nameEnd).trim();
                            String urnCode = code.substring(lastEnd + 1).trim();
                            URI_Type urnType = candidate;
                            return new URN_Parser(urn, urnType, urnAuthority, urnVersion, urnCode);
View Full Code Here

            ResultSet rs = null;
            try {
                st = conn.createStatement();
                rs = st.executeQuery("select PostGIS_Lib_Version()");
                if(rs.next()) {
                    version = new Version(rs.getString(1));
                }
            } finally {
                dataStore.closeSafe(rs);
                dataStore.closeSafe(st);
            }
View Full Code Here

TOP

Related Classes of org.geotools.util.Version

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.