Revision 33738 branches/v2_0_0_prep/libraries/libRemoteServices/src/org/gvsig/remoteclient/wfs/schema/XMLTypesFactory.java

View differences:

XMLTypesFactory.java
4 4
import java.util.Iterator;
5 5
import java.util.Set;
6 6

  
7
import org.gvsig.compat.CompatLocator;
8
import org.gvsig.compat.lang.StringUtils;
7 9
import org.gvsig.remoteclient.wfs.schema.type.GMLGeometryType;
8 10
import org.gvsig.remoteclient.wfs.schema.type.IXMLType;
9 11
import org.gvsig.remoteclient.wfs.schema.type.XMLComplexType;
......
92 94
 */
93 95
public class XMLTypesFactory {
94 96
	private static Hashtable types = new Hashtable();
95
		
97
	private static final StringUtils stringUtils = CompatLocator.getStringUtils();
98
	
96 99
	static{
97 100
		types.put(XMLSimpleType.STRING.toUpperCase(),new XMLSimpleType(XMLSimpleType.STRING));
98 101
		types.put(XMLSimpleType.INTEGER.toUpperCase(),new XMLSimpleType(XMLSimpleType.INTEGER));
......
137 140
	public static IXMLType getTypeWithOutNameSpace(String type){
138 141
		Set keys = types.keySet();
139 142
		Iterator it = keys.iterator();
140
		String[] typeParts = type.split(":");
143
		String[] typeParts = stringUtils.split(type, ":");
141 144
		String typeAux = type;
142 145
		if (typeParts.length > 1){
143 146
			typeAux = typeParts[1];
144 147
		}
145 148
		while(it.hasNext()){
146 149
			String key = (String)it.next();
147
			String[] parts = key.split(":");
150
			String[] parts = stringUtils.split(key, ":");
148 151
			if (parts.length == 1){
149 152
				if (parts[0].compareTo(typeAux.toUpperCase())==0){
150 153
					return (IXMLType)types.get(key);

Also available in: Unified diff