001 //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/ogcwebservices/getcapabilities/CapabilitiesService.java $ 002 /*---------------- FILE HEADER ------------------------------------------ 003 004 This file is part of deegree. 005 Copyright (C) 2001-2006 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 java.net.URL; 047 import java.util.ArrayList; 048 049 import org.deegree.ogcbase.ContactInformation; 050 051 /** 052 * The interface provides acces to the <CapabilitiesService> element of the Capabilities XML 053 * providing general metadata for the service as a whole. It shall include a 054 * Name, Title, and Online Resource URL. Optionally, Abstract, Keyword List, 055 * Contact Information, Fees, and Access Constraints may be provided. The meaning 056 * of most of these elements is defined in [ISO 19115]. The CapabilitiesService Name shall 057 * be "ogc:WMS" in the case of a Web Map CapabilitiesService. 058 * <p>----------------------------------------------------------------------</p> 059 * @author <a href="mailto:k.lupp@web.de">Katharina Lupp</a> 060 * @author <a href="mailto:mschneider@lat-lon.de">Markus Schneider</a> 061 * @version $Revision: 6259 $ 062 */ 063 064 public class CapabilitiesService { 065 066 private ArrayList keywordList = null; 067 private ContactInformation contactInformation = null; 068 private String abstract_ = null; 069 private String accessConstraints = null; 070 private String fees = null; 071 private String name = null; 072 private String title = null; 073 private URL onlineResource = null; 074 075 076 /** 077 * constructor initializing the class with the OGCWebServiceCapabilities 078 */ 079 public CapabilitiesService( String name, String title, String abstract_, String[] keywords, 080 URL onlineResource, ContactInformation contactInformation, String fees, 081 String accessConstraints ) { 082 keywordList = new ArrayList(); 083 setName( name ); 084 setTitle( title ); 085 setAbstract( abstract_ ); 086 setKeywordList( keywords ); 087 setOnlineResource( onlineResource ); 088 setContactInformation( contactInformation ); 089 setFees( fees ); 090 setAccessConstraints( accessConstraints ); 091 } 092 093 /** 094 * returns the name of the service. Typically, the Name is a single word used 095 * for machine-to-machine communication. 096 * @return name of the service 097 * 098 */ 099 public String getName() { 100 return name; 101 } 102 103 /** 104 * sets the name of the service. Typically, the Name is a single word used 105 * for machine-to-machine communication. 106 * 107 */ 108 public void setName(String name) { 109 this.name = name; 110 } 111 112 /** 113 * Returns the title of the service. The Title is for the benefit of humans. 114 * The CapabilitiesService Title is at the discretion of the provider, and should be 115 * brief yet descriptive enough to identify this server in a menu with other 116 * servers. 117 * @see #getName() 118 * @return title of the service 119 * 120 */ 121 public String getTitle() { 122 return title; 123 } 124 125 /** 126 * Sets the title of the service. The Title is for the benefit of humans. 127 * The CapabilitiesService Title is at the discretion of the provider, and should be 128 * brief yet descriptive enough to identify this server in a menu with other 129 * servers. 130 * @see #getName() 131 * 132 */ 133 public void setTitle(String title) { 134 this.title = title; 135 } 136 137 138 /** 139 * The Abstract element allows a descriptive narrative providing more 140 * information about the enclosing object. 141 */ 142 public String getAbstract() { 143 return abstract_; 144 } 145 146 /** 147 * Sets the abstract element 148 */ 149 public void setAbstract( String abstract_ ) { 150 this.abstract_ = abstract_; 151 } 152 153 /** 154 * A list of keywords or keyword phrases should be included to help catalog 155 * searching. Currently, no controlled vocabulary has been defined. 156 * 157 */ 158 public String[] getKeywordList() { 159 return (String[]) keywordList.toArray(new String[keywordList.size()]); 160 } 161 162 163 /** 164 * adds the keywordList 165 */ 166 public void addKeyword( String keyword ) { 167 this.keywordList.add( keyword ); 168 } 169 170 /** 171 * sets the keywordList 172 */ 173 public void setKeywordList( String[] keywordList ) { 174 this.keywordList.clear(); 175 176 if ( keywordList != null ) { 177 for ( int i = 0; i < keywordList.length; i++ ) { 178 this.keywordList.add( keywordList[i] ); 179 } 180 } 181 } 182 183 /** 184 * The OnlineResource element within the CapabilitiesService element can be used, for 185 * example, to point to the web site of the service provider. There are other 186 * OnlineResource elements used for the URL prefix of each supported operation. 187 * 188 */ 189 public URL getOnlineResource() { 190 return onlineResource; 191 } 192 193 /** 194 * sets URL prefix for get HTTP request method. 195 * 196 */ 197 public void setOnlineResource(URL onlineResource) { 198 this.onlineResource = onlineResource; 199 } 200 201 /** 202 * Returns informations who to contact for questions about the service. This 203 * method returns <tt>null</tt> if no contact informations are available. 204 * 205 */ 206 public ContactInformation getContactInformation() { 207 return contactInformation; 208 } 209 210 /** 211 * Sets informations who to contact for questions about the service. This 212 * method returns <tt>null</tt> if no contact informations are available. 213 * 214 */ 215 public void setContactInformation(ContactInformation contactInformation) { 216 this.contactInformation = contactInformation; 217 } 218 219 /** 220 * Returns fees assigned to the service. If no fees defined "none" will be 221 * returned. 222 * 223 */ 224 public String getFees() { 225 return fees; 226 } 227 228 /** 229 * Sets fees assigned to the service. If no fees defined "none" will be 230 * returned. 231 * 232 */ 233 public void setFees(String fees) { 234 this.fees = fees; 235 } 236 237 /** 238 * Returns access constraints assigned to the service. If no access 239 * constraints are defined "none" will be returned. 240 * 241 */ 242 public String getAccessConstraints() { 243 return accessConstraints; 244 } 245 246 /** 247 * Sets access constraints assigned to the service. If no access 248 * constraints are defined "none" will be returned. 249 * 250 */ 251 public void setAccessConstraints(String accessConstraints) { 252 this.accessConstraints = accessConstraints; 253 } 254 255 256 }/* ******************************************************************** 257 Changes to this class. What the people have been up to: 258 $Log$ 259 Revision 1.10 2006/07/12 14:46:16 poth 260 comment footer added 261 262 ********************************************************************** */