On Mon, Jan 4, 2016 at 11:00 AM, Andreas Watermeyer <
[email protected]> wrote:

> Hi Andrea,
>
> thank you very much for your detailed response.
>
> I like your approach c) best because it is flexible enough and complete.
>

Yep, but also the most expensive to implement :-)
a) is a bit of hack indeed, but I believe it would get what you need with
minimal
changes around your existing patch (still have to see if others would be ok
with it, I can say I'd be).


>
> I try to sum up:
>
> 1) In future releases of GT FeatureTypes may have attributes of type
> "LocalDate".
> Question: Which parts of GT have to be adjusted in order to handle that?
> - org.geotools.xml.XmlConverterFactory: Handle the LocalDate to String
> conversion
>

Yes, that's correct, since LocalDate is not a java.util.Date


> - org.geotools.jdbc.JDBCDataStore: Create INSERTs, UPDATEs receiving
> LocalDates, convert java.sql.Date to LocalDate when reading features
> (depending on setup of DataStore). I suppose no changes are required
> for queries.
>

Unsure about queries, one should check  what happens with filter encoding,
probably add tests because if it works, it would be mostly by accident,
rather
than design.


> - org.geotools.xs.bindings.XSDateBinding to handle String to LocalDate
> conversion. I don't know the concepts behind GT XML parsing. How can
> the binding consider the attribute type of a FeatureType?
>

Havfe a look at how XSDateBinding coded and registered (gt-xsd-core), I
guess we'd
need a XSLocalDateBinding. Yet, that would only cover GML 3+,
for GML2 we have a different (older but faster) parser/encoder, see
FeatureTranslator
in gt-main


> - probably more ..?
>

Eh yeah, if we consider both directions of data flow, we'd need to check
the other
data stores as well (at least make sure they don't break if a LocalDate
hits them),
and all the GeoServer WFS output formats too.


>
> 2) GeoServer PostGIS DataStore configuration (UI & Backend) must be
> enhanced to determine if a DataStore shall be treat date columns as
> time zoned (default: time zoned). The DataStore and its delegates will
> in turn create the respective FeatureType.
>
> All of that must be backwards compatible.
>

To some extent, but not fully, LocalDate is a Java 8 specific API, so
it would not be backportable to the stable and maintenace series.


>
> I honestly don't know if I find the time to propose a pull request,
> maybe on the long run. I will try if I can.
>

I agree it's a "high path" approach, better but expensive.
Personally I'd be ok with both a) and c)

Cheers
Andrea

-- 
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
==

*Geosolutions' Winter Holidays from 24/12 to 6/1*

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.



The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility  for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------
------------------------------------------------------------------------------
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to