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