Revision 9917 branches/v10/libraries/libRemoteServices/src/org/gvsig/remoteClient/gml/factories/XMLTypesFactory.java
XMLTypesFactory.java | ||
---|---|---|
4 | 4 |
import java.util.Iterator; |
5 | 5 |
import java.util.Set; |
6 | 6 |
|
7 |
import org.gvsig.remoteClient.gml.schemas.GMLGeometryType;
|
|
8 |
import org.gvsig.remoteClient.gml.schemas.IXMLType;
|
|
9 |
import org.gvsig.remoteClient.gml.schemas.XMLComplexType;
|
|
10 |
import org.gvsig.remoteClient.gml.schemas.XMLSimpleType;
|
|
7 |
import org.gvsig.remoteClient.gml.types.GMLGeometryType;
|
|
8 |
import org.gvsig.remoteClient.gml.types.IXMLType;
|
|
9 |
import org.gvsig.remoteClient.gml.types.XMLComplexType;
|
|
10 |
import org.gvsig.remoteClient.gml.types.XMLSimpleType;
|
|
11 | 11 |
|
12 | 12 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
13 | 13 |
* |
... | ... | |
53 | 53 |
* |
54 | 54 |
* $Id$ |
55 | 55 |
* $Log$ |
56 |
* Revision 1.1.2.4 2006-11-27 11:10:32 jorpiell
|
|
57 |
* A?adido el Poligono como tipo
|
|
56 |
* Revision 1.1.2.5 2007-01-25 16:12:59 jorpiell
|
|
57 |
* Se han sustituido las clases por las que hay en el nuevo driver de GML.
|
|
58 | 58 |
* |
59 |
* Revision 1.1.2.3 2006/11/17 11:38:03 ppiqueras
|
|
60 |
* Corregidos bugs y aƱadida nueva funcionalidad. Del HEAD.
|
|
59 |
* Revision 1.8 2006/12/29 17:15:48 jorpiell
|
|
60 |
* Se tienen en cuenta los simpleTypes y los choices, adem?s de los atributos multiples
|
|
61 | 61 |
* |
62 |
* Revision 1.7 2006/12/22 11:25:44 csanchez |
|
63 |
* Nuevo parser GML 2.x para gml's sin esquema |
|
64 |
* |
|
62 | 65 |
* Revision 1.5 2006/10/11 11:21:00 jorpiell |
63 | 66 |
* Se escriben los tipos correctamente (no en mayusculas) para que las traducciones funcionen |
64 | 67 |
* |
... | ... | |
84 | 87 |
* located in the schemas must be registered here |
85 | 88 |
* |
86 | 89 |
* @author Jorge Piera Llodr? (piera_jor@gva.es) |
90 |
* @author Carlos S?nchez Peri??n (sanchez_carper@gva.es) |
|
91 |
* |
|
87 | 92 |
*/ |
88 | 93 |
public class XMLTypesFactory { |
89 | 94 |
private static Hashtable types = new Hashtable(); |
... | ... | |
100 | 105 |
types.put(GMLGeometryType.MULTIPOINT.toUpperCase(),new GMLGeometryType(GMLGeometryType.MULTIPOINT)); |
101 | 106 |
types.put(GMLGeometryType.LINE.toUpperCase(),new GMLGeometryType(GMLGeometryType.LINE)); |
102 | 107 |
types.put(GMLGeometryType.POLYGON.toUpperCase(),new GMLGeometryType(GMLGeometryType.POLYGON)); |
103 |
types.put(GMLGeometryType.MULTIPOLYGON.toUpperCase(),new GMLGeometryType(GMLGeometryType.MULTIPOLYGON)); |
|
104 | 108 |
types.put(GMLGeometryType.GEOMETRY.toUpperCase(),new GMLGeometryType(GMLGeometryType.GEOMETRY)); |
105 | 109 |
} |
106 | 110 |
|
... | ... | |
113 | 117 |
public static IXMLType getType(String type){ |
114 | 118 |
IXMLType xmlType = (IXMLType)types.get(type.toUpperCase()); |
115 | 119 |
if (xmlType == null){ |
116 |
xmlType = getTypeWithOutNameSpace(type); |
|
120 |
xmlType = getTypeWithOutNameSpace(type);
|
|
117 | 121 |
} |
118 | 122 |
return xmlType; |
119 | 123 |
} |
... | ... | |
161 | 165 |
addType(complexType); |
162 | 166 |
return complexType; |
163 | 167 |
} |
168 |
|
|
169 |
public static XMLSimpleType addSimpleType(String name,String type){ |
|
170 |
XMLSimpleType simpleType = new XMLSimpleType(name,type); |
|
171 |
types.put(name.toUpperCase(),simpleType); |
|
172 |
return simpleType; |
|
173 |
} |
|
164 | 174 |
|
165 | 175 |
/** |
166 | 176 |
* Just for degug. It prints all the registred components. |
Also available in: Unified diff