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