Package org.geotools.util

Examples of org.geotools.util.Version


                    .getMaximum(0), envelope.getMinimum(1), envelope.getMaximum(1), wli
                    .getNativeCRS());
            // are we in crazy wms 1.3 land?
            if(wli.getNativeCRS() instanceof GeographicCRS) {
                WebMapServer mapServer = wms.getWebMapServer(null);
                Version version = new Version(mapServer.getCapabilities().getVersion());
                if(version.compareTo(new Version("1.3.0")) >= 0) {
                    // flip axis, the wms code won't actually use the crs
                    double minx = re.getMinX();
                    double miny = re.getMinY();
                    double maxx = re.getMaxX();
                    double maxy = re.getMaxY();
View Full Code Here


     * @see GetCapabilitiesTransformer
     * @see Capabilities_1_3_0_Transformer
     */
    public TransformerBase run(final GetCapabilitiesRequest request) throws ServiceException {

        final Version version = WMS.version(request.getVersion());
        if (version == null) {
            throw new IllegalArgumentException("version not supplied.");
        }
       
        // UpdateSequence handling for WMS: see WMS 1.1.1 page 23
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

                            "InvalidParameterValue", "version");
                    }

                    //make sure the versoin actually exists
                    boolean found = false;
                    Version version = new Version(req.getVersion());

                    for (Iterator s = loadServices().iterator(); s.hasNext();) {
                        Service service = (Service) s.next();

                        if (version.equals(service.getVersion())) {
                            found = true;

                            break;
                        }
                    }
View Full Code Here

        return services;
    }

    Service findService(String id, String ver) throws ServiceException {
        Version version = (ver != null) ? new Version(ver) : null;
        Collection services = loadServices();
       
        // the id is actually the pathinfo, in case workspace specific services
        // are active we want to skip the workspace part in the path and go directly to the
        // servlet, which normally, if we ended up here, is a reflector (wms/kml)
        if(id.contains("/")) {
            id = id.substring(id.indexOf("/") + 1);
        }

        //first just match on service,request
        List matches = new ArrayList();

        for (Iterator itr = services.iterator(); itr.hasNext();) {
            Service sBean = (Service) itr.next();

            if (sBean.getId().equalsIgnoreCase(id)) {
                matches.add(sBean);
            }
        }

        if (matches.isEmpty()) {
            return null;
        }

        Service sBean = null;

        //if multiple, use version to filter match
        if (matches.size() > 1) {
            List vmatches = new ArrayList(matches);

            //match up the version
            if (version != null) {
                //version specified, look for a match
                for (Iterator itr = vmatches.iterator(); itr.hasNext();) {
                    Service s = (Service) itr.next();

                    if (version.equals(s.getVersion())) {
                        continue;
                    }

                    itr.remove();
                }
View Full Code Here

                // we cannot just assume a meaningful default
            }

            // match up the version
            if (ver != null) {
                Version version = new Version(ver);

                // version specified, look for a match (and allow version
                // generic ones to live by)
                for (Iterator itr = vmatches.iterator(); itr.hasNext();) {
                    XmlRequestReader r = (XmlRequestReader) itr.next();

                    if (r.getVersion() == null || version.equals(r.getVersion())) {
                        continue;
                    }

                    itr.remove();
                }

                if (vmatches.isEmpty()) {
                    // no matching version found, drop out and next step
                    // will sort to return highest version
                    vmatches = new ArrayList(matches);
                }
            }

            //multiple readers found, sort by version and by service match
            if (vmatches.size() > 1) {
                //use highest version
                Comparator comparator = new Comparator() {
                        public int compare(Object o1, Object o2) {
                            XmlRequestReader r1 = (XmlRequestReader) o1;
                            XmlRequestReader r2 = (XmlRequestReader) o2;

                            Version v1 = r1.getVersion();
                            Version v2 = r2.getVersion();

                            if ((v1 == null) && (v2 == null)) {
                                return 0;
                            }
View Full Code Here

import org.xml.sax.InputSource;


public class MessageXmlParser extends XmlRequestReader {
    public MessageXmlParser() {
        super(new QName(null, "Hello"), new Version("1.0.0"), "hello");
    }
View Full Code Here

    public DefaultVersioningWebFeatureService(GeoServer gs) {
        this.wfs = gs.getService( WFSInfo.class );
        this.catalog = gs.getCatalog();
       
        versions = new ArrayList();
        versions.add( new Version("1.0.0" ) );
        versions.add( new Version("1.1.0" ) );
    }
View Full Code Here

       
        return new MapLayerInfo(l);
    }
   
    Operation op(String name, String service, String version, Object request) {
        return new Operation(name, new Service(service, null, new Version(version), null),
            null, new Object[]{request});
    }
View Full Code Here

     * Constrcutor for use with a specific wcs 1.0.0 request.
     */
    public WcsKvpParser(String key, Class<?> binding, String request) {
        super(key, binding);
        setService("wcs");
        setVersion(new Version("1.0.0"));
        setRequest(request);
    }
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.