Package geomerative

Examples of geomerative.RClip$OperationType


  }

  private OperationType getOperation(String operationName,
      OperationsMetadataType operations) {
    for (Object o : operations.getOperation()) {
      OperationType op = (OperationType) o;
      if (operationName.equals(op.getName())) {
        return op;
      }
    }

    throw new IllegalArgumentException("Could not find operation "
View Full Code Here


     * @param operationsMetadata
     */
    private void OperationMetadata_GetCapabilities(Ows10Factory owsf, final String baseUrl,
            OperationsMetadataType operationsMetadata) {
        // - GetCapabilities
        OperationType getCapabilities = owsf.createOperationType();
        operationsMetadata.getOperation().add(getCapabilities);

        getCapabilities.setName("GetCapabilities");
        DCPType getCapabilitiesDCP = owsf.createDCPType();
        getCapabilities.getDCP().add(getCapabilitiesDCP);

        HTTPType getCapabilitiesHTTP = owsf.createHTTPType();
        getCapabilitiesDCP.setHTTP(getCapabilitiesHTTP);

        String getCapabilitiesHref = ResponseUtils.buildURL(baseUrl, "csw",
                new HashMap<String, String>(), URLType.SERVICE);

        RequestMethodType getCapabilitiesGet = owsf.createRequestMethodType();
        getCapabilitiesGet.setHref(getCapabilitiesHref);
        getCapabilitiesHTTP.getGet().add(getCapabilitiesGet);

        RequestMethodType getCapabilitiesPost = owsf.createRequestMethodType();
        getCapabilitiesPost.setHref(getCapabilitiesHref);
        getCapabilitiesHTTP.getPost().add(getCapabilitiesPost);

        // - Parameters
        for (DomainType param : operationParameters.get("GetCapabilities"))
        {
            // clone the object, as the caps decorators might want to modify it
            getCapabilities.getParameter().add(EcoreUtil.copy(param));
        }

        // - Constraints
        for (DomainType constraint : operationConstraints.get("GetCapabilities"))
        {
            // clone the object, as the caps decorators might want to modify it
            getCapabilities.getConstraint().add(EcoreUtil.copy(constraint));
        }
    }
View Full Code Here

       
        //OperationsMetadata
        OperationsMetadataType om = owsf.createOperationsMetadataType();
        caps.setOperationsMetadata( om );
       
        OperationType gco = owsf.createOperationType();
        gco.setName("GetCapabilities");
        gco.getDCP().add( Ows11Util.dcp( "wps", gco.getName(), request ) );
        om.getOperation().add( gco );
       
        OperationType dpo = owsf.createOperationType();
        dpo.setName( "DescribeProcess");
        dpo.getDCP().add( Ows11Util.dcp( "wps", dpo.getName(), request ) );
        om.getOperation().add( dpo );
       
        OperationType eo = owsf.createOperationType();
        eo.setName( "Execute" );
        eo.getDCP().add( Ows11Util.dcp( "wps", eo.getName(), request ) );
        om.getOperation().add( eo );
       
        ProcessOfferingsType po = wpsf.createProcessOfferingsType();
        caps.setProcessOfferings( po );
       
View Full Code Here

        assertTrue(caps.containsKey("OperationsMetadata"));

        OperationsMetadataType om = (OperationsMetadataType) caps.get("OperationsMetadata");
        assertEquals(3, om.getOperation().size());

        OperationType op = (OperationType) om.getOperation().get(0);
        assertEquals("GetCapabilities", op.getName());
       
        assertEquals(1, op.getParameter().size());
        DomainType d = (DomainType) op.getParameter().get(0);
        assertEquals("Format", d.getName());

        assertEquals(1, d.getAllowedValues().getValue().size());

        ValueType v =  (ValueType) d.getAllowedValues().getValue().get(0);
View Full Code Here

    public static URL getOperationURL(String operation, WPSCapabilitiesType cap, boolean getGet)
    {
        Iterator<OperationType> iterator = cap.getOperationsMetadata().getOperation().iterator();
        while (iterator.hasNext())
        {
            OperationType next = (OperationType) iterator.next();
            if (operation.compareToIgnoreCase(next.getName()) == 0)
            {
                Iterator<DCPType> iterator2 = next.getDCP().iterator();
                while (iterator2.hasNext())
                {
                    DCPType next2 = (DCPType) iterator2.next();
                    HTTPType http = next2.getHTTP();
                    if (getGet && !http.getGet().isEmpty())
View Full Code Here

    void assertOperationsMetadata( OperationsMetadataType om ) {
        assertNotNull( om );
       
        assertEquals( 3, om.getOperation().size() );
       
        OperationType op = (OperationType) om.getOperation().get( 0 );
        assertEquals( "GetCapabilities", op.getName() );
        assertEquals( 1, op.getDCP().size() );
       
        HTTPType http = ((DCPType)op.getDCP().get(0)).getHTTP();
        assertEquals( 1, http.getGet().size() );
        assertEquals( "http://wms1.agr.gc.ca/GeoPS/GeoPS?", ((RequestMethodType)http.getGet().get(0)).getHref() );
   
        op = (OperationType) om.getOperation().get( 1 );
        assertEquals( "DescribeProcess", op.getName() );
        assertEquals( 1, op.getDCP().size() );
       
        http = ((DCPType)op.getDCP().get(0)).getHTTP();
        assertEquals( 1, http.getGet().size() );
        assertEquals( "http://wms1.agr.gc.ca/GeoPS/GeoPS?", ((RequestMethodType)http.getGet().get(0)).getHref() );
        assertEquals( 1, http.getPost().size() );
        assertEquals( "http://wms1.agr.gc.ca/GeoPS/GeoPS", ((RequestMethodType)http.getPost().get(0)).getHref() );

        op = (OperationType) om.getOperation().get( 2 );
        assertEquals( "Execute", op.getName() );
        assertEquals( 1, op.getDCP().size() );
       
        http = ((DCPType)op.getDCP().get(0)).getHTTP();
        assertEquals( 1, http.getGet().size() );
        assertEquals( "http://wms1.agr.gc.ca/GeoPS/GeoPS?", ((RequestMethodType)http.getGet().get(0)).getHref() );
        assertEquals( 1, http.getPost().size() );
        assertEquals( "http://wms1.agr.gc.ca/GeoPS/GeoPS", ((RequestMethodType)http.getPost().get(0)).getHref() );
    }
View Full Code Here

        // OperationsMetadata
        OperationsMetadataType om = owsf.createOperationsMetadataType();
        caps.setOperationsMetadata(om);

        OperationType gco = owsf.createOperationType();
        gco.setName("GetCapabilities");
        gco.getDCP().add(Ows11Util.dcp("wps", request));
        om.getOperation().add(gco);

        OperationType dpo = owsf.createOperationType();
        dpo.setName("DescribeProcess");
        dpo.getDCP().add(Ows11Util.dcp("wps", request));
        om.getOperation().add(dpo);

        OperationType eo = owsf.createOperationType();
        eo.setName("Execute");
        eo.getDCP().add(Ows11Util.dcp("wps", request));
        om.getOperation().add(eo);

        ProcessOfferingsType po = wpsf.createProcessOfferingsType();
        caps.setProcessOfferings(po);
View Full Code Here

        // OperationsMetadata
        OperationsMetadataType om = owsf.createOperationsMetadataType();
        caps.setOperationsMetadata(om);

        OperationType gco = owsf.createOperationType();
        gco.setName("GetCapabilities");
        gco.getDCP().add(Ows11Util.dcp("wps", request));
        om.getOperation().add(gco);

        OperationType dpo = owsf.createOperationType();
        dpo.setName("DescribeProcess");
        dpo.getDCP().add(Ows11Util.dcp("wps", request));
        om.getOperation().add(dpo);

        OperationType eo = owsf.createOperationType();
        eo.setName("Execute");
        eo.getDCP().add(Ows11Util.dcp("wps", request));
        om.getOperation().add(eo);

        ProcessOfferingsType po = wpsf.createProcessOfferingsType();
        caps.setProcessOfferings(po);
View Full Code Here

TOP

Related Classes of geomerative.RClip$OperationType

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.