EOFarm / geoportal.ypen.gr

0 stars 0 forks source link

ATOM download service #18

Open kalxas opened 2 years ago

kalxas commented 2 years ago

Documentation:

kalxas commented 2 years ago

Some more instructions: https://github.com/geonetwork/core-geonetwork/issues/1899

kalxas commented 2 years ago

https://github.com/titellus/core-geonetwork/wiki/Inspire-Download-Service-As-Atom

kalxas commented 2 years ago

As a reference: https://en.wikipedia.org/wiki/Atom_(Web_standard)

kalxas commented 2 years ago

Some examples of current deployment

GN record: http://beta.geoportal.ypen.gr/geonetwork/srv/eng/catalog.search#/metadata/3c66ab4d-4c64-96df-9c0f-976dc9d0d00b

ISO record: http://beta.geoportal.ypen.gr/geonetwork/srv/api/records/3c66ab4d-4c64-96df-9c0f-976dc9d0d00b/formatters/xml

OpenSearch endpoint: http://beta.geoportal.ypen.gr/geonetwork/srv/eng/portal.opensearch

Atom record (internal mode): http://beta.geoportal.ypen.gr/geonetwork/srv/atom/describe/dataset?spatial_dataset_identifier_code=http://nsdi.gov.gr/set/dataset/MINNENV/aqd-data

kalxas commented 2 years ago

More references on OGC OpenSearch extensions:

https://www.ogc.org/standards/opensearchgeo https://www.ogc.org/standards/opensearch-eo

kalxas commented 2 years ago

Folder created to store the custom atom files: http://beta.geoportal.ypen.gr/atom/

grigoriouelena commented 2 years ago

Testing the atom/opensearch functionality of Geonetwork

Steps:

  1. create dataset & service metadata files & upload them in the catalog [(](http://beta.geoportal.ypen.gr/geonetwork/srv/api/records/a08db9f1-0766-4a9f-87ae-121ed431164c/formatters/xml & http://beta.geoportal.ypen.gr/geonetwork/srv/api/records/92f4ad89-eebc-4f59-a8d8-e4683130979c/formatters/xml))
  2. create dataset & service atom feeds, according to the guidelines of the download service TG
  3. store the atom feeds in the folder beta.geoportal.ypen.gr/atom along with the gml files
  4. link the metadata records with the atom feeds, according to the instructions here ()
  5. use the geonetwork atom harvester (only the service atom feed is harvested - not sure if this is correct)
  6. validate the implementation (ATOM_Validation_1.html ATOM_Validation_1.zip ) 5.1 Validation report analysis • OpenSearch Description / Get Spatial Dataset Operation

TG Requirement 43: The OpenSearch description shall contain a 'Url' element that describes a template URL for the Get Spatial Data Set operation. This template shall accept the INSPIRE parameters 'crs', 'spatial_dataset_identifier_code', 'spatial_dataset_identifier_namespace' and the OpenSearch 'language' parameter. The 'Url' element shall have an attribute 'type' with a value corresponding to the media type of the result and an attribute 'rel' with the value 'results'.

OpenSearch description document for the tested service: url: http://beta.geoportal.ypen.gr/geonetwork/opensearch/eng/92f4ad89-eebc-4f59-a8d8-e4683130979c/OpenSearchDescription.xml

response: correct OpenSearch Description response

Try to get the dataset using the template from the OpenSearch response (Get Spatial Dataset Url): http://beta.geoportal.ypen.gr/geonetwork/opensearch/eng/download?spatial_dataset_identifier_code=aqddataatom&spatial_dataset_identifier_namespace=http://nsdi.gov.gr/set/dataset/MINNENV/&crs=http://www.opengis.net/def/crs/EPSG/0/4258&language=en

response: {"error": { "message": "Metadata not found" , "class": "MetadataNotFoundEx" , "request": {} } }

I notice that the attribute inspire_dls:crs is not set in the service atom feed, like the other two (inspire_dls:spatial_dataset_identifier_code and inspire_dls:spatial_dataset_identifier_namespace).

I checked the inspire_dls xsd here and I see that this attribute is

so I go back to the service feed and add this element

http://www.opengis.net/def/crs/EPSG/0/4258 Unfortunately, the get spatial dataset operation, using the above url does not work. And, closing, the attribute “type” of the above Get Spatial Dataset Url, is empty and I do not know how to provide a value for this also. • OpenSearch Description / Describe Spatial Dataset Operation TG Requirement 42: The OpenSearch description shall contain a 'Url' element that describes a template URL for the Describe Spatial Data Set operation. This template shall accept the INSPIRE parameters 'spatial_dataset_identifier_code', 'spatial_dataset_identifier_namespace' and the OpenSearch 'language' parameter. The 'Url' element shall have an attribute 'type' with a value of 'application/atom+xml' and an attribute 'rel' with the value 'describedby'. Try to get the description of the dataset using the template in red bold (Describe Spatial Dataset Url): http://beta.geoportal.ypen.gr:/geonetwork/opensearch/eng/describe?spatial_dataset_identifier_code=aqddataatom&spatial_dataset_identifier_namespace=http://nsdi.gov.gr/set/dataset/MINNENV/&language=en response: {"error": { "message": "Metadata not found" , "class": "MetadataNotFoundEx" , "request": {} } } • OpenSearch Description / Query example for each dataset The test case was skipped because it depends on other test cases that failed or were skipped as well. Check the cause of the problem by checking failed test cases which this test case depends on. • OpenSearch Description / URI to itself TG Requirement 40: The OpenSearch description shall contain a 'Url' element that describes an HTTP URI for the OpenSearch Description document. The value of the 'rel' attribute of this element shall be 'self', the value of the 'type' attribute shall be 'application/opensearchdescription+xml' and the value of the 'template' attribute shall be the HTTP URI of the document. The relevant Url http://beta.geoportal.ypen.gr:/geonetwork/opensearch/eng/92f4ad89-eebc-4f59-a8d8-e4683130979c/OpenSearchDescription.xml contains an extra semicolon, which might be the reason the test fails.
kalxas commented 2 years ago

Need to set the port number on Service Settings

image

kalxas commented 2 years ago

Those internal opensearch links seem to work:

http://beta.geoportal.ypen.gr/geonetwork/srv/eng/rss.search?any=92f4ad89-eebc-4f59-a8d8-e4683130979c

http://beta.geoportal.ypen.gr/geonetwork/srv/eng/rss.search?any=a08db9f1-0766-4a9f-87ae-121ed431164c

grigoriouelena commented 2 years ago

After the insertion of the port number in Admin console > Settings (port number=80), the test "OpesearchDescription > URI to itself" passed succesfully.

The "Get Spatial Dataset Operation" and "Describe Spatial Dataset Operation" still fail though.

The issue is reported upstream here https://github.com/geonetwork/core-geonetwork/issues/6086