Oh, one more thing, while for shapefiles and directories of shapefiles using the featuresource is probably
the right way to go, for geopackage I guess we should check the DataAccess ServiceInfo instead, and see if
it’s a FileServiceInfo instead.
So two checks to do I assume, first see if there is anything layer specific in the feature source, and if not,
maybe provide the download link to the entire store… hum… not entirely sure about this one though… what
if the store contains some open and some restricted layer… this poses security questions, not so straighforward
I’m afraid…
···
On Sat, Nov 7, 2015 at 11:53 AM, Andrea Aime <andrea.aime@anonymised.com268…> wrote:
–
On Sat, Nov 7, 2015 at 3:40 AM, Brad Hards <bradh@anonymised.com> wrote:
I’m trying to extend Daniele’s work on DirectDownload to handle non-Coverage
cases. I understand that this isn’t going to work for every case (e.g. if it
is a database Store), but the case I’m interested in should be a file.
The web part seems OK, and I’m up to the part where I need to handle building
the download links in the metadata customizer.
So I’m trying to create an equivalent to the linksFromCoverage() method:
https://github.com/geoserver/geoserver/blob/master/src/extension/csw/core/src/main/java/org/geoserver/csw/DownloadLinkHandler.java#L240
that takes a FeatureTypeInfo.
I’ve tries a couple of things with getting the connection parameters, and with
getting a DataAccess, but I’m not really any closer to finding a way to get the
files that the underlying DataStore is using.
Can anyone suggest how to get the applicable file(s) (e.g. each file in a
shapefile set) without special-casing each data store type (e.g. a case for
ShapefileDataStore, DirectoryDataStore, etc)?
I see the use of ResourceInfo → FileResourceInfo in the coverage case, but I
don’t see how to get something like that from the FeatureTypeInfo.
Hi Brad,
the plan for vector data was to get the FeatureSource, call getInfo() and
see if the returned ResourceInfo is a FileResourceInfo.
File based stores may return one, database backed ones won’t
Hope this helps
Cheers
Andrea
–
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
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.
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
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.