001    // $HeadURL: https://svn.wald.intevation.org/svn/deegree/base/branches/2.3_testing/src/org/deegree/ogcbase/ExceptionCode.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.ogcbase;
037    
038    /**
039     * @version $Revision: 18195 $
040     * @author <a href="mailto:poth@lat-lon.de">Andreas Poth</a>
041     * @author last edited by: $Author: mschneider $
042     *
043     * @version 1.0. $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
044     */
045    
046    public class ExceptionCode {
047    
048        /**
049         * The service is not initialized
050         */
051        public static final ExceptionCode INTERNAL_SERVER_ERROR = new ExceptionCode( "Internal server error" );
052    
053        /**
054         * The soap element with the mustUnderstand attribute is not understood by the soap handler
055         */
056        public static final ExceptionCode SOAP_MUST_UNDERSTAND = new ExceptionCode( "MustUnderstand" );
057    
058        /**
059         * The soap exception code which flags that the semantic of the request was not understood (i.e. an
060         * OGCWebserviceException)
061         */
062        public static final ExceptionCode SOAP_SERVER = new ExceptionCode( "Server" );
063    
064        /**
065         * The soap exception code which flags The Client class of errors indicate that the message was incorrectly formed
066         * or did not contain the appropriate information in order to succeed. For example, the message could lack the
067         * proper authentication or payment information.
068         */
069        public static final ExceptionCode SOAP_CLIENT = new ExceptionCode( "Client" );
070    
071        /**
072         *
073         */
074        public static final ExceptionCode INVALID_FORMAT = new ExceptionCode( "InvalidFormat" );
075    
076        /**
077         *
078         */
079        public static final ExceptionCode INVALID_UPDATESEQUENCE = new ExceptionCode( "InvalidUpdateSequence" );
080    
081        /**
082         *
083         */
084        public static final ExceptionCode CURRENT_UPDATE_SEQUENCE = new ExceptionCode( "CurrentUpdateSequence" );
085    
086        /**
087         *
088         */
089        public static final ExceptionCode MISSINGPARAMETERVALUE = new ExceptionCode( "MissingParameterValue" );
090    
091        /**
092         *
093         */
094        public static final ExceptionCode INVALIDPARAMETERVALUE = new ExceptionCode( "InvalidParameterValue" );
095    
096        /**
097         *
098         */
099        public static final ExceptionCode INVALIDDIMENSIONVALUE = new ExceptionCode( "InvalidDimensionValue" );
100    
101        /**
102         *
103         */
104        public static final ExceptionCode MISSINGDIMENSIONVALUE = new ExceptionCode( "MissingDimensionValue" );
105    
106        /**
107         *
108         */
109        public static final ExceptionCode OPERATIONNOTSUPPORTED = new ExceptionCode( "OperationNotSupported" );
110    
111        /**
112         *
113         */
114        public static final ExceptionCode VERSIONNEGOTIATIONFAILED = new ExceptionCode( "VersionNegotiationFailed" );
115    
116        /**
117         *
118         */
119        public static final ExceptionCode NOAPPLICABLECODE = new ExceptionCode( "NoApplicableCode" );
120    
121        /**
122         *
123         */
124        public static final ExceptionCode LAYER_NOT_DEFINED = new ExceptionCode( "LayerNotDefined" );
125    
126        /**
127         *
128         */
129        public static final ExceptionCode STYLE_NOT_DEFINED = new ExceptionCode( "StyleNotDefined" );
130    
131        /**
132         *
133         */
134        public static final ExceptionCode INVALID_SRS = new ExceptionCode( "InvalidSRS" );
135    
136        /**
137         *
138         */
139        public static final ExceptionCode INVALID_CRS = new ExceptionCode( "InvalidCRS" );
140    
141        /**
142         *
143         */
144        public static final ExceptionCode LAYER_NOT_QUERYABLE = new ExceptionCode( "LayerNotQueryable" );
145    
146        /**
147         *
148         */
149        public static final ExceptionCode INVALID_POINT = new ExceptionCode( "InvalidPoint" );
150    
151        /**
152         *
153         */
154        public String value = "InvalidFormat";
155    
156        /**
157         * default value = TC211, (InvalidFormat)
158         */
159        public ExceptionCode() {
160            // nothing
161        }
162    
163        /**
164         * @param value
165         */
166        public ExceptionCode( String value ) {
167            this.value = value;
168        }
169    
170        /**
171         * Compares the specified object with this class for equality.
172         */
173        @Override
174        public boolean equals( Object object ) {
175            if ( object != null && getClass().equals( object.getClass() ) ) {
176                return ( (ExceptionCode) object ).value.equals( value );
177            }
178            return false;
179        }
180    }