Package org.geotools.util

Examples of org.geotools.util.Version


     * @see org.geoserver.wms.ExtendedCapabilitiesProvider#encode(org.geoserver.wms.ExtendedCapabilitiesProvider.Translator,
     *      org.geoserver.wms.WMSInfo, org.geotools.util.Version)
     */
    public void encode(final Translator tx, final WMSInfo wms, final GetCapabilitiesRequest request)
            throws IOException {
        Version version = WMS.version(request.getVersion(), true);
        if (!WMS.VERSION_1_1_1.equals(version) || !isTiled(request)) {
            return;
        }

        List<TileLayer> tileLayers = gwc.getLayers(request.getNamespace());
View Full Code Here


* @author Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
*
*/
public class VersionPropertyEditor extends PropertyEditorSupport {
    public void setAsText(String text) throws IllegalArgumentException {
        setValue(new Version(text));
    }
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

        try {
            cx = getDataSource().getConnection();
            st = cx.createStatement();
            rs = st.executeQuery("SELECT infodata FROM dbc.dbcinfo where INFOKEY='VERSION';)");
            if (rs.next()) {
                return new Version(rs.getString(1)).compareTo(new Version("13.00.0.00")) >= 0;
            } else {
                return true;
            }
        } finally {
            rs.close();
View Full Code Here

        try {
            cx = getDataSource().getConnection();
            st = cx.createStatement();
            rs = st.executeQuery("select PostGIS_Lib_Version()");
            if(rs.next()) {
                return new Version(rs.getString(1)).compareTo(new Version("1.5.0")) >= 0;
            } else {
                return true;
            }
        } finally {
            rs.close();
View Full Code Here

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

        return version;
    }

    @Override
    protected void createLine3DTable() throws Exception {
        Version version = getVersion();
        boolean atLeastV2 = version.compareTo(V_2_0_0) >= 0;
        String geometryType = atLeastV2 ? "geometry(LINESTRINGZ, 4326)" : "geometry";
       
        // setup table
        run("CREATE TABLE \"line3d\"(\"fid\" serial PRIMARY KEY, \"id\" int, "
                + "\"geom\" " + geometryType + ", \"name\" varchar )");
View Full Code Here

                + "'l2')");
    }

    @Override
    protected void createPoint3DTable() throws Exception {
        Version version = getVersion();
        boolean atLeastV2 = version.compareTo(V_2_0_0) >= 0;
        String geometryType = atLeastV2 ? "geometry(POINTZ, 4326)" : "geometry";
       
        // setup table
        run("CREATE TABLE \"point3d\"(\"fid\" serial PRIMARY KEY, \"id\" int, "
                + "\"geom\" " + geometryType + ", \"name\" varchar )");
View Full Code Here

     *            optional override provided by user
     * @return WFSStrategy to use
     */
    private WFSStrategy determineCorrectStrategy() {

        final Version capsVersion = new Version(capabilities.getVersion());
        Document capabilitiesDoc = capabilities.getRawDocument();

        final String override = config.getWfsStrategy();

        WFSStrategy strategy = null;
View Full Code Here

        final WfsFactory factory = WfsFactory.eINSTANCE;

        DescribeFeatureTypeType dft = factory.createDescribeFeatureTypeType();

        Version version = getServiceVersion();
        dft.setService("WFS");
        dft.setVersion(version.toString());
        dft.setHandle(request.getHandle());

        if (Versions.v1_0_0.equals(version)) {
            dft.setOutputFormat(null);
        }
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.