001 //$HeadURL: svn+ssh://jwilden@svn.wald.intevation.org/deegree/base/branches/2.5_testing/src/org/deegree/ogcwebservices/getcapabilities/Service.java $ 002 /*---------------------------------------------------------------------------- 003 This file is part of deegree, http://deegree.org/ 004 Copyright (C) 2001-2009 by: 005 Department of Geography, University of Bonn 006 and 007 lat/lon GmbH 008 009 This library is free software; you can redistribute it and/or modify it under 010 the terms of the GNU Lesser General Public License as published by the Free 011 Software Foundation; either version 2.1 of the License, or (at your option) 012 any later version. 013 This library is distributed in the hope that it will be useful, but WITHOUT 014 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 015 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 016 details. 017 You should have received a copy of the GNU Lesser General Public License 018 along with this library; if not, write to the Free Software Foundation, Inc., 019 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 020 021 Contact information: 022 023 lat/lon GmbH 024 Aennchenstr. 19, 53177 Bonn 025 Germany 026 http://lat-lon.de/ 027 028 Department of Geography, University of Bonn 029 Prof. Dr. Klaus Greve 030 Postfach 1147, 53001 Bonn 031 Germany 032 http://www.geographie.uni-bonn.de/deegree/ 033 034 e-mail: info@deegree.org 035 ----------------------------------------------------------------------------*/ 036 package org.deegree.ogcwebservices.getcapabilities; 037 038 import org.deegree.datatypes.CodeList; 039 import org.deegree.model.metadata.iso19115.CitedResponsibleParty; 040 import org.deegree.model.metadata.iso19115.Keywords; 041 import org.deegree.ogcbase.Description; 042 import org.deegree.ogcbase.OGCException; 043 import org.deegree.ogcwebservices.MetadataLink; 044 import org.deegree.ogcwebservices.OGCWebServiceException; 045 046 /** 047 * @version $Revision: 18195 $ 048 * @author <a href="mailto:poth@lat-lon.de">Andreas Poth</a> 049 * @author last edited by: $Author: mschneider $ 050 * 051 * @version 1.0. $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18 Jun 2009) $ 052 * 053 * @since 2.0 054 */ 055 056 public class Service extends Description { 057 058 private static final long serialVersionUID = -7968109788130292737L; 059 060 private Keywords[] keywords = new Keywords[0]; 061 062 private CitedResponsibleParty citedResponsibleParty = null; 063 064 private CodeList fees = null; 065 066 private CodeList[] accessConstraints = new CodeList[0]; 067 068 private String version = null; 069 070 private String updateSequence = null; 071 072 /** 073 * @param name 074 * @param label 075 * @param fees 076 * @param accessConstraints 077 * @throws OGCException 078 * @throws OGCWebServiceException 079 */ 080 public Service( String name, String label, CodeList fees, CodeList[] accessConstraints ) throws OGCException, 081 OGCWebServiceException { 082 super( name, label ); 083 setFees( fees ); 084 this.accessConstraints = accessConstraints; 085 } 086 087 /** 088 * @param name 089 * @param label 090 * @param description 091 * @param citedResponsibleParty 092 * @param fees 093 * @param accessConstraints 094 * @throws OGCException 095 * @throws OGCWebServiceException 096 */ 097 public Service( String name, String label, String description, CitedResponsibleParty citedResponsibleParty, 098 CodeList fees, CodeList[] accessConstraints ) throws OGCException, OGCWebServiceException { 099 super( name, label, description, null ); 100 this.citedResponsibleParty = citedResponsibleParty; 101 setFees( fees ); 102 setAccessConstraints( accessConstraints ); 103 } 104 105 /** 106 * @param description 107 * @param name 108 * @param metadataLink 109 * @param label 110 * @param keywords 111 * @param citedResponsibleParty 112 * @param fees 113 * @param accessConstraints 114 * @param version 115 * @param updateSequence 116 * @throws OGCException 117 * @throws OGCWebServiceException 118 */ 119 public Service( String description, String name, MetadataLink metadataLink, String label, Keywords[] keywords, 120 CitedResponsibleParty citedResponsibleParty, CodeList fees, CodeList[] accessConstraints, 121 String version, String updateSequence ) throws OGCException, OGCWebServiceException { 122 super( name, label, description, metadataLink ); 123 setKeywords( keywords ); 124 this.citedResponsibleParty = citedResponsibleParty; 125 setFees( fees ); 126 setAccessConstraints( accessConstraints ); 127 this.version = version; 128 this.updateSequence = updateSequence; 129 } 130 131 /** 132 * @return Returns the accessConstraints. 133 * 134 */ 135 public CodeList[] getAccessConstraints() { 136 return accessConstraints; 137 } 138 139 /** 140 * @param accessConstraints 141 * The accessConstraints to set. 142 * 143 */ 144 public void setAccessConstraints( CodeList[] accessConstraints ) { 145 if ( accessConstraints == null ) { 146 accessConstraints = new CodeList[0]; 147 } 148 this.accessConstraints = accessConstraints; 149 } 150 151 /** 152 * @return Returns the citedResponsibleParty. 153 * 154 */ 155 public CitedResponsibleParty getCitedResponsibleParty() { 156 return citedResponsibleParty; 157 } 158 159 /** 160 * @param citedResponsibleParty 161 * The citedResponsibleParty to set. 162 * 163 */ 164 public void setCitedResponsibleParty( CitedResponsibleParty citedResponsibleParty ) { 165 this.citedResponsibleParty = citedResponsibleParty; 166 } 167 168 /** 169 * @return Returns the fees. 170 * 171 */ 172 public CodeList getFees() { 173 return fees; 174 } 175 176 /** 177 * @param fees 178 * The fees to set. 179 * @throws OGCWebServiceException 180 * 181 */ 182 public void setFees( CodeList fees ) 183 throws OGCWebServiceException { 184 if ( fees == null ) { 185 throw new OGCWebServiceException( "fees must be <> null for Service" ); 186 } 187 this.fees = fees; 188 } 189 190 /** 191 * @return Returns the keywords. 192 * 193 */ 194 public Keywords[] getKeywords() { 195 return keywords; 196 } 197 198 /** 199 * @param keywords 200 * The keywords to set. 201 * 202 */ 203 public void setKeywords( Keywords[] keywords ) { 204 if ( keywords == null ) { 205 keywords = new Keywords[0]; 206 } 207 this.keywords = keywords; 208 } 209 210 /** 211 * @return Returns the updateSequence. 212 * 213 */ 214 public String getUpdateSequence() { 215 return updateSequence; 216 } 217 218 /** 219 * @param updateSequence 220 * The updateSequence to set. 221 * 222 */ 223 public void setUpdateSequence( String updateSequence ) { 224 this.updateSequence = updateSequence; 225 } 226 227 /** 228 * @return Returns the version. 229 * 230 */ 231 public String getVersion() { 232 return version; 233 } 234 235 /** 236 * @param version 237 * The version to set. 238 * 239 */ 240 public void setVersion( String version ) { 241 this.version = version; 242 } 243 244 }