Examples of ProcessBriefType


Examples of net.opengis.wps10.ProcessBriefType

        ExecuteResponseType response = f.createExecuteResponseType();
        response.setLang("en");
        response.setServiceInstance(ResponseUtils.appendQueryString(ResponseUtils.buildURL(request.getBaseUrl(), "ows", null, URLType.SERVICE), ""));
      
        //process
        final ProcessBriefType process = f.createProcessBriefType();
        response.setProcess( process );
        process.setIdentifier(ct);
        process.setProcessVersion(pf.getVersion(processName));
        process.setTitle( Ows11Util.languageString( pf.getTitle(processName).toString() ) );
        process.setAbstract( Ows11Util.languageString( pf.getDescription(processName).toString() ) );
      
        //status
        response.setStatus( f.createStatusType() );
        response.getStatus().setCreationTime( Converters.convert( started, XMLGregorianCalendar.class ));
       
View Full Code Here

Examples of net.opengis.wps10.ProcessBriefType

        ProcessOfferingsType po = wpsf.createProcessOfferingsType();
        caps.setProcessOfferings( po );
       
        for(ProcessFactory pf : Processors.getProcessFactories()) {
            for (Name name : pf.getNames()) {
                ProcessBriefType p = wpsf.createProcessBriefType();
                p.setProcessVersion(pf.getVersion(name));
                po.getProcess().add( p );
               
                p.setIdentifier(Ows11Util.code(name));
                p.setTitle(Ows11Util.languageString( pf.getTitle(name).toString()));
                p.setAbstract(Ows11Util.languageString( pf.getDescription(name).toString()));
            }
           
        }

        LanguagesType1 languages = wpsf.createLanguagesType1();
View Full Code Here

Examples of net.opengis.wps10.ProcessBriefType

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetProcess(ProcessBriefType newProcess, NotificationChain msgs) {
        ProcessBriefType oldProcess = process;
        process = newProcess;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Wps10Package.EXECUTE_RESPONSE_TYPE__PROCESS, oldProcess, newProcess);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

Examples of net.opengis.wps10.ProcessBriefType

     */
    void assertProcessOfferings( ProcessOfferingsType po ) {
        assertNotNull( po );
        assertEquals( 1, po.getProcess().size() );
       
        ProcessBriefType pb = (ProcessBriefType) po.getProcess().get( 0 );
        assertNotNull( pb.getIdentifier() );
        assertEquals( "buffer", ((CodeType) pb.getIdentifier()).getValue() );
       
        assertNotNull( pb.getTitle() );
        assertEquals( "Buffer a polygon feature", pb.getTitle().getValue() );
   
        assertNotNull( pb.getAbstract() );
        assertEquals( "Buffer  the polygon coordinates found in one GML stream by a given buffer distance, and output the results in GML.", pb.getAbstract().getValue() );
   
        assertEquals( 2, pb.getMetadata().size() );
        assertEquals( "buffer", ((MetadataType)pb.getMetadata().get(0)).getTitle() );
        assertEquals( "polygon", ((MetadataType)pb.getMetadata().get(1)).getTitle() );
    }
View Full Code Here

Examples of net.opengis.wps10.ProcessBriefType

        // does the server contain the specific process I want
        boolean found = false;
        Iterator iterator = processes.iterator();
        while (iterator.hasNext())
        {
            ProcessBriefType process = (ProcessBriefType) iterator.next();
            if (process.getIdentifier().getValue().equalsIgnoreCase(processIden))
            {
                found = true;

                break;
            }
        }

        // exit test if my process doesn't exist on server
        if (!found)
        {
            return;
        }

        // do a full describeprocess on my process
        DescribeProcessRequest descRequest = wps.createDescribeProcessRequest();
        descRequest.setIdentifier(processIden);

        ExecuteProcessRequest execRequest = wps.createExecuteProcessRequest();
        execRequest.setIdentifier(processIden);

        execRequest.addInput("buffer", Arrays.asList(wps.createLiteralInputValue("350")));
        execRequest.addInput("geom1", Arrays.asList(wps.createBoundingBoxInputValue(
                    "EPSG:4326", 2, Arrays.asList(-180.0, -90.0), Arrays.asList(-180.0, -90.0))));


        ResponseDocumentType respDoc = wps.createResponseDocumentType(false, true, true, "result");

        OutputDefinitionType rawOutput = wps.createOutputDefinitionType("test");

        ResponseFormType responseForm = wps.createResponseForm(respDoc, rawOutput);

        responseForm.setResponseDocument(respDoc);
        execRequest.setResponseForm(responseForm);

        execRequest.performPostOutput(System.out);

        DescribeProcessResponse descResponse = wps.issueRequest(descRequest);

        // based on the describeprocess, setup the execute
        ProcessDescriptionsType processDesc = descResponse.getProcessDesc();
        ProcessDescriptionType pdt = (ProcessDescriptionType) processDesc.getProcessDescription().get(0);
        WPSFactory wpsfactory = new WPSFactory(pdt, this.url);
        Process process = wpsfactory.create();

        // setup the inputs
        Map<String, Object> map = new TreeMap<String, Object>();
        map.put("buffer", 350);
        map.put("geom1", geom1);

        // execute/send-request for the process
        Map<String, Object> results = process.execute(map, null);

        // check that the result is expected
        assertNotNull(results);

        Geometry expected = geom1.buffer(350);
View Full Code Here

Examples of net.opengis.wps10.ProcessBriefType

        // does the server contain the specific process I want
        boolean found = false;
        Iterator iterator = processes.iterator();
        while (iterator.hasNext())
        {
            ProcessBriefType process = (ProcessBriefType) iterator.next();
            if (process.getIdentifier().getValue().equalsIgnoreCase(processIdenLocal))
            {
                found = true;

                break;
            }
        }

        // exit test if my process doesn't exist on server
        if (!found)
        {
            return;
        }

        // do a full describeprocess on my process
        DescribeProcessRequest descRequest = wps.createDescribeProcessRequest();
        descRequest.setIdentifier(processIdenLocal);

        DescribeProcessResponse descResponse = wps.issueRequest(descRequest);

        // based on the describeprocess, setup the execute
        ProcessDescriptionsType processDesc = descResponse.getProcessDesc();
        ProcessDescriptionType pdt = (ProcessDescriptionType) processDesc.getProcessDescription().get(0);
        WPSFactory wpsfactory = new WPSFactory(pdt, this.url);
        Process process = wpsfactory.create();

        // setup the inputs
        Map<String, Object> map = new TreeMap<String, Object>();
        WKTReader reader = new WKTReader(new GeometryFactory());
        List<Geometry> list = new ArrayList<Geometry>();
        Geometry geom1 = (Polygon) reader.read("POLYGON((20 10, 30 0, 40 10, 30 20, 20 10))");
        Geometry geom2 = (Polygon) reader.read("POLYGON((20 30, 30 0, 20 20, 80 20, 20 30))");
        Geometry geom3 = (Polygon) reader.read("POLYGON((177 10, 30 88, 40 70, 46 20, 177 10))");
        Geometry geom4 = (Polygon) reader.read("POLYGON((5 10, 5 0, 13 10, 5 20, 5 10))");
        list.add(geom1);
        list.add(geom2);
        list.add(geom3);
        list.add(geom4);
        map.put("geom", list);

        // execute/send-request for the process
        Map<String, Object> results = process.execute(map, null);

        // check that the result is expected
        assertNotNull(results);

        // Geometry expected = geom1.union(geom2);
View Full Code Here

Examples of net.opengis.wps10.ProcessBriefType

        // does the server contain the specific process I want
        boolean found = false;
        Iterator iterator = processes.iterator();
        while (iterator.hasNext())
        {
            ProcessBriefType process = (ProcessBriefType) iterator.next();
            if (process.getIdentifier().getValue().equalsIgnoreCase(processIdenLocal))
            {
                found = true;

                break;
            }
        }

        // exit test if my process doesn't exist on server
        if (!found)
        {
            return;
        }

        // do a full describeprocess on my process
        DescribeProcessRequest descRequest = wps.createDescribeProcessRequest();
        descRequest.setIdentifier(processIdenLocal);

        DescribeProcessResponse descResponse = wps.issueRequest(descRequest);

        // based on the describeprocess, setup the execute
        ProcessDescriptionsType processDesc = descResponse.getProcessDesc();
        ProcessDescriptionType pdt = (ProcessDescriptionType) processDesc.getProcessDescription().get(0);
        WPSFactory wpsfactory = new WPSFactory(pdt, this.url);
        Process process = wpsfactory.create();

        // setup the inputs as empty (which should return an exception)
        Map<String, Object> map = new TreeMap<String, Object>();

        // execute/send-request for the process
        Map<String, Object> results = process.execute(map, null);

        // check that the result is expected (null)
        assertNull(results);

    }
View Full Code Here

Examples of net.opengis.wps10.ProcessBriefType

        // does the server contain the specific process I want
        boolean found = false;
        Iterator iterator = processes.iterator();
        while (iterator.hasNext())
        {
            ProcessBriefType process = (ProcessBriefType) iterator.next();
            if (process.getIdentifier().getValue().equalsIgnoreCase(processIdenLocal))
            {
                found = true;

                break;
            }
        }

        // exit test if my process doesn't exist on server
        if (!found)
        {
            return;
        }

        // do a full describeprocess on my process
        DescribeProcessRequest descRequest = wps.createDescribeProcessRequest();
        descRequest.setIdentifier(processIdenLocal);

        DescribeProcessResponse descResponse = wps.issueRequest(descRequest);

        // based on the describeprocess, setup the execute
        ProcessDescriptionsType processDesc = descResponse.getProcessDesc();
        ProcessDescriptionType pdt = (ProcessDescriptionType) processDesc.getProcessDescription().get(0);
        WPSFactory wpsfactory = new WPSFactory(pdt, this.url);
        Process process = wpsfactory.create();

        // setup the inputs
        Map<String, Object> map = new TreeMap<String, Object>();
        Double d1 = 77.84;
        Double d2 = 40039.229;
        map.put("input_a", d1);
        map.put("input_b", d2);

        // execute/send-request for the process
        Map<String, Object> results = process.execute(map, null);

        // check that the result is expected
        assertNotNull(results);

        Double result = (Double) results.get("result");
View Full Code Here

Examples of net.opengis.wps10.ProcessBriefType

        assertNotNull("process offerings shouldn't be null", processOfferings);

        EList processes = processOfferings.getProcess();
        for (int i = 0; i < processes.size(); i++)
        {
            ProcessBriefType process = (ProcessBriefType) processes.get(i);
            // System.out.println(process.getTitle());
            assertNotNull("process [" + process + " shouldn't be null",
                process.getTitle());
        }

    }
View Full Code Here

Examples of net.opengis.wps10.ProcessBriefType

        WPSCapabilitiesType capabilities = wps.getCapabilities();

        // get the first process and describe it
        ProcessOfferingsType processOfferings = capabilities.getProcessOfferings();
        EList processes = processOfferings.getProcess();
        ProcessBriefType process = (ProcessBriefType) processes.get(0);

        DescribeProcessRequest request = wps.createDescribeProcessRequest();
        request.setIdentifier(process.getIdentifier().getValue());

        // System.out.println(request.getFinalURL());
        DescribeProcessResponse response = wps.issueRequest(request);
        // System.out.println(response);
        assertNotNull(response);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.