Revision 11220
trunk/libraries/libGPE/src-test/org/gvsig/gpe/GPEErrorHandlerTest.java | ||
---|---|---|
43 | 43 |
* |
44 | 44 |
* $Id$ |
45 | 45 |
* $Log$ |
46 |
* Revision 1.2 2007-04-13 13:14:55 jorpiell |
|
46 |
* Revision 1.3 2007-04-17 07:53:55 jorpiell |
|
47 |
* Before to start a new parsing process, the initialize method of the content handlers is throwed |
|
48 |
* |
|
49 |
* Revision 1.2 2007/04/13 13:14:55 jorpiell |
|
47 | 50 |
* Created the base tests and add some methods to the content handler |
48 | 51 |
* |
49 | 52 |
* Revision 1.1 2007/04/12 17:06:42 jorpiell |
... | ... | |
83 | 86 |
public void addError(Throwable e) { |
84 | 87 |
e.printStackTrace(); |
85 | 88 |
} |
89 |
|
|
90 |
/* |
|
91 |
* (non-Javadoc) |
|
92 |
* @see org.gvsig.gpe.GPEContentHandler#initialize() |
|
93 |
*/ |
|
94 |
public void initialize(){ |
|
95 |
|
|
96 |
} |
|
86 | 97 |
} |
trunk/libraries/libGPE/src-test/org/gvsig/gpe/GPEContentHandlerTest.java | ||
---|---|---|
54 | 54 |
* |
55 | 55 |
* $Id$ |
56 | 56 |
* $Log$ |
57 |
* Revision 1.3 2007-04-14 16:06:35 jorpiell |
|
57 |
* Revision 1.4 2007-04-17 07:53:55 jorpiell |
|
58 |
* Before to start a new parsing process, the initialize method of the content handlers is throwed |
|
59 |
* |
|
60 |
* Revision 1.3 2007/04/14 16:06:35 jorpiell |
|
58 | 61 |
* Add the container classes |
59 | 62 |
* |
60 | 63 |
* Revision 1.2 2007/04/13 13:14:55 jorpiell |
... | ... | |
276 | 279 |
return layers; |
277 | 280 |
} |
278 | 281 |
|
282 |
|
|
283 |
/* |
|
284 |
* (non-Javadoc) |
|
285 |
* @see org.gvsig.gpe.GPEContentHandler#initialize() |
|
286 |
*/ |
|
287 |
public void initialize(){ |
|
288 |
layers = new ArrayList(); |
|
289 |
currentFeature = null; |
|
290 |
} |
|
279 | 291 |
} |
280 | 292 |
|
trunk/libraries/libGPE/src/org/gvsig/gpe/GPERegister.java | ||
---|---|---|
50 | 50 |
* |
51 | 51 |
* $Id$ |
52 | 52 |
* $Log$ |
53 |
* Revision 1.6 2007-04-17 06:26:54 jorpiell |
|
53 |
* Revision 1.7 2007-04-17 07:53:55 jorpiell |
|
54 |
* Before to start a new parsing process, the initialize method of the content handlers is throwed |
|
55 |
* |
|
56 |
* Revision 1.6 2007/04/17 06:26:54 jorpiell |
|
54 | 57 |
* Fixed one problem with a index |
55 | 58 |
* |
56 | 59 |
* Revision 1.5 2007/04/14 16:06:13 jorpiell |
... | ... | |
145 | 148 |
* @return |
146 | 149 |
* Null if the driver doesn't exist |
147 | 150 |
*/ |
148 |
public static GPEParser getParser(File file){ |
|
151 |
public static GPEParser getParser(File file) throws Exception{
|
|
149 | 152 |
for (int i=0 ; i<parsers.size() ; i++){ |
150 | 153 |
GPEParser parser = (GPEParser)parsers.get(i); |
151 | 154 |
if (parser.accept(file)){ |
155 |
parser.getContentHandler().initialize(); |
|
156 |
parser.getErrorHandler().initialize(); |
|
152 | 157 |
return parser; |
153 | 158 |
} |
154 | 159 |
} |
... | ... | |
174 | 179 |
} |
175 | 180 |
return null; |
176 | 181 |
} |
177 |
|
|
182 |
|
|
178 | 183 |
} |
trunk/libraries/libGPE/src/org/gvsig/gpe/GPEErrorHandler.java | ||
---|---|---|
43 | 43 |
* |
44 | 44 |
* $Id$ |
45 | 45 |
* $Log$ |
46 |
* Revision 1.2 2007-04-12 17:06:42 jorpiell |
|
46 |
* Revision 1.3 2007-04-17 07:53:55 jorpiell |
|
47 |
* Before to start a new parsing process, the initialize method of the content handlers is throwed |
|
48 |
* |
|
49 |
* Revision 1.2 2007/04/12 17:06:42 jorpiell |
|
47 | 50 |
* First GML writing tests |
48 | 51 |
* |
49 | 52 |
* Revision 1.1 2007/04/11 08:46:21 csanchez |
... | ... | |
56 | 59 |
*/ |
57 | 60 |
public abstract class GPEErrorHandler implements IGPEErrorHandler { |
58 | 61 |
|
62 |
/** |
|
63 |
* It initializes the ContentHandler. It thas to |
|
64 |
* init the object attributes values before to |
|
65 |
* start a new parsing process. |
|
66 |
*/ |
|
67 |
abstract public void initialize(); |
|
68 |
|
|
59 | 69 |
public Object badLayer(String error, Object layer) { |
60 | 70 |
// TODO Ap?ndice de m?todo generado autom?ticamente |
61 | 71 |
return null; |
trunk/libraries/libGPE/src/org/gvsig/gpe/GPEContentHandler.java | ||
---|---|---|
43 | 43 |
* |
44 | 44 |
* $Id$ |
45 | 45 |
* $Log$ |
46 |
* Revision 1.5 2007-04-14 16:06:13 jorpiell |
|
46 |
* Revision 1.6 2007-04-17 07:53:55 jorpiell |
|
47 |
* Before to start a new parsing process, the initialize method of the content handlers is throwed |
|
48 |
* |
|
49 |
* Revision 1.5 2007/04/14 16:06:13 jorpiell |
|
47 | 50 |
* The writer handler has been updated |
48 | 51 |
* |
49 | 52 |
* Revision 1.4 2007/04/13 13:14:55 jorpiell |
... | ... | |
65 | 68 |
*/ |
66 | 69 |
public abstract class GPEContentHandler implements IGPEContentHandler { |
67 | 70 |
|
71 |
/** |
|
72 |
* It initializes the ContentHandler. It thas to |
|
73 |
* init the object attributes values before to |
|
74 |
* start a new parsing process. |
|
75 |
*/ |
|
76 |
abstract public void initialize(); |
|
77 |
|
|
68 | 78 |
/* |
69 | 79 |
* (non-Javadoc) |
70 | 80 |
* @see org.gvsig.gpe.IGPEContentHandler#startLayer(java.lang.Object, java.lang.Object, java.lang.String, java.lang.String, java.lang.String, java.lang.String) |
Also available in: Unified diff