open.nrw-fassaden (Version: 2.2.0)
Facades for open.nrw: Provide CKAN data to the catalog service of the Geoportal and vice versa.
Overview
- Provides an OAI-PMH interface to harvest ISO 19139 metadata from CSW (INSPIRE catalogs) and returns it in DCAT-AP schema
- Provides an OAI-PMH interface to harvest DCAT-AP metadata from CKAN and returns it in ISO 19139 schema (STILL WORK IN PROGRESS)
- Deployed as a web application in Java servlet container
- Implementation is based on Apache Camel
Requirements
- JRE 11
- Tomcat 9
Building with Apache Maven
-
cd to the root folder of this project (the folder that contains the pom.xml and this readme)
-
from the command line run
> mvn clean package
Deployment
Use your preferred method to deploy the webapp in Tomcat, e.g.:
- Copy the war file to the Tomcat webapps folder
- Create a context file in the Tomcat host folder
Configuration
Logging can be configured with the log4j framework (see http://logging.apache.org/log4j/1.2/). By default a logfile is created here: tomcat/logs/open-nrw-ci-fassaden.log.
If you build with the env-dev profile, you can set your parameters during build, by including a build.poperties file in the modile base directory. Please check the pom.xml to see how parameters are set. The parameters can be changed after deployment in the file camel-oai-pmh.properties. The available parameters are:
- oai-pmh.base.url.external: URL that external clients use to access the OAI-PMH interface web application
- db.item.csw.TYPE: should be one of inspire, inspireSoap11 or inspireSoap11, depending on the protocol of the Geoportal
- db.item.csw.URL: GetRecords URL of the geoportal to be harvested
- db.item.ckan.TYPE: currently only ckan is supported
- db.item.ckan.URL: CKAN catalog URL to be harvested
Usage
OAI-PMH
Each Facades is exposed by a distinct HTTP endpoint. The endpoints are reached with this URL pattern:
<tomcat-base-url><webapp-path>/omdf/<harvester>?<verb=operation>&<OPTIONAL argument>
So for example if tomcat-base-url is "http://localhost:8080", webapp-path is "/" and you have a harvester "gp-csw" for the Geoportal, you can reach it with this URL:
http://localhost:8080/omdf/gp-csw
a harvester "gp-ckan" for the NRW open data portal:
http://localhost:8080/omdf/gp-ckan
You can issue OAI-PMH requests to all of the available endpoints. All endpoints support the same set of operations.
Supported operations:
- ListIdentifiers: This verb is used to retrieve the identifiers of records that can be harvested from a repository. Optional arguments permit selectivity of the identifiers - based on their membership in a specific Set in the repository or based on their modification, creation, or deletion within a specific date range.
- ListRecords: This verb is used to harvest records from a repository. Optional arguments permit selective harvesting of records based on set membership and/or datestamp. Depending on the repository's support for deletions, a returned header may have a status attribute of "deleted" if a record matching the arguments specified in the request has been deleted. No metadata will be present for records with deleted status.
- GetRecord: This verb is used to retrieve an individual metadata record from a repository. Required arguments specify the identifier of the item from which the record is requested and the format of the metadata that should be included in the record. Depending on the level at which a repository tracks deletions, a header with a "deleted" value for the status attribute may be returned, in case the metadata format specified by the metadataPrefix is no longer available from the repository or from the specified item.
Operations arguments:
-
ListIdentifiers
- from an OPTIONAL argument with a date value, which specifies that only the unique identifiers of records with a datestamp that is more recent than or equal to the specified date should be returned.
- until an OPTIONAL argument with a date value, which specifies that only the unique identifiers of records with a datestamp older than or equal to the specified date should be returned.
- resumptionToken an EXCLUSIVE argument with a value that is the flow control token returned by a previous ListIdentifiers request that issued a partial response.
-
ListRecords
- from an optional argument with a UTCdatetime value, which specifies a lower bound for datestamp-based selective harvesting.
- until an optional argument with a UTCdatetime value, which specifies a upper bound for datestamp-based selective harvesting.
- resumptionToken an EXCLUSIVE argument with a value that is the flow control token returned by a previous ListIdentifiers request that issued a partial response.
-
GetRecord
- identifier a required argument that specifies the unique identifier of the item in the repository from which the record must be disseminated.