svn-gvsig-desktop / branches / v2_0_0_prep / libraries / libRemoteServices / src / org / gvsig / remoteClient / wfs / schema / type / GMLException.java @ 28543
History | View | Annotate | Download (2.76 KB)
1 | 27504 | jpiera | package org.gvsig.remoteClient.wfs.schema.type; |
---|---|---|---|
2 | |||
3 | import java.util.Hashtable; |
||
4 | import java.util.Map; |
||
5 | |||
6 | /* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
|
||
7 | *
|
||
8 | * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
|
||
9 | *
|
||
10 | * This program is free software; you can redistribute it and/or
|
||
11 | * modify it under the terms of the GNU General Public License
|
||
12 | * as published by the Free Software Foundation; either version 2
|
||
13 | * of the License, or (at your option) any later version.
|
||
14 | *
|
||
15 | * This program is distributed in the hope that it will be useful,
|
||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
18 | * GNU General Public License for more details.
|
||
19 | *
|
||
20 | * You should have received a copy of the GNU General Public License
|
||
21 | * along with this program; if not, write to the Free Software
|
||
22 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
|
||
23 | *
|
||
24 | * For more information, contact:
|
||
25 | *
|
||
26 | * Generalitat Valenciana
|
||
27 | * Conselleria d'Infraestructures i Transport
|
||
28 | * Av. Blasco Ib??ez, 50
|
||
29 | * 46010 VALENCIA
|
||
30 | * SPAIN
|
||
31 | *
|
||
32 | * +34 963862235
|
||
33 | * gvsig@gva.es
|
||
34 | * www.gvsig.gva.es
|
||
35 | *
|
||
36 | * or
|
||
37 | *
|
||
38 | * IVER T.I. S.A
|
||
39 | * Salamanca 50
|
||
40 | * 46005 Valencia
|
||
41 | * Spain
|
||
42 | *
|
||
43 | * +34 963163400
|
||
44 | * dac@iver.es
|
||
45 | */
|
||
46 | /* CVS MESSAGES:
|
||
47 | *
|
||
48 | * $Id: GMLException.java 18271 2008-01-24 09:06:43Z jpiera $
|
||
49 | * $Log$
|
||
50 | * Revision 1.1 2007-01-15 13:11:00 csanchez
|
||
51 | * Sistema de Warnings y Excepciones adaptado a BasicException
|
||
52 | *
|
||
53 | * Revision 1.2 2006/12/22 11:25:44 csanchez
|
||
54 | * Nuevo parser GML 2.x para gml's sin esquema
|
||
55 | *
|
||
56 | * Revision 1.1 2006/08/10 12:00:49 jorpiell
|
||
57 | * Primer commit del driver de Gml
|
||
58 | *
|
||
59 | *
|
||
60 | */
|
||
61 | /**
|
||
62 | * GML Exception.
|
||
63 | * @author Jorge Piera Llodr? (piera_jor@gva.es)
|
||
64 | * @author Carlos S?nchez Peri??n (sanchez_carper@gva.es)
|
||
65 | *
|
||
66 | */
|
||
67 | public class GMLException extends Exception { |
||
68 | private static final long serialVersionUID = -5486463227342843579L; |
||
69 | private String filename=""; |
||
70 | protected String formatString; |
||
71 | protected String messageKey; |
||
72 | protected long code; |
||
73 | |||
74 | public GMLException() {
|
||
75 | |||
76 | } |
||
77 | |||
78 | public GMLException(String file) { |
||
79 | init(); |
||
80 | this.filename=file;
|
||
81 | } |
||
82 | public GMLException(Throwable exception) { |
||
83 | init(); |
||
84 | initCause(exception); |
||
85 | } |
||
86 | public GMLException(String file, Throwable exception) { |
||
87 | init(); |
||
88 | this.filename=file;
|
||
89 | initCause(exception); |
||
90 | } |
||
91 | |||
92 | public String getFilename() { |
||
93 | return filename;
|
||
94 | } |
||
95 | |||
96 | public void setFilename(String filename) { |
||
97 | this.filename = filename;
|
||
98 | } |
||
99 | |||
100 | protected Map values() { |
||
101 | //Key -> value... filename -> name of the file
|
||
102 | Hashtable params;
|
||
103 | params = new Hashtable(); |
||
104 | params.put("file",filename);
|
||
105 | |||
106 | return params;
|
||
107 | } |
||
108 | |||
109 | public void init() { |
||
110 | messageKey="Gml_Error";
|
||
111 | formatString="Error opening GML shape %(file)";
|
||
112 | code = serialVersionUID; |
||
113 | } |
||
114 | |||
115 | |||
116 | } |