Revision 18316

View differences:

branches/v10/libraries/libRemoteServices/src/org/gvsig/remoteClient/wfs/edition/WFSTTransaction.java
185 185
	 */
186 186
	private Object getWFSTRequestLockID() {
187 187
		StringBuffer request = new StringBuffer();
188
//		for (int i=0 ; i<featuresLocked.size() ; i++){
189
//			request.append("<" + WFSTTags.WFS_NAMESPACE_PREFIX + ":" + WFSTTags.WFST_LOCKID + ">" );
190
//			request.append(featuresLocked.get(i));
191
//			request.append("</" + WFSTTags.WFS_NAMESPACE_PREFIX + ":" + WFSTTags.WFST_LOCKID + ">" );
192
//		}
188
		for (int i=0 ; i<featuresLocked.size() ; i++){
189
			request.append("<" + WFSTTags.WFS_NAMESPACE_PREFIX + ":" + WFSTTags.WFST_LOCKID + ">" );
190
			request.append(featuresLocked.get(i));
191
			request.append("</" + WFSTTags.WFS_NAMESPACE_PREFIX + ":" + WFSTTags.WFST_LOCKID + ">" );
192
		}
193 193
		return request.toString();
194 194
	}
195 195

  
branches/v10/libraries/libRemoteServices/src/org/gvsig/remoteClient/wfs/WFSProtocolHandler.java
370 370
					}
371 371
				}
372 372
			}			
373
		} catch (WFSException e){
374
			throw e;
373 375
		} catch (Exception e){
374 376
			throw new WFSException(e);
375 377
		}
branches/v10/libraries/libRemoteServices/src/org/gvsig/remoteClient/wfs/exceptions/ExceptionsFactory.java
74 74
			case KXmlParser.START_TAG:
75 75
				if (parser.getName().compareToIgnoreCase(CapabilitiesTags.SERVICE_EXCEPTION)==0)
76 76
				{
77
					String code = null;
77 78
					for (int i=0 ; i<parser.getAttributeCount() ; i++){
78 79
						String attName = parser.getAttributeName(i);
79
						String code = null;
80 80
						if (attName.compareTo(CapabilitiesTags.CODE)==0){
81 81
							code = parser.getAttributeValue(i);
82 82
						}
......
84 84
							if (code.compareTo(CapabilitiesTags.INVALID_FORMAT)==0){
85 85
								parser.next();
86 86
								return new InvalidFormatException(parser.getText());
87
							}
88
							//Code unspecified
89
							parser.next();
90
							return new WFSException(code,parser.getText());
87
							}							
91 88
						}
92 89
					}
90
					parser.next();
91
					return new WFSException(code,parser.getText());
93 92
				}  		                       
94 93
				break;
95 94
			case KXmlParser.END_TAG:
branches/v10/libraries/libRemoteServices/src/org/gvsig/remoteClient/wfs/exceptions/WFSException.java
94 94
	 */
95 95
	public String getWfsCode() {
96 96
		return wfsCode;
97
	}	
97
	}
98

  
99
	/* (non-Javadoc)
100
	 * @see java.lang.Throwable#getMessage()
101
	 */
102
	public String getMessage() {
103
		return formatString; 
104
	}
105
	
106
	
98 107
}
branches/v10/extensions/extGPE-gvSIG/src/org/gvsig/fmap/drivers/gpe/writer/ExportTask.java
80 80
		this.writer = writer;
81 81
		this.mapContext = mapContext;
82 82
		this.eGeometry = new ExportGeometry(writer);
83

  
83
		eGeometry.setProjDest(layer.getProjection());
84 84
		setInitialStep(0);
85 85
		setDeterminatedProcess(true);
86 86
		setStatusMessage(PluginServices.getText(this, "gpe_exporting"));
......
193 193
			writer.startFeature(String.valueOf(index), "FEATURE", null);
194 194
			//Add the geoemtry
195 195
			IGeometry geom = rv.getShape(index);			
196
			eGeometry.writeGeometry(geom, layer.getProjection().getAbrev());
196
			eGeometry.writeGeometry(geom);
197 197
			//Add the attributes
198 198
			Value[] values = sds.getRow(index);
199 199
			for (int i=0 ; i<values.length ; i++){				
branches/v10/extensions/extGPE-gvSIG/src/org/gvsig/fmap/drivers/gpe/writer/ExportGeometry.java
16 16
import com.iver.cit.gvsig.fmap.core.FShape;
17 17
import com.iver.cit.gvsig.fmap.core.Handler;
18 18
import com.iver.cit.gvsig.fmap.core.IGeometry;
19
import com.sun.org.apache.bcel.internal.generic.GETSTATIC;
19 20
import com.sun.org.apache.xerces.internal.impl.dtd.XMLElementDecl;
20 21

  
21 22
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
......
88 89
	 * @param crs
89 90
	 * The coordinates reference system
90 91
	 */
91
	public void writeGeometry(IGeometry geom, String crs){
92
	public void writeGeometry(IGeometry geom){
92 93
		FShape shp = (FShape)geom.getInternalShape();
93 94
		ICoordTrans coordTrans = getCoordTrans();
95
		String crs = null;
96
		if (projDest != null){
97
			crs = projDest.getAbrev();
98
		}
94 99
		if (coordTrans != null){
95
			shp.reProject(coordTrans);
100
			try{
101
				shp.reProject(coordTrans);
102
			}catch(Exception e){
103
				//The server is the responsible to reproject
104
				if (projOrig != null){
105
					crs = projOrig.getAbrev();
106
				}
107
			}
96 108
		}
97 109
		if (shp instanceof FPoint2D){
98 110
			writePoint((FPoint2D)shp, crs);
......
221 233
	 */
222 234
	public void setGeometry(XMLElement geometry) {
223 235
		if (geometry != null){
224
			if (geometry.getName().toLowerCase().startsWith("multi")){
236
			if (geometry.getEntityType().getName().toLowerCase().indexOf("multi") > 0){
225 237
				isMultiple = true;				
226 238
			}else{
227 239
				isMultiple = false;	

Also available in: Unified diff