Revision 33738 branches/v2_0_0_prep/libraries/libRemoteServices/src/org/gvsig/remoteclient/wfs/wfs_1_1_0/WFSProtocolHandler1_1_0.java
WFSProtocolHandler1_1_0.java | ||
---|---|---|
5 | 5 |
import java.io.IOException; |
6 | 6 |
import java.util.Vector; |
7 | 7 |
|
8 |
import org.kxml2.io.KXmlParser; |
|
9 |
import org.xmlpull.v1.XmlPullParserException; |
|
10 |
|
|
11 |
import org.gvsig.compat.CompatLocator; |
|
12 |
import org.gvsig.compat.lang.StringUtils; |
|
8 | 13 |
import org.gvsig.remoteclient.utils.CapabilitiesTags; |
9 | 14 |
import org.gvsig.remoteclient.wfs.WFSOperation; |
10 | 15 |
import org.gvsig.remoteclient.wfs.WFSProtocolHandler; |
... | ... | |
24 | 29 |
import org.gvsig.remoteclient.wfs.wfs_1_1_0.request.WFSDescribeFeatureTypeRequest1_1_0; |
25 | 30 |
import org.gvsig.remoteclient.wfs.wfs_1_1_0.request.WFSGetFeatureRequest1_1_0; |
26 | 31 |
import org.gvsig.remoteclient.wfs.wfs_1_1_0.request.WFSTLockFeatureRequest1_1_0; |
27 |
import org.kxml2.io.KXmlParser; |
|
28 |
import org.xmlpull.v1.XmlPullParserException; |
|
29 | 32 |
|
30 | 33 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
31 | 34 |
* |
... | ... | |
81 | 84 |
*/ |
82 | 85 |
public class WFSProtocolHandler1_1_0 extends WFSProtocolHandler{ |
83 | 86 |
|
87 |
private static final StringUtils stringUtils = CompatLocator.getStringUtils(); |
|
88 |
|
|
84 | 89 |
public WFSProtocolHandler1_1_0(){ |
85 | 90 |
this.version = "1.1.0"; |
86 | 91 |
this.name = "WFS1.1.0"; |
... | ... | |
356 | 361 |
} |
357 | 362 |
|
358 | 363 |
String layerName = getCurrentFeature(); |
359 |
if (getCurrentFeature().split(":").length>1){
|
|
360 |
layerName = getCurrentFeature().split(":")[1];
|
|
364 |
if (stringUtils.split(getCurrentFeature(), ":").length>1){
|
|
365 |
layerName = stringUtils.split(getCurrentFeature(), ":")[1];
|
|
361 | 366 |
} |
362 | 367 |
XMLElement entity = XMLElementsFactory.getElement(layerName); |
363 | 368 |
if (entity != null){ |
... | ... | |
388 | 393 |
for (int i=0 ; i<parser.getAttributeCount() ; i++){ |
389 | 394 |
String attName = parser.getAttributeName(i); |
390 | 395 |
if (WFSTTags.WFS_NUMBER_OF_FEATURES.equals(attName)){ |
391 |
requestInformation.setNumberOfFeatures(new Integer(parser.getAttributeValue(i))); |
|
396 |
requestInformation.setNumberOfFeatures(new Integer(parser.getAttributeValue(i)).intValue());
|
|
392 | 397 |
}else if (WFSTTags.WFS_TIME_STAMP.equals(attName)){ |
393 | 398 |
requestInformation.setTimeStamp(parser.getAttributeValue(i)); |
394 | 399 |
} |
Also available in: Unified diff