| 1 | = Virtual CSW endpoints = |
| 2 | |
| 3 | || '''Date''' || 2011/11/17 || |
| 4 | || '''Contact(s)''' || Jose García |
| 5 | || |
| 6 | || '''Last edited''' || || |
| 7 | || '''Status''' || on-going || |
| 8 | || '''Assigned to release''' || 2.7.0 || |
| 9 | || '''Resources''' || Available || |
| 10 | || '''Ticket #''' || #660 || |
| 11 | |
| 12 | == Overview == |
| 13 | |
| 14 | This proposal aim to add the capability to define custom CSW entry points that applies extra criteria to the CSW request. A useful use case is to define an INSPIRE CSW endpoint to deliver only the INSPIRE related metadata stored in the catalog. |
| 15 | |
| 16 | === Proposal Type === |
| 17 | * '''Type''': Core Change |
| 18 | * '''App''': !GeoNetwork |
| 19 | * '''Module''': CSW server |
| 20 | |
| 21 | === Links === |
| 22 | * '''Documents''': |
| 23 | * '''Email discussions''': |
| 24 | * '''Other wiki discussions''': |
| 25 | |
| 26 | === Voting History === |
| 27 | * Vote proposed by X on Y, result was +/-n (m non-voting members). |
| 28 | |
| 29 | ---- |
| 30 | |
| 31 | == Motivations == |
| 32 | A use case of this proposal is to allow define an INSPIRE CSW end-point to deliver only the INSPIRE related metadata stored in the catalog. Other use cases can be useful to create CSW end-points for metadata related to specific theme/s: climate, boundaries, etc. |
| 33 | |
| 34 | |
| 35 | == Proposal == |
| 36 | |
| 37 | Add the capability to have custom CSW entry points that apply extra criteria to the CSW request. A new CSW service entry point is defined in a configuration file {{{config-csw-servers.xml}}} using the following syntax: |
| 38 | |
| 39 | {{{ |
| 40 | <service name="csw-with-my-filter"> |
| 41 | <class name=".services.main.CswDispatcher" > |
| 42 | <param name="filter" value="+inspirerelated:on |
| 43 | +themekey:environment"/> |
| 44 | </class> |
| 45 | </service> |
| 46 | }}} |
| 47 | |
| 48 | The "filter" parameter value is the filter to apply to Lucene query using Lucene query syntax ( http://lucene.apache.org/java/2_9_1/queryparsersyntax.html). Allows OR and AND operators. |
| 49 | |
| 50 | The "filter" is applied in these CSW operations: |
| 51 | |
| 52 | * !GetRecords |
| 53 | * !GetRecordById |
| 54 | * !GetDomain |
| 55 | |
| 56 | It's possible to define several services for CSW end-points that apply different filter criteria: |
| 57 | |
| 58 | {{{ |
| 59 | <service name="csw-with-my-filter-environment"> |
| 60 | <class name=".services.main.CswDispatcher" > |
| 61 | <param name="filter" value="+inspirerelated:on +themekey:environment"/> |
| 62 | </class> |
| 63 | </service> |
| 64 | |
| 65 | <service name="csw-with-my-filter-climate"> |
| 66 | <class name=".services.main.CswDispatcher" > |
| 67 | <param name="filter" value="+inspirerelated:on +themekey:climate"/> |
| 68 | </class> |
| 69 | </service> |
| 70 | }}} |
| 71 | |
| 72 | Adding new services require: |
| 73 | |
| 74 | * Create the service definition in a configuration file {{{config-csw-servers.xml}}} with the custom filter criteria. |
| 75 | * Define permissions for the service in {{{user-profiles.xml}}} file. |
| 76 | * Restart of the application. |
| 77 | |
| 78 | The issue #660 contains a patch to review with the implementation of this proposal. |
| 79 | |
| 80 | === Backwards Compatibility Issues === |
| 81 | The default CSW endpoint behavior is not changed, working as in actual version. |
| 82 | |
| 83 | == Risks == |
| 84 | |
| 85 | == Participants == |
| 86 | * Francois Prunayre |
| 87 | * Heikki Doeleman |
| 88 | * Jose García |