Revision 33738 branches/v2_0_0_prep/libraries/libRemoteServices/src/org/gvsig/remoteclient/wfs/schema/XMLElement.java
XMLElement.java | ||
---|---|---|
3 | 3 |
import java.io.IOException; |
4 | 4 |
import java.util.Vector; |
5 | 5 |
|
6 |
import org.kxml2.io.KXmlParser; |
|
7 |
import org.xmlpull.v1.XmlPullParserException; |
|
8 |
|
|
9 |
import org.gvsig.compat.CompatLocator; |
|
10 |
import org.gvsig.compat.lang.StringUtils; |
|
6 | 11 |
import org.gvsig.remoteclient.utils.CapabilitiesTags; |
7 | 12 |
import org.gvsig.remoteclient.wfs.schema.type.IXMLType; |
8 | 13 |
import org.gvsig.remoteclient.wfs.schema.type.XMLComplexType; |
9 |
import org.kxml2.io.KXmlParser; |
|
10 |
import org.xmlpull.v1.XmlPullParserException; |
|
11 | 14 |
|
12 | 15 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
13 | 16 |
* |
... | ... | |
105 | 108 |
//Only used if is a part of a complex type |
106 | 109 |
private XMLElement parentElement = null; |
107 | 110 |
|
111 |
private static final StringUtils stringUtils = CompatLocator.getStringUtils(); |
|
112 |
|
|
108 | 113 |
public XMLElement(XMLSchemaParser parser) throws XmlPullParserException, IOException { |
109 | 114 |
super(); |
110 | 115 |
parse(parser); |
... | ... | |
162 | 167 |
this.type = XMLTypesFactory.getType(typeUnknown); |
163 | 168 |
} |
164 | 169 |
if ((type == null) && (typeUnknown != null)){ |
165 |
if (typeUnknown.split(":").length > 1){
|
|
166 |
this.type = XMLTypesFactory.getType(null + ":" + typeUnknown.split(":")[1]);
|
|
170 |
if (stringUtils.split(typeUnknown, ":").length > 1){
|
|
171 |
this.type = XMLTypesFactory.getType(null + ":" + stringUtils.split(typeUnknown, ":")[1]);
|
|
167 | 172 |
if (type == null){ |
168 |
this.type = XMLTypesFactory.getType(typeUnknown.split(":")[1]);
|
|
173 |
this.type = XMLTypesFactory.getType(stringUtils.split(typeUnknown, ":")[1]);
|
|
169 | 174 |
} |
170 | 175 |
} |
171 | 176 |
} |
... | ... | |
178 | 183 |
public void setEntityType(String type) { |
179 | 184 |
IXMLType xmlType = XMLTypesFactory.getType(type); |
180 | 185 |
if (xmlType == null){ |
181 |
String[] types = type.split(":");
|
|
186 |
String[] types = stringUtils.split(type, ":");
|
|
182 | 187 |
if (types.length == 1){ |
183 | 188 |
xmlType = XMLTypesFactory.getType("XS:" + type); |
184 | 189 |
} |
Also available in: Unified diff