Package net.opengis.wps10

Examples of net.opengis.wps10.ProcessDescriptionType


        ProcessFactory pf = Processors.createProcessFactory(name);
        if ( pf == null ) {
            throw new WPSException( "No such process: " + id.getValue() );
        }
       
        ProcessDescriptionType pd = wpsf.createProcessDescriptionType();
        pds.getProcessDescription().add( pd );
       
        pd.setProcessVersion( "1.0.0" );
        pd.setIdentifier( Ows11Util.code( id.getValue() ) );
        pd.setTitle( Ows11Util.languageString(pf.getTitle(name)) );
        pd.setAbstract( Ows11Util.languageString(pf.getDescription(name)) );
       
        //data inputs
        DataInputsType inputs = wpsf.createDataInputsType();
        pd.setDataInputs(inputs);
        dataInputs( inputs, pf, name );
       
        //process outputs
        ProcessOutputsType outputs = wpsf.createProcessOutputsType();
        pd.setProcessOutputs( outputs );
        processOutputs( outputs, pf, name );
     }
View Full Code Here


      ProgressListener monitor) {

    // Get the describeprocess object so we can use it to build up a request and
    // get the server url to send the request to.
    WPSFactory wpsfactory = (WPSFactory) this.factory;
    ProcessDescriptionType pdt = wpsfactory.getProcessDescriptionType();
    URL url = wpsfactory.getServerURL();
    WebProcessingService wps;
    try {
      wps = new WebProcessingService(url);
    } catch (ServiceException e) {
      return null;
    } catch (IOException e) {
      return null;
    }
   
    // create the execute request object
    ExecuteProcessRequest exeRequest = wps.createExecuteProcessRequest();
    exeRequest.setIdentifier(wpsfactory.getIdentifier());
   
    // loop through each expected input in the describeprocess, and set it
    // based on what we have in the provided input map.
    EList inputs = pdt.getDataInputs().getInput();
    Iterator iterator = inputs.iterator();
    while (iterator.hasNext()) {
      InputDescriptionType idt = (InputDescriptionType) iterator.next();
      String identifier = idt.getIdentifier().getValue();
      Object inputValue = input.get(identifier);
View Full Code Here

        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>();
View Full Code Here

        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>();
View Full Code Here

        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>();
View Full Code Here

        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>();
View Full Code Here

        DescribeProcessRequest descRequest = wps.createDescribeProcessRequest();
        descRequest.setIdentifier(requestedProcess);

        DescribeProcessResponse descResponse = wps.issueRequest(descRequest);
        ProcessDescriptionsType processDesc = descResponse.getProcessDesc();
        ProcessDescriptionType pdt = (ProcessDescriptionType) processDesc.getProcessDescription().get(0);
        WPSFactory wpsfactory = new WPSFactory(pdt, this.url);
    }
View Full Code Here

        DescribeProcessRequest descRequest = wps.createDescribeProcessRequest();
        descRequest.setIdentifier(requestedProcess);

        DescribeProcessResponse descResponse = wps.issueRequest(descRequest);
        ProcessDescriptionsType processDesc = descResponse.getProcessDesc();
        ProcessDescriptionType pdt = (ProcessDescriptionType) processDesc.getProcessDescription().get(0);
        WPSFactory wpsfactory = new WPSFactory(pdt, this.url);
    }
View Full Code Here

    private void setLocalInputDataBufferPoly(ExecuteProcessRequest exeRequest,
        ProcessDescriptionsType processDesc, Geometry geom1) throws ParseException
    {

        // this process takes 2 input, a geometry and a buffer amount.
        ProcessDescriptionType pdt = (ProcessDescriptionType) processDesc.getProcessDescription().get(0);
        InputDescriptionType idt = (InputDescriptionType) pdt.getDataInputs().getInput().get(0);

        // create input buffer
        int bufferAmnt = 350;

        // create and set the input on the exe request
        if (idt.getIdentifier().getValue().equalsIgnoreCase("buffer"))
        {
            // set buffer input
            DataType input = WPSUtils.createInputDataType(bufferAmnt, idt);
            List<EObject> list = new ArrayList<EObject>();
            list.add(input);
            exeRequest.addInput(idt.getIdentifier().getValue(), list);
            // set geom input
            idt = (InputDescriptionType) pdt.getDataInputs().getInput().get(1);

            DataType input2 = WPSUtils.createInputDataType(geom1, idt);
            List<EObject> list2 = new ArrayList<EObject>();
            list2.add(input2);
            exeRequest.addInput(idt.getIdentifier().getValue(), list2);
        }
        else
        {
            // set geom input
            DataType input2 = WPSUtils.createInputDataType(geom1, idt);
            List<EObject> list2 = new ArrayList<EObject>();
            list2.add(input2);
            exeRequest.addInput(idt.getIdentifier().getValue(), list2);
            // set buffer input
            idt = (InputDescriptionType) pdt.getDataInputs().getInput().get(1);

            DataType input = WPSUtils.createInputDataType(bufferAmnt, idt);
            List<EObject> list = new ArrayList<EObject>();
            list.add(input);
            exeRequest.addInput(idt.getIdentifier().getValue(), list);
View Full Code Here

    private void set52NInputData(ExecuteProcessRequest exeRequest,
        ProcessDescriptionsType processDesc) throws ParseException
    {

        // this process takes 1 input, a building polygon to collapse.
        ProcessDescriptionType pdt = (ProcessDescriptionType) processDesc.getProcessDescription().get(0);
        InputDescriptionType idt = (InputDescriptionType) pdt.getDataInputs().getInput().get(0);

        // create a polygon for the input
        WKTReader reader = new WKTReader(new GeometryFactory());
        Geometry geom1 = (Polygon) reader.read("POLYGON((20 10, 30 0, 40 10, 30 20, 20 10))");
View Full Code Here

TOP

Related Classes of net.opengis.wps10.ProcessDescriptionType

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.