Revision 41301 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.remoteclient/src/main/java/org/gvsig/remoteclient/wfs/wfs_1_0_0/WFSProtocolHandler1_0_0.java
WFSProtocolHandler1_0_0.java | ||
---|---|---|
33 | 33 |
import org.gvsig.compat.CompatLocator; |
34 | 34 |
import org.gvsig.compat.lang.StringUtils; |
35 | 35 |
import org.gvsig.remoteclient.utils.CapabilitiesTags; |
36 |
import org.gvsig.remoteclient.utils.Utilities; |
|
36 | 37 |
import org.gvsig.remoteclient.wfs.WFSProtocolHandler; |
37 | 38 |
import org.gvsig.remoteclient.wfs.WFSStatus; |
38 | 39 |
import org.gvsig.remoteclient.wfs.edition.WFSTTags; |
39 |
import org.gvsig.remoteclient.wfs.edition.WFSTTransaction; |
|
40 | 40 |
import org.gvsig.remoteclient.wfs.exceptions.ExceptionsFactory; |
41 | 41 |
import org.gvsig.remoteclient.wfs.exceptions.WFSException; |
42 | 42 |
import org.gvsig.remoteclient.wfs.exceptions.WFSGetFeatureException; |
... | ... | |
50 | 50 |
import org.gvsig.remoteclient.wfs.wfs_1_0_0.request.WFSGetFeatureRequest1_0_0; |
51 | 51 |
import org.gvsig.remoteclient.wfs.wfs_1_0_0.request.WFSTLockFeatureRequest1_0_0; |
52 | 52 |
import org.gvsig.remoteclient.wfs.wfs_1_0_0.request.WFSTransactionRequest1_0_0; |
53 |
import org.slf4j.Logger; |
|
54 |
import org.slf4j.LoggerFactory; |
|
53 | 55 |
|
54 | 56 |
/** |
55 | 57 |
* @author Jorge Piera Llodr? (piera_jor@gva.es) |
56 | 58 |
*/ |
57 | 59 |
public class WFSProtocolHandler1_0_0 extends WFSProtocolHandler{ |
58 | 60 |
|
61 |
private static Logger logger = LoggerFactory.getLogger(WFSProtocolHandler1_0_0.class); |
|
59 | 62 |
private static final StringUtils stringUtils = CompatLocator.getStringUtils(); |
60 | 63 |
|
61 | 64 |
public WFSProtocolHandler1_0_0(){ |
... | ... | |
112 | 115 |
} |
113 | 116 |
} |
114 | 117 |
catch(XmlPullParserException parser_ex){ |
115 |
parser_ex.printStackTrace();
|
|
116 |
return false;
|
|
118 |
logger.warn("Can't parse capabilities '"+Utilities.getAbsolutePathOrEmpty(f)+"'.",parser_ex);
|
|
119 |
return false;
|
|
117 | 120 |
} |
118 | 121 |
catch (IOException ioe) { |
119 |
ioe.printStackTrace();
|
|
120 |
return false;
|
|
122 |
logger.warn("Can't parse capabilities '"+Utilities.getAbsolutePathOrEmpty(f)+"'.",ioe);
|
|
123 |
return false;
|
|
121 | 124 |
} |
122 | 125 |
return true; |
123 | 126 |
} |
... | ... | |
305 | 308 |
throw ExceptionsFactory.parseServiceExceptionReport(parser); |
306 | 309 |
} |
307 | 310 |
} catch (FileNotFoundException e) { |
308 |
e.printStackTrace();
|
|
311 |
logger.warn("Can't get feature from file '"+Utilities.getAbsolutePathOrEmpty(f)+"' with namaspace '"+nameSpace+"'.",e);
|
|
309 | 312 |
throw new WFSGetFeatureException(e); |
310 | 313 |
} catch (XmlPullParserException e) { |
311 |
e.printStackTrace();
|
|
314 |
logger.warn("Can't get feature from file '"+Utilities.getAbsolutePathOrEmpty(f)+"' with namaspace '"+nameSpace+"'.",e);
|
|
312 | 315 |
throw new WFSGetFeatureException(e); |
313 | 316 |
} catch (IOException e) { |
314 |
e.printStackTrace();
|
|
317 |
logger.warn("Can't get feature from file '"+Utilities.getAbsolutePathOrEmpty(f)+"' with namaspace '"+nameSpace+"'.",e);
|
|
315 | 318 |
throw new WFSGetFeatureException(e); |
316 | 319 |
} |
317 | 320 |
|
... | ... | |
365 | 368 |
} |
366 | 369 |
} |
367 | 370 |
catch(XmlPullParserException parser_ex){ |
368 |
parser_ex.printStackTrace();
|
|
371 |
logger.warn("Can't parse transaction from file '"+Utilities.getAbsolutePathOrEmpty(f)+"'.",parser_ex);
|
|
369 | 372 |
return false; |
370 | 373 |
} |
371 | 374 |
catch (IOException ioe) { |
372 |
ioe.printStackTrace();
|
|
375 |
logger.warn("Can't parse transaction from file '"+Utilities.getAbsolutePathOrEmpty(f)+"'.",ioe);
|
|
373 | 376 |
return false; |
374 | 377 |
} |
375 | 378 |
return true; |
... | ... | |
496 | 499 |
} |
497 | 500 |
} |
498 | 501 |
catch(XmlPullParserException parser_ex){ |
499 |
parser_ex.printStackTrace();
|
|
502 |
logger.warn("Can't parse lock-feature from file '"+Utilities.getAbsolutePathOrEmpty(f)+"'.",parser_ex);
|
|
500 | 503 |
return false; |
501 | 504 |
} |
502 | 505 |
catch (IOException ioe) { |
503 |
ioe.printStackTrace();
|
|
506 |
logger.warn("Can't parse lock-feature from file '"+Utilities.getAbsolutePathOrEmpty(f)+"'.",ioe);
|
|
504 | 507 |
return false; |
505 | 508 |
} |
506 | 509 |
return true; |
Also available in: Unified diff