001 //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/branches/2.2_testing/src/org/deegree/ogcwebservices/wps/execute/IOValue.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.execute; 044 045 import java.net.URI; 046 import java.net.URL; 047 048 import org.deegree.datatypes.Code; 049 import org.deegree.datatypes.values.TypedLiteral; 050 import org.deegree.model.spatialschema.Envelope; 051 import org.deegree.ogcwebservices.wps.WPSDescription; 052 053 /** 054 * IOValue.java 055 * 056 * Created on 24.03.2006. 16:33:24h 057 * 058 * Value of one input to a process or one output from 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: apoth $ 063 * 064 * @version $Revision: 9345 $, $Date: 2007-12-27 17:22:25 +0100 (Do, 27 Dez 2007) $ 065 */ 066 public class IOValue extends WPSDescription { 067 068 /** 069 * Identifies this input or output value as a web accessible resource, and references that 070 * resource. For an input, this element may be used by a client for any process input coded as 071 * ComplexData in the ProcessDescription. For an output, this element shall be used by a server 072 * when "store" in the Execute request is "true". 073 */ 074 075 private ComplexValueReference complexValueReference; 076 077 /** 078 * Identifies this input or output value as a complex value data structure encoded in XML (e.g., 079 * using GML), and provides that complex value data structure. For an input, this element may be 080 * used by a client for any process input coded as ComplexData in the ProcessDescription. For an 081 * output, this element shall be used by a server when "store" in the Execute request is 082 * "false". 083 */ 084 private ComplexValue complexValue; 085 086 /** 087 * Identifies this input or output value as a literal value of a simple quantity (e.g., one 088 * number), and provides that value. 089 */ 090 private TypedLiteral literalValue; 091 092 /** 093 * Identifies this input or output value as an ows:BoundingBox data structure, and provides that 094 * ows:BoundingBox data structure. 095 */ 096 private Envelope boundingBoxValue; 097 098 /** 099 * 100 * @param identifier 101 * @param title 102 * @param _abstract 103 * @param boundingBoxValue 104 * @param complexValue 105 * @param complexValueReference 106 * @param literalValue 107 */ 108 public IOValue( Code identifier, String title, String _abstract, Envelope boundingBoxValue, 109 ComplexValue complexValue, ComplexValueReference complexValueReference, 110 TypedLiteral literalValue ) { 111 super( identifier, title, _abstract ); 112 this.boundingBoxValue = boundingBoxValue; 113 this.complexValue = complexValue; 114 this.complexValueReference = complexValueReference; 115 this.literalValue = literalValue; 116 } 117 118 /** 119 * 120 * @return complexValueReference 121 */ 122 public ComplexValueReference getComplexValueReference() { 123 return complexValueReference; 124 } 125 126 /** 127 * 128 * @param value 129 */ 130 public void setComplexValueReference( ComplexValueReference value ) { 131 this.complexValueReference = value; 132 } 133 134 /** 135 * 136 * @return complexValue 137 */ 138 public ComplexValue getComplexValue() { 139 return complexValue; 140 } 141 142 /** 143 * 144 * @param value 145 */ 146 public void setComplexValue( ComplexValue value ) { 147 this.complexValue = value; 148 } 149 150 /** 151 * 152 * @return literalValue 153 */ 154 public TypedLiteral getLiteralValue() { 155 return literalValue; 156 } 157 158 /** 159 * 160 * @param value 161 */ 162 public void setLiteralValue( TypedLiteral value ) { 163 this.literalValue = value; 164 } 165 166 /** 167 * 168 * @return boundingBoxValue 169 */ 170 public Envelope getBoundingBoxValue() { 171 return boundingBoxValue; 172 } 173 174 /** 175 * 176 * @return boundingBoxValueType 177 */ 178 public boolean isBoundingBoxValueType() { 179 boolean boundingBoxValueType = false; 180 if ( null != boundingBoxValue ) { 181 boundingBoxValueType = true; 182 } 183 return boundingBoxValueType; 184 } 185 186 /** 187 * 188 * @return complexValueReferenceType 189 */ 190 public boolean isComplexValueReferenceType() { 191 boolean complexValueReferenceType = false; 192 if ( null != complexValueReference ) { 193 complexValueReferenceType = true; 194 } 195 return complexValueReferenceType; 196 } 197 198 /** 199 * 200 * @return 201 */ 202 public boolean isComplexValueType() { 203 boolean complexValueType = false; 204 if ( null != complexValue ) { 205 complexValueType = true; 206 } 207 return complexValueType; 208 } 209 210 public boolean isLiteralValueType() { 211 boolean literalValueType = false; 212 if ( null != literalValue ) { 213 literalValueType = true; 214 } 215 return literalValueType; 216 } 217 218 /** 219 * 220 * @param value 221 */ 222 public void setBoundingBoxValue( Envelope value ) { 223 this.boundingBoxValue = value; 224 } 225 226 public static class ComplexValueReference extends ComplexValueEncoding { 227 228 protected URL reference; 229 230 /** 231 * @param encoding 232 * @param format 233 * @param schema 234 */ 235 public ComplexValueReference( String format, URI encoding, URL schema, URL reference ) { 236 super( format, encoding, schema ); 237 this.reference = reference; 238 } 239 240 public URL getReference() { 241 return reference; 242 } 243 244 } 245 246 }