[Geoserver-devel] Pull request (#841) / GeoServerFeatureSource constructor

Hi,

Jody and I have been discussing an API change in GeoServerFeatureSource that is in my pull request for cascaded stored query support.

https://github.com/geoserver/geoserver/pull/841#discussion-diff-21494311

The reasoning behind the change is to pass all metadata supplied for a feature type to the FeatureSource. This allows GeoServer to pass the configuration required for cascaded stored queries to the actual data store. The pattern is generic so it should be usable in other cases as well.

Jody was looking for more feedback, especially from Andrea, regarding this.

Thanks,
Sampo

···

Sampo Savolainen
R&D Director, Spatineo Oy
sampo.savolainen@anonymised.com
+358-407555649
Linnankoskenkatu 16 A 17, 00250 Helsinki, Finland
www.spatineo.com, twitter.com/#!/spatineo
www.linkedin.com/company/spatineo-inc

This message may contain privileged and/or confidential information. If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate, or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.

I don’t want to hold up the pull request on this one, should be a 5 mins conversation.
Andrea are these constructor arguments holding up?

Quick fix:

public GeoServerFeatureSource(source, schema, definitionQuery, declaredCRS, srsHandling, linearizationTolerance){
this( source, schema, definitionQuery, declaredCRS, srsHandling, linearizationTolerance, null );
}

Longer term:

// for backwards compatibility (deprecate or remove to force compile failure)
GeoServerFeatureSource(source, schema, definitionQuery, declaredCRS, srsHandling, linearizationTolerance){

this( source, new Settings( schema, definitionQuery, declaredCRS, srsHandling, linearizationTolerance) );
}

GeoServerFeatureSource(source, schema, Settings settings ){


}

Where “GeoServerFeatureSource.Settings” is a parameter object we can add fields to over time:

static class Settings {

SimpleFeatureType schema = null;
Filter definitionQuery = null;

CoordinateReferenceSystem declaredCRS = null;
int srsHandling = null;
Double linearizationTolerance = null;
Map<String, Object> metadata = null;

}

···

On 11 December 2014 at 00:16, Sampo Savolainen <sampo.savolainen@anonymised.com> wrote:

Hi,

Jody and I have been discussing an API change in GeoServerFeatureSource that is in my pull request for cascaded stored query support.

https://github.com/geoserver/geoserver/pull/841#discussion-diff-21494311

The reasoning behind the change is to pass all metadata supplied for a feature type to the FeatureSource. This allows GeoServer to pass the configuration required for cascaded stored queries to the actual data store. The pattern is generic so it should be usable in other cases as well.

Jody was looking for more feedback, especially from Andrea, regarding this.

Thanks,
Sampo

Sampo Savolainen
R&D Director, Spatineo Oy
sampo.savolainen@anonymised.com
+358-407555649
Linnankoskenkatu 16 A 17, 00250 Helsinki, Finland
www.spatineo.com, twitter.com/#!/spatineo
www.linkedin.com/company/spatineo-inc

This message may contain privileged and/or confidential information. If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate, or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.


Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Jody Garnett

On Thu, Dec 11, 2014 at 6:59 PM, Jody Garnett <jody.garnett@anonymised.com>
wrote:

I don't want to hold up the pull request on this one, should be a 5 mins
conversation.

Sorry, I'm busy enough that I don't know what day it is anymore these days

Andrea are these constructor arguments holding up?

You mean you want to introduce a parameter object to avoid growing the
constructor?
Sure, pretty standard refactoring I'd say.

I have no idea what these new metadata things are though

Cheers
Andrea

--

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

Please, notice that GeoSolutions will be closed for seasonal holidays
from December the 24th to January the 6th

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.

-------------------------------------------------------

Thanks Andrea, that is all we need. The new metadata thing was part of the pull request from Sampo (hopefully with a parameter object we can get a good javadoc explaining what it is for).

Jody

···

On 11 December 2014 at 10:24, Andrea Aime <andrea.aime@anonymised.com> wrote:


Jody Garnett

On Thu, Dec 11, 2014 at 6:59 PM, Jody Garnett <jody.garnett@anonymised.com> wrote:

I don’t want to hold up the pull request on this one, should be a 5 mins conversation.

Sorry, I’m busy enough that I don’t know what day it is anymore these days

Andrea are these constructor arguments holding up?

You mean you want to introduce a parameter object to avoid growing the constructor?
Sure, pretty standard refactoring I’d say.

I have no idea what these new metadata things are though

Cheers
Andrea

==

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

Please, notice that GeoSolutions will be closed for seasonal holidays
from December the 24th to January the 6th

==

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.


Hi,

I’ve added the Settings class in my pull request branch.

https://github.com/sampov2/geoserver/commit/623381f29cc8f5a7123a4c16e1b444fb449f2ff8

Sampo

···

On Thu, Dec 11, 2014 at 8:32 PM, Jody Garnett <jody.garnett@anonymised.com> wrote:

Thanks Andrea, that is all we need. The new metadata thing was part of the pull request from Sampo (hopefully with a parameter object we can get a good javadoc explaining what it is for).

Jody


Jody Garnett

On 11 December 2014 at 10:24, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, Dec 11, 2014 at 6:59 PM, Jody Garnett <jody.garnett@anonymised.com> wrote:

I don’t want to hold up the pull request on this one, should be a 5 mins conversation.

Sorry, I’m busy enough that I don’t know what day it is anymore these days

Andrea are these constructor arguments holding up?

You mean you want to introduce a parameter object to avoid growing the constructor?
Sure, pretty standard refactoring I’d say.

I have no idea what these new metadata things are though

Cheers
Andrea

==

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

Please, notice that GeoSolutions will be closed for seasonal holidays
from December the 24th to January the 6th

==

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.


Sampo Savolainen
R&D Director, Spatineo Oy
sampo.savolainen@anonymised.com9…
+358-407555649
Linnankoskenkatu 16 A 17, 00250 Helsinki, Finland
www.spatineo.com, twitter.com/#!/spatineo
www.linkedin.com/company/spatineo-inc

This message may contain privileged and/or confidential information. If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate, or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.

Thanks Sampo, let me know when I can review again.

···

On 19 December 2014 at 01:22, Sampo Savolainen <sampo.savolainen@anonymised.com> wrote:

Hi,

I’ve added the Settings class in my pull request branch.

https://github.com/sampov2/geoserver/commit/623381f29cc8f5a7123a4c16e1b444fb449f2ff8

Sampo


Jody Garnett

On Thu, Dec 11, 2014 at 8:32 PM, Jody Garnett <jody.garnett@anonymised.com> wrote:

Thanks Andrea, that is all we need. The new metadata thing was part of the pull request from Sampo (hopefully with a parameter object we can get a good javadoc explaining what it is for).

Jody

Sampo Savolainen
R&D Director, Spatineo Oy
sampo.savolainen@anonymised.com3889…
+358-407555649
Linnankoskenkatu 16 A 17, 00250 Helsinki, Finland
www.spatineo.com, twitter.com/#!/spatineo
www.linkedin.com/company/spatineo-inc

This message may contain privileged and/or confidential information. If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate, or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.


Jody Garnett

On 11 December 2014 at 10:24, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, Dec 11, 2014 at 6:59 PM, Jody Garnett <jody.garnett@anonymised.com> wrote:

I don’t want to hold up the pull request on this one, should be a 5 mins conversation.

Sorry, I’m busy enough that I don’t know what day it is anymore these days

Andrea are these constructor arguments holding up?

You mean you want to introduce a parameter object to avoid growing the constructor?
Sure, pretty standard refactoring I’d say.

I have no idea what these new metadata things are though

Cheers
Andrea

==

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

Please, notice that GeoSolutions will be closed for seasonal holidays
from December the 24th to January the 6th

==

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.


Hi,

You can go ahead and review again at your convenience.

Sampo

···

On Fri, Dec 19, 2014 at 9:35 PM, Jody Garnett <jody.garnett@anonymised.com> wrote:

Thanks Sampo, let me know when I can review again.


Jody Garnett

On 19 December 2014 at 01:22, Sampo Savolainen <sampo.savolainen@anonymised.com> wrote:

Hi,

I’ve added the Settings class in my pull request branch.

https://github.com/sampov2/geoserver/commit/623381f29cc8f5a7123a4c16e1b444fb449f2ff8

Sampo

On Thu, Dec 11, 2014 at 8:32 PM, Jody Garnett <jody.garnett@anonymised.com> wrote:

Thanks Andrea, that is all we need. The new metadata thing was part of the pull request from Sampo (hopefully with a parameter object we can get a good javadoc explaining what it is for).

Jody

Sampo Savolainen
R&D Director, Spatineo Oy
sampo.savolainen@anonymised.com
+358-407555649
Linnankoskenkatu 16 A 17, 00250 Helsinki, Finland
www.spatineo.com, twitter.com/#!/spatineo
www.linkedin.com/company/spatineo-inc

This message may contain privileged and/or confidential information. If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate, or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.


Jody Garnett

On 11 December 2014 at 10:24, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, Dec 11, 2014 at 6:59 PM, Jody Garnett <jody.garnett@anonymised.com> wrote:

I don’t want to hold up the pull request on this one, should be a 5 mins conversation.

Sorry, I’m busy enough that I don’t know what day it is anymore these days

Andrea are these constructor arguments holding up?

You mean you want to introduce a parameter object to avoid growing the constructor?
Sure, pretty standard refactoring I’d say.

I have no idea what these new metadata things are though

Cheers
Andrea

==

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

Please, notice that GeoSolutions will be closed for seasonal holidays
from December the 24th to January the 6th

==

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.


Sampo Savolainen
R&D Director, Spatineo Oy
sampo.savolainen@…3889…
+358-407555649
Linnankoskenkatu 16 A 17, 00250 Helsinki, Finland
www.spatineo.com, twitter.com/#!/spatineo
www.linkedin.com/company/spatineo-inc

This message may contain privileged and/or confidential information. If you
have received this e-mail in error or are not the intended recipient, you
may not use, copy, disseminate, or distribute it; do not open any
attachments, delete it immediately from your system and notify the sender
promptly by e-mail that you have done so.