001: //$HeadURL: https://svn.wald.intevation.org/svn/deegree/base/trunk/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 08:22:25 -0800 (Thu, 27 Dec 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,
109: Envelope boundingBoxValue, ComplexValue complexValue,
110: ComplexValueReference complexValueReference,
111: TypedLiteral literalValue) {
112: super (identifier, title, _abstract);
113: this .boundingBoxValue = boundingBoxValue;
114: this .complexValue = complexValue;
115: this .complexValueReference = complexValueReference;
116: this .literalValue = literalValue;
117: }
118:
119: /**
120: *
121: * @return complexValueReference
122: */
123: public ComplexValueReference getComplexValueReference() {
124: return complexValueReference;
125: }
126:
127: /**
128: *
129: * @param value
130: */
131: public void setComplexValueReference(ComplexValueReference value) {
132: this .complexValueReference = value;
133: }
134:
135: /**
136: *
137: * @return complexValue
138: */
139: public ComplexValue getComplexValue() {
140: return complexValue;
141: }
142:
143: /**
144: *
145: * @param value
146: */
147: public void setComplexValue(ComplexValue value) {
148: this .complexValue = value;
149: }
150:
151: /**
152: *
153: * @return literalValue
154: */
155: public TypedLiteral getLiteralValue() {
156: return literalValue;
157: }
158:
159: /**
160: *
161: * @param value
162: */
163: public void setLiteralValue(TypedLiteral value) {
164: this .literalValue = value;
165: }
166:
167: /**
168: *
169: * @return boundingBoxValue
170: */
171: public Envelope getBoundingBoxValue() {
172: return boundingBoxValue;
173: }
174:
175: /**
176: *
177: * @return boundingBoxValueType
178: */
179: public boolean isBoundingBoxValueType() {
180: boolean boundingBoxValueType = false;
181: if (null != boundingBoxValue) {
182: boundingBoxValueType = true;
183: }
184: return boundingBoxValueType;
185: }
186:
187: /**
188: *
189: * @return complexValueReferenceType
190: */
191: public boolean isComplexValueReferenceType() {
192: boolean complexValueReferenceType = false;
193: if (null != complexValueReference) {
194: complexValueReferenceType = true;
195: }
196: return complexValueReferenceType;
197: }
198:
199: /**
200: *
201: * @return
202: */
203: public boolean isComplexValueType() {
204: boolean complexValueType = false;
205: if (null != complexValue) {
206: complexValueType = true;
207: }
208: return complexValueType;
209: }
210:
211: public boolean isLiteralValueType() {
212: boolean literalValueType = false;
213: if (null != literalValue) {
214: literalValueType = true;
215: }
216: return literalValueType;
217: }
218:
219: /**
220: *
221: * @param value
222: */
223: public void setBoundingBoxValue(Envelope value) {
224: this .boundingBoxValue = value;
225: }
226:
227: public static class ComplexValueReference extends
228: ComplexValueEncoding {
229:
230: protected URL reference;
231:
232: /**
233: * @param encoding
234: * @param format
235: * @param schema
236: */
237: public ComplexValueReference(String format, URI encoding,
238: URL schema, URL reference) {
239: super (format, encoding, schema);
240: this .reference = reference;
241: }
242:
243: public URL getReference() {
244: return reference;
245: }
246:
247: }
248:
249: }
|