Package org.geotools.data.ows

Examples of org.geotools.data.ows.Service


* @since 1.1.0
*/
public class WMSCServieInfo extends IServiceInfo {
   
    public WMSCServieInfo(WMSCServiceImpl service ){
        Service capservice;
        capservice = service.getWMSC().getCapabilities().getService();
       
        if (capservice != null){
            this.title = capservice.getName();
            this._abstract = capservice.get_abstract();
            this.description = capservice.getTitle();
            this.keywords = capservice.getKeywordList();
        }
    }
View Full Code Here


            for( int i = 0; i < value.length; i++ ) {
                ElementValue elementValue = value[i];
                // Service
                if (sameName(elems[0], elementValue)) {
                    Service x = ((Service)elementValue.getValue());
                    capabilities.setService(x);
                }
                // Capability
                if (sameName(elems[1], elementValue)) {
                    Capability c = ((Capability)elementValue.getValue());
View Full Code Here

        @SuppressWarnings("unchecked")
        public Object getValue(Element element, ElementValue[] value,
                Attributes attrs, Map hints) throws SAXException,
                OperationNotSupportedException {

            Service service = new Service();

            for (int i = 0; i < value.length; i++) {

                if (sameName(elems[0], value[i])) {
                    service.setName((String) value[i].getValue());
                }

                if (sameName(elems[1], value[i])) {
                    service.setTitle((String) value[i].getValue());
                }

//                if (sameName(elems[2], value[i])) {
//                    service.set_abstract((String) value[i].getValue());
//                }
//
//                if (sameName(elems[3], value[i])
//                        || sameName(elems[11], value[i])) {
//                    service.setKeywordList((String[]) value[i].getValue());
//                }

                // OnlineResource
                if (sameName(elems[2], value[i])) {
                    String spec = (String) value[i].getValue();
                    if( spec == null || spec.length() == 0){
                        // Service not avaialble
                        System.out.println("OnlineResource cannot be empty");
                    }
                    else {
                        try {
                            service.setOnlineResource(new URL( spec ));
                        } catch (MalformedURLException e) {
                           System.out.println("OnlineResource cannot string to url: " +spec); //$NON-NLS-1$                          
                        }
                    }
                }
View Full Code Here

                WMSPlugin.trace("Context Image bounds: " + getContext().getImageBounds()); //$NON-NLS-1$
                WMSPlugin.trace("Request BBox  bounds: " + requestBBox); //$NON-NLS-1$
                WMSPlugin.trace("Backprojected request bounds: " + backprojectedBBox); //$NON-NLS-1$
            }

            Service wmsService = capabilities.getService();
            Dimension maxDimensions = new Dimension(wmsService.getMaxWidth(), wmsService
                    .getMaxHeight());
//            Dimension imageDimensions = calculateImageDimensions(getContext().getMapDisplay()
//                    .getDisplaySize(), maxDimensions, getViewportBBox(), backprojectedBBox);
            Dimension imageDimensions = calculateImageDimensions(getContext().getImageSize(), maxDimensions, bounds, backprojectedBBox);
            if (imageDimensions.height < 1 || imageDimensions.width < 1) {
View Full Code Here

            if (e == null) {
                throw new SAXException(
                    "Internal error, ElementValues require an associated Element.");
            }

            Service service = new Service();

            for (int i = 0; i < value.length; i++) {
                if (elements[0].getName().equals(value[i].getElement().getName())) {
                    service.setName((String) value[i].getValue());
                }

                if (elements[1].getName().equals(value[i].getElement().getName())) {
                    service.setTitle((String) value[i].getValue());
                }

                if (elements[2].getName().equals(value[i].getElement().getName())) {
                    service.set_abstract((String) value[i].getValue());
                }

                if (elements[3].getName().equals(value[i].getElement().getName())) {
                    service.setKeywordList(((String) value[i].getValue()).split(
                            " "));
                }

                if (elements[4].getName().equals(value[i].getElement().getName())) {
                    try {
                        service.setOnlineResource(((URI) value[i].getValue())
                            .toURL());
                    } catch (MalformedURLException e1) {
                        throw new SAXException(e1);
                    }
                }

                //                if (elements[5].getName().equals(value[i].getElement().getName())) {
                //                    service.setFees((String) value[i].getValue());
                //                }
                //                if (elements[6].getName().equals(value[i].getElement().getName())) {
                //                    service.setAccessConstraints((String) value[i].getValue());
                //                }
            }

            // check the required elements
            if ((service.getName() == null) || (service.getTitle() == null)
                    || ((service.getOnlineResource()) == null)) {
                throw new SAXException(
                    "Required Service Elements are missing, check"
                    + " for the existence of Name, Title , or OnlineResource elements.");
            }
View Full Code Here

    public Object getValue(Element element, ElementValue[] value,
        Attributes attrs, Map hints) throws SAXException,
        OperationNotSupportedException {

      WMSCapabilities capabilities = null;
      Service service = null;

      for (int i = 0; i < value.length; i++) {
        if (sameName(elems[0], value[i])) {
          service = ((Service) value[i].getValue());
        }
View Full Code Here

    public Object getValue(Element element, ElementValue[] value,
        Attributes attrs, Map hints) throws SAXException,
        OperationNotSupportedException {

      WMSCapabilities capabilities = null;
      Service service = null;

      for (int i = 0; i < value.length; i++) {
        if (sameName(elems[0], value[i])) {
          service = ((Service) value[i].getValue());
        }
View Full Code Here

     */
    public Object getValue(Element element, ElementValue[] value,
        Attributes attrs, Map hints) throws SAXException,
        OperationNotSupportedException {

      Service service = new Service();

      for (int i = 0; i < value.length; i++) {

        if (sameName(elems[0], value[i])) {
          service.setName((String) value[i].getValue());
        }

        if (sameName(elems[1], value[i])) {
          service.setTitle((String) value[i].getValue());
        }

        if (sameName(elems[2], value[i])) {
          service.set_abstract((String) value[i].getValue());
        }

        if (sameName(elems[3], value[i])
            || sameName(elems[11], value[i])) {
          service.setKeywordList((String[]) value[i].getValue());
        }

        if (sameName(elems[4], value[i])) {
          service.setOnlineResource((URL) value[i].getValue());
        }

        if (sameName(elems[5], value[i])) {
          ResponsiblePartyImpl contactInfo = (ResponsiblePartyImpl) value[i].getValue();
          service.setContactInformation(contactInfo);
        }

        // if (sameName(elems[6], value[i])) {
        // //TODO fees not implemented, ignoring
        // }

        // if (sameName(elems[7], value[i])) {
        // //TODO access constraints not implemented, ignoring
        // }

        if (sameName(elems[8], value[i])) {
          service.setLayerLimit(((Integer) value[i].getValue())
              .intValue());
        }

        if (sameName(elems[9], value[i])) {
          service.setMaxWidth(((Integer) value[i].getValue())
              .intValue());
        }

        if (sameName(elems[10], value[i])) {
          service.setMaxHeight(((Integer) value[i].getValue())
              .intValue());
        }
      }

      return service;
View Full Code Here

TOP

Related Classes of org.geotools.data.ows.Service

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.