Revision 34026 branches/v2_0_0_prep/applications/appGazetteer/src/org/gvsig/gazetteer/wfs/drivers/WFSServiceDriver.java

View differences:

WFSServiceDriver.java
47 47
import java.util.ArrayList;
48 48
import java.util.Hashtable;
49 49
import java.util.Iterator;
50
import java.util.Vector;
51 50

  
52 51
import org.gvsig.catalog.drivers.DiscoveryServiceCapabilities;
53 52
import org.gvsig.catalog.utils.CatalogConstants;
......
63 62
import org.gvsig.i18n.Messages;
64 63
import org.gvsig.remoteclient.wfs.WFSClient;
65 64
import org.gvsig.remoteclient.wfs.WFSFeature;
65
import org.gvsig.remoteclient.wfs.WFSFeatureField;
66 66
import org.gvsig.remoteclient.wfs.WFSStatus;
67 67
import org.gvsig.remoteclient.wfs.filters.filterencoding.FilterEncoding;
68
import org.gvsig.remoteclient.wfs.schema.XMLElement;
69
import org.gvsig.remoteclient.wfs.schema.type.XMLComplexType;
70 68
import org.gvsig.utils.swing.jcomboServer.ServerData;
71 69

  
72 70

  
......
166 164
	 * A list of attributes
167 165
	 */
168 166
	private FeatureTypeAttribute[] covertFeatuteAttributes(WFSFeature feature) {
169
		XMLElement element = (XMLElement)feature.getFields().get(0);
170
		XMLComplexType type = (XMLComplexType)element.getEntityType();
171
		Vector fields = type.getAttributes();
172
		FeatureTypeAttribute[] attributes = new FeatureTypeAttribute[fields.size()];
173
		for (int i=0 ; i<fields.size(); i++){
174
			XMLElement child = (XMLElement)fields.get(i);
175
			attributes[i] = new FeatureTypeAttribute(child.getName(),0,false,child.getEntityType().getName());
167
		FeatureTypeAttribute[] attributes = new FeatureTypeAttribute[feature.getFieldSize()];
168
		for (int i=0 ; i<feature.getFieldSize(); i++){
169
			WFSFeatureField child = feature.getFieldAt(i);
170
			attributes[i] = new FeatureTypeAttribute(child.getName(),0,false,child.getType());
176 171
		}
177 172
		return attributes;
178 173
	}

Also available in: Unified diff