001    //$HeadURL: https://svn.wald.intevation.org/svn/deegree/base/branches/2.3_testing/src/org/deegree/ogcwebservices/wps/describeprocess/ProcessDescription.java $
002    /*----------------------------------------------------------------------------
003     This file is part of deegree, http://deegree.org/
004     Copyright (C) 2001-2009 by:
005       Department of Geography, University of Bonn
006     and
007       lat/lon GmbH
008    
009     This library is free software; you can redistribute it and/or modify it under
010     the terms of the GNU Lesser General Public License as published by the Free
011     Software Foundation; either version 2.1 of the License, or (at your option)
012     any later version.
013     This library is distributed in the hope that it will be useful, but WITHOUT
014     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
015     FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
016     details.
017     You should have received a copy of the GNU Lesser General Public License
018     along with this library; if not, write to the Free Software Foundation, Inc.,
019     59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020    
021     Contact information:
022    
023     lat/lon GmbH
024     Aennchenstr. 19, 53177 Bonn
025     Germany
026     http://lat-lon.de/
027    
028     Department of Geography, University of Bonn
029     Prof. Dr. Klaus Greve
030     Postfach 1147, 53001 Bonn
031     Germany
032     http://www.geographie.uni-bonn.de/deegree/
033    
034     e-mail: info@deegree.org
035    ----------------------------------------------------------------------------*/
036    package org.deegree.ogcwebservices.wps.describeprocess;
037    
038    import java.util.ArrayList;
039    import java.util.List;
040    
041    import org.deegree.datatypes.Code;
042    import org.deegree.ogcwebservices.MetadataType;
043    import org.deegree.ogcwebservices.wps.ProcessBrief;
044    
045    /**
046     *
047     * ProcessDescription.java
048     *
049     * Created on 09.03.2006. 22:39:07h
050     *
051     * Full description of a process.
052     *
053     * @author <a href="mailto:christian@kiehle.org">Christian Kiehle</a>
054     * @author <a href="mailto:christian.heier@gmx.de">Christian Heier</a>
055     * @author last edited by: $Author:wanhoff$
056     *
057     * @version $Revision: 18195 $, $Date:20.03.2007$
058     */
059    public class ProcessDescription extends ProcessBrief {
060    
061        /**
062         *
063         * @param resonsibleClass
064         * @param identifier
065         * @param title
066         * @param _abstract
067         * @param processVersion
068         * @param metadata
069         * @param inputs
070         * @param outputs
071         * @param statusSupported
072         * @param storeSupported
073         */
074        public ProcessDescription( String resonsibleClass, Code identifier, String title, String _abstract,
075                                   String processVersion, List<MetadataType> metadata, DataInputs inputs,
076                                   ProcessOutputs outputs, Boolean statusSupported, Boolean storeSupported ) {
077            super( identifier, title, _abstract, processVersion, metadata );
078            this.responsibleClass = resonsibleClass;
079            this.dataInputs = inputs;
080            this.processOutputs = outputs;
081            this.statusSupported = statusSupported;
082            this.storeSupported = storeSupported;
083        }
084    
085        /**
086         *
087         */
088        protected String responsibleClass;
089    
090        /**
091         * List of the inputs to this process. In almost all cases, at least one process input is required. However, no
092         * process inputs may be identified when all the inputs are predetermined fixed resources. In this case, those
093         * resources shall be identified in the ows:Abstract element that describes the process
094         */
095        protected DataInputs dataInputs;
096    
097        /**
098         * List of outputs which will or can result from executing the process.
099         */
100        protected ProcessOutputs processOutputs;
101    
102        /**
103         * Indicates if the Execute operation response can be returned quickly with status information, or will not be
104         * returned until process execution is complete. If "statusSupported" is "true", the Execute operation request may
105         * include "status" equals "true", directing that the Execute operation response be returned quickly with status
106         * information. By default, status information is not provided for this process, and the Execute operation response
107         * is not returned until process execution is complete.
108         */
109        protected Boolean statusSupported;
110    
111        /**
112         * Indicates if the ComplexData outputs from this process can be stored by the WPS server as web-accessible
113         * resources. If "storeSupported" is "true", the Execute operation request may include "store" equals "true",
114         * directing that all ComplexData outputs of the process be stored so that the client can retrieve them as required.
115         * By default for this process, storage is not supported and all outputs are returned encoded in the Execute
116         * response.
117         */
118        protected Boolean storeSupported;
119    
120        /**
121         * @return Returns the dataInputs.
122         */
123        public DataInputs getDataInputs() {
124            return dataInputs;
125        }
126    
127        /**
128         * @param value
129         *            The dataInputs to set.
130         */
131        public void setDataInputs( DataInputs value ) {
132            this.dataInputs = value;
133        }
134    
135        /**
136         * @return Returns the processOutputs.
137         */
138        public ProcessOutputs getProcessOutputs() {
139            return processOutputs;
140        }
141    
142        /**
143         * @param value
144         *            The processOutputs to set.
145         */
146        public void setProcessOutputs( ProcessOutputs value ) {
147            this.processOutputs = value;
148        }
149    
150        /**
151         *
152         * @return true if status request is supported.
153         */
154        public boolean isStatusSupported() {
155            return statusSupported;
156        }
157    
158        /**
159         * @param value
160         *            The statusSupported to set.
161         */
162        public void setStatusSupported( Boolean value ) {
163            this.statusSupported = value;
164        }
165    
166        /**
167         *
168         * @return true if the process can store.
169         */
170        public boolean isStoreSupported() {
171            return storeSupported;
172        }
173    
174        /**
175         * @param value
176         *            The storeSupported to set.
177         */
178        public void setStoreSupported( Boolean value ) {
179            this.storeSupported = value;
180        }
181    
182        /**
183         * TODO add documentation here
184         *
185         * @author <a href="mailto:poth@lat-lon.de">Andreas Poth </a>
186         * @author last edited by: $Author:wanhoff$
187         *
188         * @version $Revision: 18195 $, $Date:20.03.2007$
189         */
190        public static class DataInputs {
191    
192            /**
193             *
194             *
195             * Unordered list of one or more descriptions of the inputs that can be accepted by this process, including all
196             * required and optional inputs. Where an input is optional because a default value exists, that default value
197             * must be identified in the "ows:Abstract" element for that input, except in the case of LiteralData, where the
198             * default must be indicated in the corresponding ows:DefaultValue element. Where an input is optional because
199             * it depends on the value(s) of other inputs, this must be indicated in the ows:Abstract element for that
200             * input.
201             *
202             *
203             */
204            private List<InputDescription> inputDescriptions;
205    
206            /**
207             * @return Returns the input.
208             */
209            public List<InputDescription> getInputDescriptions() {
210                if ( inputDescriptions == null ) {
211                    inputDescriptions = new ArrayList<InputDescription>();
212                }
213                return this.inputDescriptions;
214            }
215    
216            /**
217             * @param inputDescriptions
218             */
219            public void setInputDescriptions( List<InputDescription> inputDescriptions ) {
220                this.inputDescriptions = inputDescriptions;
221            }
222    
223        }
224    
225        /**
226         * TODO add documentation here
227         *
228         * @author <a href="mailto:poth@lat-lon.de">Andreas Poth </a>
229         * @author last edited by: $Author:wanhoff$
230         *
231         * @version $Revision: 18195 $, $Date:20.03.2007$
232         */
233        public static class ProcessOutputs {
234    
235            /**
236             * Unordered list of one or more descriptions of all the outputs that can result from executing this process. At
237             * least one output is required from each process.
238             */
239            protected List<OutputDescription> output;
240    
241            /**
242             * @return Returns the output.
243             */
244            public List<OutputDescription> getOutput() {
245                if ( output == null ) {
246                    output = new ArrayList<OutputDescription>();
247                }
248                return this.output;
249            }
250    
251        }
252    
253        /**
254         * @return Returns the responsibleClass.
255         */
256        public String getResponsibleClass() {
257            return responsibleClass;
258        }
259    
260    }