001 //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/branches/2.2_testing/src/org/deegree/ogcwebservices/wcs/describecoverage/CoverageOffering.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/deegree/
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 Aennchenstr. 19
030 53115 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 ---------------------------------------------------------------------------*/
044 package org.deegree.ogcwebservices.wcs.describecoverage;
045
046 import java.io.Serializable;
047
048 import org.deegree.model.metadata.iso19115.Keywords;
049 import org.deegree.ogcbase.OGCException;
050 import org.deegree.ogcwebservices.LonLatEnvelope;
051 import org.deegree.ogcwebservices.MetadataLink;
052 import org.deegree.ogcwebservices.SupportedFormats;
053 import org.deegree.ogcwebservices.SupportedSRSs;
054 import org.deegree.ogcwebservices.wcs.CoverageOfferingBrief;
055 import org.deegree.ogcwebservices.wcs.SupportedInterpolations;
056 import org.deegree.ogcwebservices.wcs.WCSException;
057 import org.deegree.ogcwebservices.wcs.configuration.Extension;
058
059 /**
060 * @version $Revision: 9345 $
061 * @author <a href="mailto:poth@lat-lon.de">Andreas Poth</a>
062 * @author last edited by: $Author: apoth $
063 *
064 * @version 1.0. $Revision: 9345 $, $Date: 2007-12-27 17:22:25 +0100 (Do, 27 Dez 2007) $
065 *
066 * @since 2.0
067 */
068
069 public class CoverageOffering extends CoverageOfferingBrief implements Cloneable, Serializable {
070
071 private static final long serialVersionUID = -2280508956895529051L;
072
073 private DomainSet domainSet = null;
074
075 private RangeSet rangeSet = null;
076
077 private SupportedSRSs supportedCRSs = null;
078
079 private SupportedFormats supportedFormats = null;
080
081 private SupportedInterpolations supportedInterpolations = new SupportedInterpolations();
082
083 private Extension extension = null;
084
085 /**
086 * @param name
087 * @param label
088 * @param description
089 * @param metadataLink
090 * @param lonLatEnvelope
091 * @param keywords
092 * @param domainSet
093 * @param rangeSet
094 * @param supportedCRSs
095 * @param supportedFormats
096 * @param supportedInterpolations
097 * @throws OGCException
098 * @throws WCSException
099 */
100 public CoverageOffering( String name, String label, String description, MetadataLink metadataLink,
101 LonLatEnvelope lonLatEnvelope, Keywords[] keywords, DomainSet domainSet,
102 RangeSet rangeSet, SupportedSRSs supportedCRSs, SupportedFormats supportedFormats,
103 SupportedInterpolations supportedInterpolations, Extension extension )
104 throws OGCException, WCSException {
105 super( name, label, description, metadataLink, lonLatEnvelope, keywords );
106 setDomainSet( domainSet );
107 setRangeSet( rangeSet );
108 setSupportedCRSs( supportedCRSs );
109 setSupportedFormats( supportedFormats );
110 setSupportedInterpolations( supportedInterpolations );
111 setExtension( extension );
112 }
113
114 /**
115 * @return Returns the domainSet.
116 *
117 */
118 public DomainSet getDomainSet() {
119 return domainSet;
120 }
121
122 /**
123 * @param domainSet
124 * The domainSet to set.
125 */
126 public void setDomainSet( DomainSet domainSet )
127 throws WCSException {
128 if ( domainSet == null ) {
129 throw new WCSException( "domainSet must be <> null for CoverageOffering" );
130 }
131 this.domainSet = domainSet;
132 }
133
134 /**
135 * @return Returns the rangeSet.
136 */
137 public RangeSet getRangeSet() {
138 return rangeSet;
139 }
140
141 /**
142 * @param rangeSet
143 * The rangeSet to set.
144 */
145 public void setRangeSet( RangeSet rangeSet )
146 throws WCSException {
147 if ( rangeSet == null ) {
148 throw new WCSException( "rangeSet must be <> null for CoverageOffering" );
149 }
150 this.rangeSet = rangeSet;
151 }
152
153 /**
154 * @return Returns the supportedCRSs.
155 */
156 public SupportedSRSs getSupportedCRSs() {
157 return supportedCRSs;
158 }
159
160 /**
161 * @param supportedCRSs
162 * The supportedCRSs to set.
163 */
164 public void setSupportedCRSs( SupportedSRSs supportedCRSs )
165 throws WCSException {
166 if ( supportedCRSs == null ) {
167 throw new WCSException( "supportedCRSs must be <> null for CoverageOffering" );
168 }
169 this.supportedCRSs = supportedCRSs;
170 }
171
172 /**
173 * @return Returns the supportedFormats.
174 */
175 public SupportedFormats getSupportedFormats() {
176 return supportedFormats;
177 }
178
179 /**
180 * @param supportedFormats
181 * The supportedFormats to set.
182 */
183 public void setSupportedFormats( SupportedFormats supportedFormats )
184 throws WCSException {
185 if ( supportedFormats == null ) {
186 throw new WCSException( "supportedFormatss must be <> null for CoverageOffering" );
187 }
188 this.supportedFormats = supportedFormats;
189 }
190
191 /**
192 * @return Returns the supportedInterpolations.
193 */
194 public SupportedInterpolations getSupportedInterpolations() {
195 return supportedInterpolations;
196 }
197
198 /**
199 * If <tt>null</tt> will be passed supportedInterpolations will be set to its default.
200 *
201 * @param supportedInterpolations
202 * The supportedInterpolations to set.
203 */
204 public void setSupportedInterpolations( SupportedInterpolations supportedInterpolations ) {
205 if ( supportedCRSs != null ) {
206 this.supportedInterpolations = supportedInterpolations;
207 }
208 }
209
210 /**
211 * @return Returns the extension.
212 */
213 public Extension getExtension() {
214 return extension;
215 }
216
217 /**
218 * @param extension
219 * The extension to set.
220 */
221 public void setExtension( Extension extension ) {
222 this.extension = extension;
223 }
224
225 /**
226 * @see java.lang.Object#clone()
227 */
228 public Object clone() {
229 try {
230 DomainSet domainSet_ = (DomainSet) domainSet.clone();
231 RangeSet rangeSet_ = null;
232 if ( rangeSet != null ) {
233 rangeSet_ = (RangeSet) rangeSet.clone();
234 }
235
236 LonLatEnvelope llenv = (LonLatEnvelope) getLonLatEnvelope().clone();
237
238 return new CoverageOffering( getName(), getLabel(), getDescription(), getMetadataLink(), llenv,
239 getKeywords(), domainSet_, rangeSet_, supportedCRSs, supportedFormats,
240 supportedInterpolations, extension );
241 } catch ( Exception e ) {
242 e.printStackTrace();
243 }
244 return null;
245 }
246
247 }