    001    //$HeadURL: https://svn.wald.intevation.org/svn/deegree/base/branches/2.4_testing/src/org/deegree/ogcwebservices/getcapabilities/OGCWebServiceCapabilities.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.framework.log.ILogger;
    039    import org.deegree.framework.log.LoggerFactory;
    040    import org.deegree.framework.xml.Marshallable;
    041    import org.w3c.dom.Document;
    042
    043    /**
    044     * The purpose of the GetCapabilities operation is described in the Basic CapabilitiesService
    045     * Elements section, above. In the particular case of a Web Map CapabilitiesService, the response of
    046     * a GetCapabilities request is general information about the service itself and specific
    047     * information about the available maps.
    048     *
    049     * @author <a href="mailto:k.lupp@web.de">Katharina Lupp </a>
    050     * @author <a href="mailto:tfr@users.sourceforge.net">Torsten Friebe </a>
    051     * @version 2002-03-01, $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
    052     * @since 1.0
    053     */
    054
    055    public abstract class OGCWebServiceCapabilities implements Marshallable {
    056
    057        protected static final ILogger LOG = LoggerFactory.getLogger( OGCWebServiceCapabilities.class );
    058
    059        private CapabilitiesService service = null;
    060
    061        private String updateSequence = null;
    062
    063        private String version = null;
    064
    065        /**
    066         * constructor initializing the class with the OGCWebServiceCapabilities
    067         *
    068         * @param version
    069         * @param updateSequence
    070         * @param service
    071         */
    072        public OGCWebServiceCapabilities( String version, String updateSequence, CapabilitiesService service ) {
    073            setVersion( version );
    074            setUpdateSequence( updateSequence );
    075            setService( service );
    076        }
    077
    078        /**
    079         * returns the version of the service
    080         *
    081         * @return the version of the service
    082         */
    083        public String getVersion() {
    084            return version;
    085        }
    086
    087        /**
    088         * sets the version of the service
    089         *
    090         * @param version
    091         */
    092        public void setVersion( String version ) {
    093            this.version = version;
    094        }
    095
    096        /**
    097         * The UPDATESEQUENCE parameter is for maintaining cache consistency. Its value can be an
    098         * integer, a timestamp in [ISO 8601:1988(E)] format , or any other number or string. The server
    099         * may include an UpdateSequence value in its Capabilities XML. If present, this value should be
    100         * increased when changes are made to the Capabilities (e.g., when new maps are added to the
    101         * service). The server is the sole judge of lexical ordering sequence. The client may include
    102         * this parameter in its GetCapabilities request.
    103         *
    104         * @return the update sequence value
    105         */
    106        public String getUpdateSequence() {
    107            return updateSequence;
    108        }
    109
    110        /**
    111         * sets the update sequence
    112         *
    113         * @param updateSequence
    114         */
    115        public void setUpdateSequence( String updateSequence ) {
    116            this.updateSequence = updateSequence;
    117        }
    118
    119        /**
    120         * this returns a general describtion of the service described by the Capabilities XML document.
    121         *
    122         * @return a general describtion of the service described by the Capabilities XML document.
    123         */
    124        public CapabilitiesService getService() {
    125            return service;
    126        }
    127
    128        /**
    129         * this sets a general describtion of the service described by the Capabilities XML document.
    130         *
    131         * @param service
    132         */
    133        public void setService( CapabilitiesService service ) {
    134            this.service = service;
    135        }
    136
    137        /**
    138         * Must be overridden by subclass. Replaces abstract method exportAsXML.
    139         *
    140         * @return null!
    141         *
    142         */
    143        public Document export() {
    144            return null;
    145        }
    146    }