Package org.geotools.process

Examples of org.geotools.process.ProcessFactory


    /**
     * Returns the innermost delegate, this method can be used to check what the original factory was
     * @return
     */
    public ProcessFactory getInnermostDelegate() {
        ProcessFactory pf = delegate;
        while(pf instanceof DelegatingProcessFactory) {
            pf = ((DelegatingProcessFactory) pf).delegate;
        }
       
        return pf;
View Full Code Here


            this.outputWeight = hasComplexOutputs() ? 0.33f : 0f;
            this.processWeight = 1 - inputWeight - outputWeight;
        }
       
        boolean hasComplexOutputs() {
            ProcessFactory pf = GeoServerProcessors.createProcessFactory(request.getProcessName());
            Map<String, Parameter<?>> resultInfo = pf.getResultInfo(request.getProcessName(), inputs);
            for (Parameter<?> param : resultInfo.values()) {
                List<ProcessParameterIO> ppios = ProcessParameterIO.findAll(param, applicationContext);
                for (ProcessParameterIO ppio : ppios) {
                    if(ppio instanceof ComplexPPIO) {
                        return true;
View Full Code Here

    <T> T doAction(Name oldName, Action<T> a, Object... args) {
        Map<Name,Name> map = getProcessMappings();
        if (map.containsKey(oldName)) {
            Name newName = map.get(oldName);
            ProcessFactory pf = GeoServerProcessors.createProcessFactory(newName);
            if (pf != null) {
                return a.perform(pf, oldName, newName, args);
            }
        }
        return null;
View Full Code Here

     * @return
     */
    public LazyInputMap getProcessInputs(WPSExecutionManager manager) {
        // get the input descriptors
        Name processName = Ows11Util.name(request.getIdentifier());
        ProcessFactory pf = GeoServerProcessors.createProcessFactory(processName);
        if(pf == null) {
            throw new WPSException("Unknown process " + processName);
        }
       
        final Map<String, Parameter<?>> parameters = pf.getParameterInfo(processName);
        Map<String, InputProvider> providers = new HashMap<String, InputProvider>();

        // see what output raw data we have that need the user chosen mime type to be
        // sent back to the process as an input
        Map<String, String> outputMimeParameters = AbstractRawData.getOutputMimeParameters(
View Full Code Here

        ExecuteType execute = (ExecuteType) super.read(request, kvp, rawKvp);
        Wps10Factory factory = Wps10Factory.eINSTANCE;
       
        // grab the process, we need it to parse the data inputs
        Name processName = Ows11Util.name(execute.getIdentifier());
        ProcessFactory pf = GeoServerProcessors.createProcessFactory(processName);
        if (pf == null) {
            throw new WPSException("No such process: " + processName);
        }

        // parse inputs
        List<InputType> inputs = parseDataInputs(pf.getParameterInfo(processName), (String) rawKvp.get("DataInputs"));
        DataInputsType1 input1 = factory.createDataInputsType1();
        input1.getInput().addAll(inputs);
        execute.setDataInputs(input1);
       
        if(rawKvp.containsKey("responseDocument")) {
            execute.setResponseForm(parseResponseDocument(pf.getResultInfo(processName, null), (String) rawKvp.get("responseDocument")));
        } else if(rawKvp.containsKey("rawDataOutput")) {
            execute.setResponseForm(parseRawDataOutput(pf.getResultInfo(processName, null), (String) rawKvp.get("rawDataOutput")));
        } else {
            ResponseFormType responseForm = factory.createResponseFormType();
            responseForm.setResponseDocument(factory.createResponseDocumentType());
            execute.setResponseForm(responseForm);
        }
View Full Code Here

     *
     * @param name Name of the Process you wish to work with
     * @return ProcessFactory capable of creating an instanceof the named process
     */
    public static ProcessFactory createProcessFactory(Name name) {
        ProcessFactory pf = Processors.createProcessFactory(name);
        pf = applyFilters(pf);
        //JD: also check the names, this could be a filtered process factory with only a subset
        // disabled
        if (pf != null && !pf.getNames().contains(name)) {
            pf = null;
        }
        return pf;
    }
View Full Code Here

     * Look up an implementation of the named process.
     * @param name Name of the Process to create
     * @return created process or null if not found
     */
    public static Process createProcess(Name name){
        ProcessFactory factory = createProcessFactory( name );
        if( factory == null ) return null;
       
        return factory.create(name);
    }
View Full Code Here

                    this.processDescriptionAll();

                    return;
                }

                ProcessFactory pf = GeoServerProcessors.createProcessFactory(identifier);

                if (null == pf) {
                    throw new WPSException("Invalid identifier", "InvalidParameterValue");
                }
View Full Code Here

TOP

Related Classes of org.geotools.process.ProcessFactory

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.