Package org.geotools.util

Examples of org.geotools.util.Version


     * Returns the PostgreSQL version
     */
    public Version getPostgreSQLVersion(Connection conn) throws SQLException {
        if (pgsqlVersion == null) {
            DatabaseMetaData md = conn.getMetaData();
            pgsqlVersion = new Version(
                String.format("%d.%d", md.getDatabaseMajorVersion(), md.getDatabaseMinorVersion()));
        }
        return pgsqlVersion;
    }
View Full Code Here


            request.setFeatureCount(maxFeatures);
        } catch (NumberFormatException ex) {
            // do nothing, FEATURE_COUNT is optional
        }

        Version version = wms.negotiateVersion(request.getVersion());
        request.setVersion(version.toString());
       
        //JD: most wms 1.3 client implementations still use x/y rather than i/j, so we support those
        // too when i/j not specified when not running in strict cite compliance mode
        String colPixel, rowPixel;
        if(version.compareTo(WMS.VERSION_1_3_0) >= 0) {
            colPixel = "I";
            rowPixel = "J";
           
            if (!kvp.containsKey(colPixel) && !kvp.containsKey(rowPixel)) {
                if (!wms.getServiceInfo().isCiteCompliant() && kvp.containsKey("X")
View Full Code Here

   
    private Object readResolve() {
        //this check is here to enable smooth migration from old configurations that don't have
        // the sldVersion property
        if (sldVersion == null) {
            sldVersion = new Version("1.0.0");
        }
        return this;
    }
View Full Code Here

    protected GSSInfo initialize(GSSInfo service) {
        if (service.getVersions() == null) {
            ((GSSInfoImpl) service).setVersions(new ArrayList());
        }
        if (service.getVersions().isEmpty()) {
            service.getVersions().add(new Version("1.0.0"));
        }
        return service;
    }
View Full Code Here

     *
     */
    private List validateSld(InputStream stream, GetMapRequest getMap) {
        try {
            if (getMap.getSldVersion() != null) {
                return Styles.validate(stream, new Version(getMap.getSldVersion()));
            }
            else {
                return Styles.validate(stream);
            }
        }
View Full Code Here

    private StyledLayerDescriptor parseSld(GetMapRequest getMap, InputStream stream) {
      
        StyledLayerDescriptor sld;
        try {
            if (getMap.getSldVersion() != null) {
                sld = Styles.parse(stream, new Version(getMap.getSldVersion()));
            }
            else {
                sld = Styles.parse(stream);
            }
        }
View Full Code Here

     * Access to the global configuration
     */
    GeoServer geoServer;

    public GSSXmlReader(String element, GeoServer gs, Configuration configuration) {
        super(new QName(GSS.NAMESPACE, element), new Version("1.0.0"), "gss");
            this.configuration = configuration;
            this.geoServer = gs;
    }
View Full Code Here

                version = wmtver;
            }
        }
        // version negotation
        Version requestedVersion = WMS.version(version);
        Version negotiatedVersion = wms.negotiateVersion(requestedVersion);
        request.setVersion(negotiatedVersion.toString());
       
        return request;
    }
View Full Code Here

    @Override
    protected WMSInfo initialize(WMSInfo service) {
        super.initialize(service);

        final Version version_1_1_1 = WMS.VERSION_1_1_1;
        final Version version_1_3_0 = WMS.VERSION_1_3_0;

        if (!service.getVersions().contains(version_1_1_1)) {
            service.getVersions().add(version_1_1_1);
        }
        if (!service.getVersions().contains(version_1_3_0)) {
View Full Code Here

     * Xml Configuration
     */
    WCSConfiguration configuration;

    public WcsXmlReader(String element, String version, WCSConfiguration configuration) {
        super(new QName(WCS.NAMESPACE, element), new Version(version), "wcs");
        this.configuration = configuration;
    }
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.