Statistics
| Revision:

root / trunk / libraries / libjni-ecwcompress / src / es / gva / cit / jecwcompress / NCSError.java @ 1431

History | View | Annotate | Download (13 KB)

1 1431 igbrotru
/**********************************************************************
2
 * $Id$
3
 *
4
 * Name:     NCSError.java
5
 * Project:
6
 * Purpose:
7
 * Author:   Nacho Brodin, brodin_ign@gva.es
8
 *
9
 **********************************************************************/
10
/*Copyright (C) 2004  Nacho Brodin <brodin_ign@gva.es>
11

12
 This program is free software; you can redistribute it and/or
13
 modify it under the terms of the GNU General Public License
14
 as published by the Free Software Foundation; either version 2
15
 of the License, or (at your option) any later version.
16

17
 This program is distributed in the hope that it will be useful,
18
 but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
 GNU General Public License for more details.
21

22
 You should have received a copy of the GNU General Public License
23
 along with this program; if not, write to the Free Software
24
 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25
 */
26
27
28
/**
29
 * @author Nacho Brodin <brodin_ign@gva.es>.<BR> Equipo de desarrollo gvSIG.<BR> http://www.gvsig.gva.es
30
 * @version 0.0
31
 * @link http://www.gvsig.gva.es
32
 */
33
34
package es.gva.cit.jecwcompress;
35
36
public class NCSError{
37
38
        public static String ErrorToString(int error){
39
40
                switch(error){
41
                        case 0: return new String("NCS_SUCCESS");
42
                        case 1: return new String("NCS_QUEUE_NODE_CREATE_FAILED");                        /**< Queue node creation failed */
43
                        case 2: return new String("NCS_FILE_OPEN_FAILED");                                        /**< File open failed */
44
                        case 3: return new String("NCS_FILE_LIMIT_REACHED");                                        /**< The Image Web Server's licensed file limit has been reached */
45
                        case 4: return new String("NCS_FILE_SIZE_LIMIT_REACHED");                        /**< The requested file is larger than is permitted by the license on this Image Web Server */
46
                        case 5: return new String("NCS_FILE_NO_MEMORY");                                                /**< Not enough memory for new file */
47
                        case 6: return new String("NCS_CLIENT_LIMIT_REACHED");                                /**< The Image Web Server's licensed client limit has been reached */
48
                        case 7: return new String("NCS_DUPLICATE_OPEN");                                                /**< Detected duplicate open from net layer */
49
                        case 8: return new String("NCS_PACKET_REQUEST_NYI");                                        /**< Packet request type not yet implemented */
50
                        case 9: return new String("NCS_PACKET_TYPE_ILLEGAL");                                /**< Packet type is illegal */
51
                        case 10: return new String("NCS_DESTROY_CLIENT_DANGLING_REQUESTS");        /**< Client closed while requests outstanding */
52
                        case 11: return new String("NCS_UNKNOWN_CLIENT_UID");                                        /**< Client UID unknown */
53
                        case 12: return new String("NCS_COULDNT_CREATE_CLIENT");                                /**< Could not create new client */
54
                        case 13: return new String("NCS_NET_COULDNT_RESOLVE_HOST");                        /**< Could not resolve address of Image Web Server */
55
                        case 14: return new String("NCS_NET_COULDNT_CONNECT");                                /**< Could not connect to host */
56
                        case 15: return new String("NCS_NET_RECV_TIMEOUT");                                        /**< Receive timeout */
57
                        case 16: return new String("NCS_NET_HEADER_SEND_FAILURE");                        /**< Error sending header */
58
                        case 17: return new String("NCS_NET_HEADER_RECV_FAILURE");                        /**< Error receiving header */
59
                        case 18: return new String("NCS_NET_PACKET_SEND_FAILURE");                        /**< Error sending packet */
60
                        case 19: return new String("NCS_NET_PACKET_RECV_FAILURE");                        /**< Error receiving packet */
61
                        case 20: return new String("NCS_NET_401_UNAUTHORISED");                                /**< 401 Unauthorised: SDK doesn't do authentication so this suggests a misconfigured server */
62
                        case 21: return new String("NCS_NET_403_FORBIDDEN");                                        /**< 403 Forbidden: could be a 403.9 from IIS or PWS meaning that the maximum simultaneous request limit has been reached */
63
                        case 22: return new String("NCS_NET_404_NOT_FOUND");                                        /**< 404 Not Found: this error suggests that the server hasn't got Image Web Server installed */
64
                        case 23: return new String("NCS_NET_407_PROXYAUTH");                                        /**< 407 Proxy Authentication: the SDK doesn't do proxy authentication yet either, so this also suggests misconfiguration */
65
                        case 24: return new String("NCS_NET_UNEXPECTED_RESPONSE");                        /**< Unexpected HTTP response could not be handled */
66
                        case 25: return new String("NCS_NET_BAD_RESPONSE");                                        /**< HTTP response received outside specification */
67
                        case 26: return new String("NCS_NET_ALREADY_CONNECTED");                                /**< Already connected */
68
                        case 27: return new String("NCS_INVALID_CONNECTION");                                        /**< Connection is invalid */
69
                        case 28: return new String("NCS_WINSOCK_FAILURE");                                        /**< A Windows sockets failure occurred */
70
                        case 29: return new String("NCS_SYMBOL_ERROR");                        /**< Symbology error */
71
                        case 30: return new String("NCS_OPEN_DB_ERROR");                        /**< Could not open database */
72
                        case 31: return new String("NCS_DB_QUERY_FAILED");                /**< Could not execute the requested query on database */
73
                        case 32: return new String("NCS_DB_SQL_ERROR");                        /**< SQL statement could not be executed */
74
                        case 33: return new String("NCS_GET_LAYER_FAILED");                /**< Open symbol layer failed */
75
                        case 34: return new String("NCS_DB_NOT_OPEN");                        /**< The database is not open */
76
                        case 35: return new String("NCS_QT_TYPE_UNSUPPORTED");        /**< This type of quadtree is not supported */
77
                        case 36: return new String("NCS_PREF_INVALID_USER_KEY");                /**< Invalid local user key name specified */
78
                        case 37: return new String("NCS_PREF_INVALID_MACHINE_KEY");        /**< Invalid local machine key name specified */
79
                        case 38: return new String("NCS_REGKEY_OPENEX_FAILED");                /**< Failed to open registry key */
80
                        case 39: return new String("NCS_REGQUERY_VALUE_FAILED");                /**< Registry query failed */
81
                        case 40: return new String("NCS_INVALID_REG_TYPE");                        /**< Type mismatch in registry variable */
82
                        case 41: return new String("NCS_INVALID_ARGUMENTS");                /**< Invalid arguments passed to function */
83
                        case 42: return new String("NCS_ECW_ERROR");                                /**< ECW error */
84
                        case 43: return new String("NCS_SERVER_ERROR");                        /**< Server error */
85
                        case 44: return new String("NCS_UNKNOWN_ERROR");                        /**< Unknown error */
86
                        case 45: return new String("NCS_EXTENT_ERROR");                        /**< Extent conversion failed */
87
                        case 46: return new String("NCS_COULDNT_ALLOC_MEMORY");        /**< Could not allocate enough memory */
88
                        case 47: return new String("NCS_INVALID_PARAMETER");                /**< An invalid parameter was used */
89
                        case 48: return new String("NCS_FILEIO_ERROR");                                                /**< Error reading or writing file */
90
                        case 49: return new String("NCS_COULDNT_OPEN_COMPRESSION");                        /**< Compression task could not be initialised */
91
                        case 50: return new String("NCS_COULDNT_PERFORM_COMPRESSION");                /**< Compression task could not be processed */
92
                        case 51: return new String("NCS_GENERATED_TOO_MANY_OUTPUT_LINES");        /**< Trying to generate too many output lines */
93
                        case 52: return new String("NCS_USER_CANCELLED_COMPRESSION");                        /**< Compression task was cancelled by client application */
94
                        case 53: return new String("NCS_COULDNT_READ_INPUT_LINE");                        /**< Could not read line from input data */
95
                        case 54: return new String("NCS_INPUT_SIZE_EXCEEDED");                                /**< Input image size was exceeded for this version of the SDK */
96
                        case 55: return new String("NCS_REGION_OUTSIDE_FILE");        /**< Specified image region is outside image extents */
97
                        case 56: return new String("NCS_NO_SUPERSAMPLE");                        /**< Supersampling is not supported by the SDK functions */
98
                        case 57: return new String("NCS_ZERO_SIZE");                                /**< Specified image region has a zero width or height */
99
                        case 58: return new String("NCS_TOO_MANY_BANDS");                        /**< More bands specified than exist in the input file */
100
                        case 59: return new String("NCS_INVALID_BAND_NR");                /**< An invalid band number has been specified */
101
                        case 60: return new String("NCS_INPUT_SIZE_TOO_SMALL");        /**< Input image size is too small to compress - for ECW compression there is a minimum output file size */
102
                        case 61: return new String("NCS_INCOMPATIBLE_PROTOCOL_VERSION");        /**< The ECWP client version is incompatible with this server */
103
                        case 62: return new String("NCS_WININET_FAILURE");                                /**< Windows Internet Client error */
104
                        case 63: return new String("NCS_COULDNT_LOAD_WININET");                        /**< wininet.dll could not be loaded - usually indicates Internet Explorer should be upgraded */
105
                        case 64: return new String("NCS_FILE_INVALID_SETVIEW");                        /**< The parameters specified for setting a file view were invalid, or the view was not set */
106
                        case 65: return new String("NCS_FILE_NOT_OPEN");                                        /**< No file is open */
107
                        case 66: return new String("NCS_JNI_REFRESH_NOT_IMPLEMENTED");        /**< Class does not implement ECWProgressiveDisplay interface */
108
                        case 67: return new String("NCS_INCOMPATIBLE_COORDINATE_SYSTEMS");        /**< Incompatible coordinate systems */
109
                        case 68: return new String("NCS_INCOMPATIBLE_COORDINATE_DATUM");                /**< Incompatible coordinate datum types */
110
                        case 69: return new String("NCS_INCOMPATIBLE_COORDINATE_PROJECTION");        /**< Incompatible coordinate projection types */
111
                        case 70: return new String("NCS_INCOMPATIBLE_COORDINATE_UNITS");                /**< Incompatible coordinate units types */
112
                        case 71: return new String("NCS_COORDINATE_CANNOT_BE_TRANSFORMED");        /**< Non-linear coordinate systems not supported */
113
                        case 72: return new String("NCS_GDT_ERROR");                                                        /**< Error involving the GDT database */
114
                        case 73: return new String("NCS_NET_PACKET_RECV_ZERO_LENGTH");        /**< Zero length packet received */
115
                        case 74: return new String("NCS_UNSUPPORTEDLANGUAGE");                        /**< Must use Japanese version of the ECW SDK */
116
                        case 75: return new String("NCS_CONNECTION_LOST");                                /**< Connection to server was lost */
117
                        case 76: return new String("NCS_COORD_CONVERT_ERROR");                        /**< NCSGDT coordinate conversion failed */
118
                        case 77: return new String("NCS_METABASE_OPEN_FAILED");                        /**< Failed to open metabase */
119
                        case 78: return new String("NCS_METABASE_GET_FAILED");                        /**< Failed to get value from metabase */
120
                        case 79: return new String("NCS_NET_HEADER_SEND_TIMEOUT");                /**< Timeout sending header */
121
                        case 80: return new String("NCS_JNI_ERROR");                                                /**< Java JNI error */
122
                        case 81: return new String("NCS_DB_INVALID_NAME");                                /**< No data source passed */
123
                        case 82: return new String("NCS_SYMBOL_COULDNT_RESOLVE_HOST");        /**< Could not resolve address of Image Web Server Symbol Server Extension */
124
                        case 83: return new String("NCS_INVALID_ERROR_ENUM");                        /**< The value of an NCSError error number was invalid! */
125
                        case 84: return new String("NCS_FILE_EOF");                                                /**< End of file reached */
126
                        case 85: return new String("NCS_FILE_NOT_FOUND");                                /**< File not found */
127
                        case 86: return new String("NCS_FILE_INVALID");                                        /**< File was invalid or corrupt */
128
                        case 87: return new String("NCS_FILE_SEEK_ERROR");                                /**< Attempted to read, write or seek past file limits */
129
                        case 88: return new String("NCS_FILE_NO_PERMISSIONS");                        /**< Permissions not available to access file */
130
                        case 89: return new String("NCS_FILE_OPEN_ERROR");                                /**< Error opengin file */
131
                        case 90: return new String("NCS_FILE_CLOSE_ERROR");                                /**< Error closing file */
132
                        case 91: return new String("NCS_FILE_IO_ERROR");                                        /**< Miscellaneous error involving file input or output */
133
                        case 92: return new String("NCS_SET_EXTENTS_ERROR");                                /**< Illegal or invalid world coordinates supplied */
134
                        case 93: return new String("NCS_FILE_PROJECTION_MISMATCH");                /**< Image projection does not match that of the controlling layer */
135
                        case 94: return new String("NCS_GDT_UNKNOWN_PROJECTION");                /**< Unknown map projection */
136
                        case 95: return new String("NCS_GDT_UNKNOWN_DATUM");                                /**< Unknown geodetic datum */
137
                        case 96: return new String("NCS_GDT_USER_SERVER_FAILED");                /**< User specified Geographic Projection Database data server failed */
138
                        case 97: return new String("NCS_GDT_REMOTE_PATH_DISABLED");                /**< Remote Geographic Projection Database file downloading has been disabled and no local GDT data is available */
139
                        case 98: return new String("NCS_GDT_BAD_TRANSFORM_MODE");                /**< Invalid mode of transform */
140
                        case 99: return new String("NCS_GDT_TRANSFORM_OUT_OF_BOUNDS");        /**< Coordinate to be transformed is out of bounds */
141
                        case 100: return new String("NCS_LAYER_DUPLICATE_LAYER_NAME");        /**< A layer already exists with the specified name */
142
                        case 101: return new String("NCS_LAYER_INVALID_PARAMETER");                /**< The specified layer does not contain the specified parameter */
143
                        case 102: return new String("NCS_PIPE_CREATE_FAILED");                        /**< Failed to create pipe */
144
                        case 103: return new String("NCS_FILE_MKDIR_EXISTS");                                /**< Directory to be created already exists */ /*[20]*/
145
                        case 104: return new String("NCS_FILE_MKDIR_PATH_NOT_FOUND");                /**< The path specified for directory creation does not exist */ /*[20]*/
146
                        case 105: return new String("NCS_ECW_READ_CANCELLED");                        /**< File read was cancelled */
147
                        case 106: return new String("NCS_JP2_GEODATA_READ_ERROR");                /**< Error reading geodata from a JPEG 2000 file */ /*[21]*/
148
                        case 107: return new String("NCS_JP2_GEODATA_WRITE_ERROR");            /**< Error writing geodata to a JPEG 2000 file */        /*[21]*/
149
                        case 108: return new String("NCS_JP2_GEODATA_NOT_GEOREFERENCED"); /**< JPEG 2000 file not georeferenced */                        /*[21]*/
150
                        case 109: return new String("NCS_MAX_ERROR_NUMBER");                                /**< The maximum error value in this enumerated typ*/
151
                }
152
                return new String("");
153
        }
154
}