Makes sense.

On 05-10-15 12:58, Daniele Romagnoli wrote:
Hi Niels,
sorry for the late reply and thanks for your suggestions.
At the end, I chose to add values once the feature has been created, without editing the mappings. I was thinking about the case of having thousands of onlineResource entries to be added where I wouldn't add 2 x thousands null values.

Best Regards,
Daniele

On Fri, Sep 25, 2015 at 12:49 PM, Niels Charlier <[email protected] <mailto:[email protected]>> wrote:

    Hi Daniele,

    The way the builder works now that it is required that the counts
    of the mappings match in order to know which URL to map to which
    protocol inside each OnlineResource. If you want to
    programmatically add an extra OnlineResource, you need to add an
    extra protocol mapping as well.

    However, I am 99% sure you could just give one of the items a NULL
    value, and then it would end up not creating a node for it. This
    could be used for the non-required protocol element.

    You could change the builder to let go of that condition, but then
    you need a well-defined strategy. For example, you could fill the
    missing values at the end of the list with NULL values and not
    create nodes for them.

    Kind Regards
    Niels


    On 24-09-15 15:55, Daniele Romagnoli wrote:
    Hi again list,
    I'm doing some investigations on the first option (update the
    mapping before creating the feature) for this task.
    As you know, we need to add new entries in records containing the
    DownloadLinks.
    That means, adding:
     - additional references
    <http://dublincore.org/documents/dcmi-terms/#terms-references> elements
    in the DublinCore format
     - additional OnlineReference
    <http://www.isotc211.org/2005/gmd/citation.xsd> elements in ISOTC211

    I say /additional/ since the default properties already contain
    these static mappings:

    *DC records.*
    references.scheme='OGC:WMS'
    references.value=strConcat('${url.wms}?service=WMS&request=GetMap&layers=',
    prefixedName)

    *ISOTC211 metadata.*
    
distributionInfo.MD_Distribution.transferOptions.MD_DigitalTransferOptions.onLine.CI_OnlineResource%*.linkage.**URL=list('${url.wfs}','${url.wms}')*
    
distributionInfo.MD_Distribution.transferOptions.MD_DigitalTransferOptions.onLine.CI_OnlineResource%*.protocol.CharacterString=**list('OGC:WFS','OGC:WMS')*
    
distributionInfo.MD_Distribution.transferOptions.MD_DigitalTransferOptions.onLine.CI_OnlineResource%.name.CharacterString=name

    So, I need to add more references.value / linkage.URL entries to
    the feature.
    What I would like to do is adding elements to the RecordBuilder
    in the CatalogStoreFeatureIterator.mapProperties before it
    creates the feature.
    I have checked the underlying treeNodes structure and I'm having
    some issues in understanding how should I add these new entries
    to the builder for the existing mappings.

    One Idea I have is checking the mappingKey and, in case it
    matches a specific value (as "references.value" or whatelse),
    adds more values to the elements array to be provided to the
    builder. (I would setup some mappingCustomizer which does this:
    updating the elements array in case the resource has the
    DirectDownload capability enabled).

    However, it seems to me that the underlying TreeNode structure +
    path splitting doesn't allow to add elements not having the same
    tree structure. I mean: in case I add a
    OnlineResource.linkage.URL value, the builder will complain since
    it notices that the current OnlineResource tree has 2 leaves (the
    previously created OnlineResource for wfs and wms protocol)
    whilst the URL array has now 3 elements throwing an
    IllegalArgumentException due to number not matching.
    I'm wondering if I should delay the addElement invokations once I
    have all the elements ready for all mappings OR if I should relax
    somehow these cardinality checks. Still need to understand how,
    since the treeNodes are progressively added to the tree.
    Moreover, "linkage" is the only mandatory element of
    CI_OnlineResource so some treeNodes may have less leaves (as an
    instance, the optional "protocol" element).

    Feedbacks are very welcome.
    Cheers,
    Daniele

    (Sorry Niels if I have put you on CC but I would like to get some
    hints from you being the one with top experience on the topic).


    On Wed, Sep 23, 2015 at 11:30 AM, Daniele Romagnoli
    <[email protected]
    <mailto:[email protected]>> wrote:

        Hi List,
        we are back working on the "Direct Download links from CSW"
        topic started by Andrea some months ago.
        We would like to share some opinions on it in order to
        collect couple of feedbacks.

        Summarizing the main concept and restoring previous discussions:
        For a Layer, we would like to enable a "DirectDownload"
        capability.
        (We can consider adding a checkBox on wicket in the layer
        config panel,as well as a Global option to enable/disable
        this operation).
        Then, for that layer we would like to provide a
        DirectDownload of the raw data as part of a CSW
        record/metadata, something like:
        
http://host:port/geoserver/ows?service=CSW&version=2.0.1&request=DirectDownload&resourceId=<layerName>

        As you know, an ImageMosaic based layer may refer to multiple
        files so we will show several links (1 for each file
        composing the mosaic) with summarizing details on dimensions
        ranges for that file. Something like this:

        
http://host:port/geoserver/ows?service=CSW&version=2.0.1&request=DirectDownload&resourceId=<layerName>:<fileName>&time=from/to&elevation=from/to&bbox=xmin,ymin,xmax,ymax&custDim=from/to

        At the moment, CSW entries are built through a static mapping
        based on property file which allows to populate CSW keys from
        internal GeoServer Catalog elements.
        As an instance, quoting some entries from
        Record.default.properties mapping file:

        /title.value=if_then_else(isNull(title), name, title)/
        /creator.value='GeoServer Catalog'/
        /subject.value=keywords/
        /abstract.value=abstract/
        /
        /
        CatalogStoreMappingElements are Key,Expression pairs.
        Adding a new entry to the mapping for this new capability
        could be an option but I'm a bit against that since it
        depends on status of global Download enabled.
        Moreover, it could be tricky to encode the mapping as an
        Expression (to be supported by a FilterFunction).

        Therefore, we are thinking about 2 alternative options:
        1) Adding a way to change the mappings before they are applied.
        We could think about adding a mechanism which checks if the
        layer has the DirectDownload capability enabled and then add
        a new mapping element which queries the underlying store to
        return the associated files to be used to setup the link.

        2) Setting up a plugin (something like a FeatureCustomizer)
        which customizes the feature being built by the
        RecordBuilder, in order to add the download link.

        What do you think about it?
        Any feedback will be appreciated.

        Cheers,
        Daniele


        /
        /
        /
        /





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

        Ing. Daniele Romagnoli
        Senior Software Engineer

        GeoSolutions S.A.S.
        Via Poggio alle Viti 1187
        55054  Massarosa (LU)
        Italy
        phone: +39 0584 962313 <tel:%2B39%200584%20962313>
        fax: +39 0584 1660272 <tel:%2B39%200584%201660272>

        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. Daniele Romagnoli
    Senior Software Engineer

    GeoSolutions S.A.S.
    Via Poggio alle Viti 1187
    55054  Massarosa (LU)
    Italy
    phone: +39 0584 962313 <tel:%2B39%200584%20962313>
    fax: +39 0584 1660272 <tel:%2B39%200584%201660272>

    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. Daniele Romagnoli
Senior Software Engineer

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

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.



------------------------------------------------------------------------------
Full-scale, agent-less Infrastructure Monitoring from a single dashboard
Integrate with 40+ ManageEngine ITSM Solutions for complete visibility
Physical-Virtual-Cloud Infrastructure monitoring from one console
Real user monitoring with APM Insights and performance trend reports 
Learn More http://pubads.g.doubleclick.net/gampad/clk?id=247754911&iu=/4140
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to