[Gvsig_english] WFS layer attributes bug

Jorge Piera Llodrá jpiera at prodevelop.es
Wed Apr 21 11:35:51 CEST 2010


Hello.

I remember that we had problems writing GML files that have space characters (' ') in the field names because XML doesn't support a space in the name of a tag. If you export a file to GML the space character is replaced by a configurable escape character ('_' by default). The problem was that there is not an option to change this escape character using the user interface (only by code is possible)

I'm having a look to the source code and in the reading process '_' is replaced by ' '. The solution is just add an option to gvSIG to change this escape character or just not change the escape character in the reading process. We will fix it in next release.

If you are a developer, you can change this escape character. Have a look to the class org.gvsig.gpe.xml.XmlProperties (libGPE-XML)

Regards,
Jorge.


-----Original Message-----
From: gvsig_internacional-bounces at listserv.gva.es on behalf of Flavio Pompermaier
Sent: Wed 21/04/2010 10:53
To: Users and Developers mailing list
Subject: Re: [Gvsig_english] WFS layer attributes bug
 
Yes I'm sure. If you add a WFS layer containing unederscored
attributes to your vista, make it visible and you
go to the Filer tab of the WFS attributes panel (reachable via the
menu that appears right-clicking on the selected layer),
you can see that underscored attributes are displayed correctly but
when you click on one of them to see
 the known values, they aren't loaded.
Oppositely, if you click on non-underscored attributes you will see
all known values.
I think it is a problem that occurs when creating
theSelectableDataSource associated to the WFS layer...

In fact, when you read the field names of the layer you will see that
underscored attributes contain white spaces.
Use the following lines for example:
              SelectableDataSource sds = wfsLayer.getRecordset();
              ReadableVectorial rv = wfsLayer.getSource();
		
               // Desde el modelo se debería acceder a los campos y
sus valores cargados
	      for (int i = 0; i < sds.getFieldCount(); i++) {
		     String fieldName = sds.getFieldName(i);
                       .....
              }

2010/4/21 Benjamin Ducke <benjamin.ducke at oxfordarch.co.uk>:
> Are you sure that the name has actually been modified?
>
> Sometimes, underscores ("_") are simply not visible if the
> entry fields in the Java GUI are too small. But they are there.
> I have seen this happen in a number of gvSIG dialogs.
>
> Cheers,
>
> Ben
>
> ----- Original Message -----
> From: "Flavio Pompermaier" <fla83tn at gmail.com>
> To: "Users and Developers mailing list" <gvsig_internacional at listserv.gva.es>
> Sent: Wednesday, April 21, 2010 10:18:18 AM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
> Subject: [Gvsig_english] WFS layer attributes bug
>
> Hi,
> I'm using gvSIG 1.9 buidl 1253 and I discovered that the WFS
> attributes are not well-managed by gvSIG.
> In fact, if you have an attribute containing the '_' character then it
> will be substituted by a white space character (' ').
> For example, in my WFS layer I have the 'OGLM_TYPE' attribute but in
> the column name I see 'OGLM TYPE'.
> This is not only a representation error because this is also the
> column name in the SelectableDataSource class.
> Is it a bug of gvSIG (also if actually the error is caused by the
> gdbms library...)?
>
> Best regards,
> Flavio
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at listserv.gva.es
> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>
>
>
> ------
> Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit http://iso26300.info for more information.
>
> _______________________________________________
> Gvsig_internacional mailing list
> Gvsig_internacional at listserv.gva.es
> http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
>
_______________________________________________
Gvsig_internacional mailing list
Gvsig_internacional at listserv.gva.es
http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 4857 bytes
Desc: not available
Url : http://listserv.gva.es/pipermail/gvsig_internacional/attachments/20100421/e5c23146/attachment.bin 


More information about the Gvsig_internacional mailing list