001 //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/branches/2.2_testing/src/org/deegree/ogcwebservices/getcapabilities/Service.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.getcapabilities; 045 046 import org.deegree.datatypes.CodeList; 047 import org.deegree.model.metadata.iso19115.CitedResponsibleParty; 048 import org.deegree.model.metadata.iso19115.Keywords; 049 import org.deegree.ogcbase.Description; 050 import org.deegree.ogcbase.OGCException; 051 import org.deegree.ogcwebservices.MetadataLink; 052 import org.deegree.ogcwebservices.OGCWebServiceException; 053 054 /** 055 * @version $Revision: 9345 $ 056 * @author <a href="mailto:poth@lat-lon.de">Andreas Poth</a> 057 * @author last edited by: $Author: apoth $ 058 * 059 * @version 1.0. $Revision: 9345 $, $Date: 2007-12-27 17:22:25 +0100 (Do, 27 Dez 2007) $ 060 * 061 * @since 2.0 062 */ 063 064 public class Service extends Description { 065 066 private Keywords[] keywords = new Keywords[0]; 067 068 private CitedResponsibleParty citedResponsibleParty = null; 069 070 private CodeList fees = null; 071 072 private CodeList[] accessConstraints = new CodeList[0]; 073 074 private String version = null; 075 076 private String updateSequence = null; 077 078 /** 079 * @param name 080 * @param label 081 * @param fees 082 * @param accessConstraints 083 */ 084 public Service( String name, String label, CodeList fees, CodeList[] accessConstraints ) throws OGCException, 085 OGCWebServiceException { 086 super( name, label ); 087 setFees( fees ); 088 this.accessConstraints = accessConstraints; 089 } 090 091 /** 092 * @param name 093 * @param label 094 * @param description 095 * @param citedResponsibleParty 096 * @param fees 097 * @param accessConstraints 098 * @throws OGCException 099 * @throws OGCWebServiceException 100 */ 101 public Service( String name, String label, String description, CitedResponsibleParty citedResponsibleParty, 102 CodeList fees, CodeList[] accessConstraints ) throws OGCException, OGCWebServiceException { 103 super( name, label, description, null ); 104 this.citedResponsibleParty = citedResponsibleParty; 105 setFees( fees ); 106 setAccessConstraints( accessConstraints ); 107 } 108 109 /** 110 * @param description 111 * @param name 112 * @param metadataLink 113 * @param label 114 * @param keywords 115 * @param citedResponsibleParty 116 * @param fees 117 * @param accessConstraints 118 * @param version 119 * @param updateSequence 120 */ 121 public Service( String description, String name, MetadataLink metadataLink, String label, Keywords[] keywords, 122 CitedResponsibleParty citedResponsibleParty, CodeList fees, CodeList[] accessConstraints, 123 String version, String updateSequence ) throws OGCException, OGCWebServiceException { 124 super( name, label, description, metadataLink ); 125 setKeywords( keywords ); 126 this.citedResponsibleParty = citedResponsibleParty; 127 setFees( fees ); 128 setAccessConstraints( accessConstraints ); 129 this.version = version; 130 this.updateSequence = updateSequence; 131 } 132 133 /** 134 * @return Returns the accessConstraints. 135 * 136 */ 137 public CodeList[] getAccessConstraints() { 138 return accessConstraints; 139 } 140 141 /** 142 * @param accessConstraints 143 * The accessConstraints to set. 144 * 145 */ 146 public void setAccessConstraints( CodeList[] accessConstraints ) { 147 if ( accessConstraints == null ) { 148 accessConstraints = new CodeList[0]; 149 } 150 this.accessConstraints = accessConstraints; 151 } 152 153 /** 154 * @return Returns the citedResponsibleParty. 155 * 156 */ 157 public CitedResponsibleParty getCitedResponsibleParty() { 158 return citedResponsibleParty; 159 } 160 161 /** 162 * @param citedResponsibleParty 163 * The citedResponsibleParty to set. 164 * 165 */ 166 public void setCitedResponsibleParty( CitedResponsibleParty citedResponsibleParty ) { 167 this.citedResponsibleParty = citedResponsibleParty; 168 } 169 170 /** 171 * @return Returns the fees. 172 * 173 */ 174 public CodeList getFees() { 175 return fees; 176 } 177 178 /** 179 * @param fees 180 * The fees to set. 181 * 182 */ 183 public void setFees( CodeList fees ) 184 throws OGCWebServiceException { 185 if ( fees == null ) { 186 throw new OGCWebServiceException( "fees must be <> null for Service" ); 187 } 188 this.fees = fees; 189 } 190 191 /** 192 * @return Returns the keywords. 193 * 194 */ 195 public Keywords[] getKeywords() { 196 return keywords; 197 } 198 199 /** 200 * @param keywords 201 * The keywords to set. 202 * 203 */ 204 public void setKeywords( Keywords[] keywords ) { 205 if ( keywords == null ) { 206 keywords = new Keywords[0]; 207 } 208 this.keywords = keywords; 209 } 210 211 /** 212 * @return Returns the updateSequence. 213 * 214 */ 215 public String getUpdateSequence() { 216 return updateSequence; 217 } 218 219 /** 220 * @param updateSequence 221 * The updateSequence to set. 222 * 223 */ 224 public void setUpdateSequence( String updateSequence ) { 225 this.updateSequence = updateSequence; 226 } 227 228 /** 229 * @return Returns the version. 230 * 231 */ 232 public String getVersion() { 233 return version; 234 } 235 236 /** 237 * @param version 238 * The version to set. 239 * 240 */ 241 public void setVersion( String version ) { 242 this.version = version; 243 } 244 245 }