001    //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/ogcwebservices/wass/was/operation/WASGetCapabilities.java $
002    /*----------------    FILE HEADER  ------------------------------------------
003    
004     This file is part of deegree.
005     Copyright (C) 2001-2004 by:
006     EXSE, Department of Geography, University of Bonn
007     http://www.giub.uni-bonn.de/exse/
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     Meckenheimer Allee 176
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    package org.deegree.ogcwebservices.wass.was.operation;
044    
045    import java.util.Map;
046    
047    import org.deegree.framework.log.ILogger;
048    import org.deegree.framework.log.LoggerFactory;
049    import org.deegree.framework.xml.XMLParsingException;
050    import org.deegree.ogcwebservices.OGCWebServiceException;
051    import org.deegree.ogcwebservices.OGCWebServiceRequest;
052    import org.deegree.ogcwebservices.getcapabilities.GetCapabilities;
053    import org.w3c.dom.Element;
054    
055    /**
056     * This is the bean class for the WAS GetCapabilities operation.
057     * 
058     * @author <a href="mailto:schmitz@lat-lon.de">Andreas Schmitz</a>
059     * @author last edited by: $Author: bezema $
060     * 
061     * @version 2.0, $Revision: 6259 $, $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mär 2007) $
062     * 
063     * @since 2.0
064     */
065    
066    public class WASGetCapabilities extends GetCapabilities {
067    
068            private static final long serialVersionUID = -5377481260861904187L;
069    
070            private static final String SERVICE = "WAS";
071        
072        private static final ILogger LOG = LoggerFactory.getLogger(WASGetCapabilities.class);
073    
074        /**
075         * @param id
076         *            the request id
077         * @param version
078         * @param updateSequence
079         * @param acceptVersions
080         * @param sections
081         * @param acceptFormats
082         * @param vendoreSpec
083         */
084        public WASGetCapabilities( String id, String version, String updateSequence,
085                                     String[] acceptVersions, String[] sections, String[] acceptFormats,
086                                     Map<String,String> vendoreSpec) {
087            super( id, version, updateSequence, acceptVersions, sections, acceptFormats, vendoreSpec );
088        }
089        
090        /**
091         * @param id the request id
092         * @param keyValues 
093         */
094        public WASGetCapabilities( String id, Map<String, String> keyValues ){
095            super( id, getParam( "VERSION", keyValues, null ), null, null, null, null, keyValues );
096        }
097    
098            /* (non-Javadoc)
099             * @see org.deegree.ogcwebservices.OGCWebServiceRequest#getServiceName()
100             */
101            public String getServiceName() {
102                    return SERVICE;
103            }
104    
105        /**
106         * @param id
107         * @param documentElement
108         * @return a new instance of this class
109         * @throws OGCWebServiceException
110         */
111        public static OGCWebServiceRequest create( String id, Element documentElement )
112                                throws OGCWebServiceException {
113            LOG.entering();
114            
115            WASGetCapabilities res = null;
116            try {
117                res = new WASGetCapabilitiesDocument().parseCapabilities( id, documentElement );
118            } catch ( XMLParsingException e ) {
119                LOG.logError( e.getMessage(), e );
120                throw new OGCWebServiceException( e.getMessage() );
121            }
122            
123            LOG.exiting();
124            return res;
125        }
126    
127        /**
128         * @param id
129         * @param kvp
130         * @return a new instance of this class
131         */
132        public static OGCWebServiceRequest create( String id, Map<String, String> kvp ) {
133            return new WASGetCapabilities(id, kvp);
134        }
135    
136    }
137    
138    /* ********************************************************************
139     Changes to this class. What the people have been up to:
140     $Log$
141     Revision 1.4  2006/10/27 13:26:33  poth
142     support for vendorspecific parameters added
143    
144     Revision 1.3  2006/06/23 10:23:50  schmitz
145     Completed the WAS, GetSession and CloseSession work.
146    
147     Revision 1.2  2006/06/12 13:32:29  bezema
148     kvp is implemented
149    
150     Revision 1.1  2006/05/29 12:00:58  bezema
151     Refactored the security and authentication webservices into one package WASS (Web Authentication -and- Security Services), also created a common package and a saml package which could be updated to work in the future.
152    
153     Revision 1.4  2006/05/23 15:20:50  bezema
154     Cleaned up the warnings and added some minor methods
155    
156     Revision 1.3  2006/05/22 12:17:31  schmitz
157     Restructured the GetCapabilities/Document classes.
158    
159     Revision 1.2  2006/05/22 11:29:35  bezema
160     Reviewing the getcapabilities classes
161    
162     Revision 1.1  2006/05/19 15:35:35  schmitz
163     Updated the documentation, added the GetCapabilities operation and implemented a rough WAService outline. Fixed some warnings.
164    
165    
166    
167     ********************************************************************** */