001    // $HeadURL: svn+ssh://jwilden@svn.wald.intevation.org/deegree/base/branches/2.5_testing/src/org/deegree/ogcwebservices/getcapabilities/ServiceIdentification.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.Code;
039    import org.deegree.model.metadata.iso19115.Keywords;
040    
041    /**
042     * Represents the <code>ServiceIdentification</code> section of the capabilities of an OGC
043     * compliant web service according to the <code>OGC Common Implementation Specification 0.2</code>.
044     * This section corresponds to and expands the SV_ServiceIdentification class in ISO 19119.
045     * <p>
046     * It consists of the following elements: <table border="1">
047     * <tr>
048     * <th>Name</th>
049     * <th>Occurences</th>
050     * <th>Function</th>
051     * </tr>
052     * <tr>
053     * <td>ServiceType</td>
054     * <td align="center">1</td>
055     * <td>Useful to provide service type name useful for machine-to-machine communication</td>
056     * </tr>
057     * <tr>
058     * <td>ServiceTypeVersion</td>
059     * <td align="center">1-*</td>
060     * <td>Useful to provide list of server-supported versions.</td>
061     * </tr>
062     * <tr>
063     * <td>Title</td>
064     * <td align="center">1</td>
065     * <td>Useful to provide a server title for display to a human.</td>
066     * </tr>
067     * <tr>
068     * <td>Abstract</td>
069     * <td align="center">0|1</td>
070     * <td>Usually useful to provide narrative description of server, useful for display to a human.</td>
071     * </tr>
072     * <tr>
073     * <td>Keywords</td>
074     * <td align="center">0-*</td>
075     * <td>Often useful to provide keywords useful for server searching.</td>
076     * </tr>
077     * <tr>
078     * <td>Fees</td>
079     * <td align="center">0|1</td>
080     * <td>Usually useful to specify fees, or NONE if no fees.</td>
081     * </tr>
082     * <tr>
083     * <td>AccessConstraints</td>
084     * <td align="center">0-*</td>
085     * <td>Usually useful to specify access constraints, or NONE if no access constraints.</td>
086     * </tr>
087     * </table>
088     *
089     * @author <a href="mailto:mschneider@lat-lon.de">Markus Schneider </a>
090     * @author last edited by: $Author: mschneider $
091     *
092     * @version $Revision: 18195 $
093     */
094    public class ServiceIdentification {
095    
096        private String name;
097    
098        private Code serviceType;
099    
100        private String[] serviceTypeVersions;
101    
102        private String title;
103    
104        private String serviceAbstract;
105    
106        private Keywords[] keywords;
107    
108        private String fees;
109    
110        private String[] accessConstraints;
111    
112        /**
113         * Constructs a new ServiceIdentification object.
114         *
115         * @param name
116         *
117         * @param serviceType
118         * @param serviceTypeVersions
119         * @param title
120         * @param serviceAbstract
121         *            may be null
122         * @param keywords
123         *            may be an empty array or null
124         * @param fees
125         *            may be null
126         * @param accessConstraints
127         *            may be an empty array or null
128         */
129        public ServiceIdentification( String name, Code serviceType, String[] serviceTypeVersions, String title,
130                                      String serviceAbstract, Keywords[] keywords, String fees, String[] accessConstraints ) {
131            this.name = name;
132            this.serviceType = serviceType;
133            this.serviceTypeVersions = serviceTypeVersions;
134            this.title = title;
135            this.serviceAbstract = serviceAbstract;
136            this.keywords = keywords;
137            this.fees = fees;
138            this.accessConstraints = accessConstraints;
139        }
140    
141        /**
142         * Constructs a new ServiceIdentification object.
143         *
144         * @param serviceType
145         * @param serviceTypeVersions
146         * @param title
147         * @param serviceAbstract
148         *            may be null
149         * @param keywords
150         *            may be an empty array or null
151         * @param fees
152         *            may be null
153         * @param accessConstraints
154         *            may be an empty array or null
155         */
156        public ServiceIdentification( Code serviceType, String[] serviceTypeVersions, String title, String serviceAbstract,
157                                      Keywords[] keywords, String fees, String[] accessConstraints ) {
158            this.name = title;
159            this.serviceType = serviceType;
160            this.serviceTypeVersions = serviceTypeVersions;
161            this.title = title;
162            this.serviceAbstract = serviceAbstract;
163            this.keywords = keywords;
164            this.fees = fees;
165            this.accessConstraints = accessConstraints;
166        }
167    
168        /**
169         * Returns the java representation of the ServiceType-element. In the XML document, this element
170         * has the type ows:CodeType.
171         *
172         * @return the java representation of the ServiceType-element. In the XML document, this element
173         *         has the type ows:CodeType.
174         *
175         */
176        public Code getServiceType() {
177            return serviceType;
178        }
179    
180        /**
181         * Returns the java representation of the ServiceTypeVersion-elements. In the XML document,
182         * these elements have the type ows:VersionType.
183         *
184         * @return the java representation of the ServiceTypeVersion-elements. In the XML document,
185         *         these elements have the type ows:VersionType.
186         */
187        public String[] getServiceTypeVersions() {
188            return serviceTypeVersions;
189        }
190    
191        /**
192         * Returns the java representation of the Title-element. In the XML document, this element has
193         * the type string.
194         *
195         * @return the java representation of the Title-element. In the XML document, this element has
196         *         the type string.
197         */
198        public String getTitle() {
199            return title;
200        }
201    
202        /**
203         * Returns the java representation of the Abstract-element. In the XML document, this element
204         * has the type string.
205         *
206         * @return the java representation of the Abstract-element. In the XML document, this element
207         *         has the type string.
208         */
209        public String getAbstract() {
210            return serviceAbstract;
211        }
212    
213        /**
214         * Returns the java representation of the Keywords-elements. In the XML document, these elements
215         * have the type ows:Keyword.
216         *
217         * @return the java representation of the Keywords-elements. In the XML document, these elements
218         *         have the type ows:Keyword.
219         */
220        public Keywords[] getKeywords() {
221            return keywords;
222        }
223    
224        /**
225         * Returns the java representation of the AccessConstraints-elements. In the XML document, these
226         * elements have the type string.
227         *
228         * @return the java representation of the AccessConstraints-elements. In the XML document, these
229         *         elements have the type string.
230         */
231        public String getFees() {
232            return fees;
233        }
234    
235        /**
236         * Returns the java representation of the AccessConstraints-elements. In the XML document, these
237         * elements have the type string.
238         *
239         * @return the java representation of the AccessConstraints-elements. In the XML document, these
240         *         elements have the type string.
241         */
242        public String[] getAccessConstraints() {
243            return accessConstraints;
244        }
245    
246        /**
247         * @return Returns the name.
248         */
249        public String getName() {
250            return name;
251        }
252    
253    }