Skip to content

Commit 56f54c6

Browse files
committed
Initial version 0.9.0
0 parents  commit 56f54c6

35 files changed

+8494
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
target
2+
*.swp

LICENSE.md

+193
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
# Apache License
2+
3+
_Version 2.0, January 2004_
4+
_&lt;<http://www.apache.org/licenses/>&gt;_
5+
6+
### Terms and Conditions for use, reproduction, and distribution
7+
8+
#### 1. Definitions
9+
10+
“License” shall mean the terms and conditions for use, reproduction, and
11+
distribution as defined by Sections 1 through 9 of this document.
12+
13+
“Licensor” shall mean the copyright owner or entity authorized by the copyright
14+
owner that is granting the License.
15+
16+
“Legal Entity” shall mean the union of the acting entity and all other entities
17+
that control, are controlled by, or are under common control with that entity.
18+
For the purposes of this definition, “control” means **(i)** the power, direct
19+
or indirect, to cause the direction or management of such entity, whether by
20+
contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of
21+
the outstanding shares, or **(iii)** beneficial ownership of such entity.
22+
23+
“You” (or “Your”) shall mean an individual or Legal Entity exercising
24+
permissions granted by this License.
25+
26+
“Source” form shall mean the preferred form for making modifications, including
27+
but not limited to software source code, documentation source, and configuration
28+
files.
29+
30+
“Object” form shall mean any form resulting from mechanical transformation or
31+
translation of a Source form, including but not limited to compiled object code,
32+
generated documentation, and conversions to other media types.
33+
34+
“Work” shall mean the work of authorship, whether in Source or Object form, made
35+
available under the License, as indicated by a copyright notice that is included
36+
in or attached to the work (an example is provided in the Appendix below).
37+
38+
“Derivative Works” shall mean any work, whether in Source or Object form, that
39+
is based on (or derived from) the Work and for which the editorial revisions,
40+
annotations, elaborations, or other modifications represent, as a whole, an
41+
original work of authorship. For the purposes of this License, Derivative Works
42+
shall not include works that remain separable from, or merely link (or bind by
43+
name) to the interfaces of, the Work and Derivative Works thereof.
44+
45+
“Contribution” shall mean any work of authorship, including the original version
46+
of the Work and any modifications or additions to that Work or Derivative Works
47+
thereof, that is intentionally submitted to Licensor for inclusion in the Work
48+
by the copyright owner or by an individual or Legal Entity authorized to submit
49+
on behalf of the copyright owner. For the purposes of this definition,
50+
“submitted” means any form of electronic, verbal, or written communication sent
51+
to the Licensor or its representatives, including but not limited to
52+
communication on electronic mailing lists, source code control systems, and
53+
issue tracking systems that are managed by, or on behalf of, the Licensor for
54+
the purpose of discussing and improving the Work, but excluding communication
55+
that is conspicuously marked or otherwise designated in writing by the copyright
56+
owner as “Not a Contribution.”
57+
58+
“Contributor” shall mean Licensor and any individual or Legal Entity on behalf
59+
of whom a Contribution has been received by Licensor and subsequently
60+
incorporated within the Work.
61+
62+
#### 2. Grant of Copyright License
63+
64+
Subject to the terms and conditions of this License, each Contributor hereby
65+
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
66+
irrevocable copyright license to reproduce, prepare Derivative Works of,
67+
publicly display, publicly perform, sublicense, and distribute the Work and such
68+
Derivative Works in Source or Object form.
69+
70+
#### 3. Grant of Patent License
71+
72+
Subject to the terms and conditions of this License, each Contributor hereby
73+
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
74+
irrevocable (except as stated in this section) patent license to make, have
75+
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
76+
such license applies only to those patent claims licensable by such Contributor
77+
that are necessarily infringed by their Contribution(s) alone or by combination
78+
of their Contribution(s) with the Work to which such Contribution(s) was
79+
submitted. If You institute patent litigation against any entity (including a
80+
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
81+
Contribution incorporated within the Work constitutes direct or contributory
82+
patent infringement, then any patent licenses granted to You under this License
83+
for that Work shall terminate as of the date such litigation is filed.
84+
85+
#### 4. Redistribution
86+
87+
You may reproduce and distribute copies of the Work or Derivative Works thereof
88+
in any medium, with or without modifications, and in Source or Object form,
89+
provided that You meet the following conditions:
90+
91+
* **(a)** You must give any other recipients of the Work or Derivative Works a
92+
copy of this License; and
93+
* **(b)** You must cause any modified files to carry prominent notices stating
94+
that You changed the files; and
95+
* **(c)** You must retain, in the Source form of any Derivative Works that You
96+
distribute, all copyright, patent, trademark, and attribution notices from the
97+
Source form of the Work, excluding those notices that do not pertain to any
98+
part of the Derivative Works; and
99+
* **(d)** If the Work includes a “NOTICE” text file as part of its distribution,
100+
then any Derivative Works that You distribute must include a readable copy of
101+
the attribution notices contained within such NOTICE file, excluding those
102+
notices that do not pertain to any part of the Derivative Works, in at least
103+
one of the following places: within a NOTICE text file distributed as part of
104+
the Derivative Works; within the Source form or documentation, if provided
105+
along with the Derivative Works; or, within a display generated by the
106+
Derivative Works, if and wherever such third-party notices normally appear.
107+
The contents of the NOTICE file are for informational purposes only and do not
108+
modify the License. You may add Your own attribution notices within Derivative
109+
Works that You distribute, alongside or as an addendum to the NOTICE text from
110+
the Work, provided that such additional attribution notices cannot be
111+
construed as modifying the License.
112+
113+
You may add Your own copyright statement to Your modifications and may provide
114+
additional or different license terms and conditions for use, reproduction, or
115+
distribution of Your modifications, or for any such Derivative Works as a whole,
116+
provided Your use, reproduction, and distribution of the Work otherwise complies
117+
with the conditions stated in this License.
118+
119+
#### 5. Submission of Contributions
120+
121+
Unless You explicitly state otherwise, any Contribution intentionally submitted
122+
for inclusion in the Work by You to the Licensor shall be under the terms and
123+
conditions of this License, without any additional terms or conditions.
124+
Notwithstanding the above, nothing herein shall supersede or modify the terms of
125+
any separate license agreement you may have executed with Licensor regarding
126+
such Contributions.
127+
128+
#### 6. Trademarks
129+
130+
This License does not grant permission to use the trade names, trademarks,
131+
service marks, or product names of the Licensor, except as required for
132+
reasonable and customary use in describing the origin of the Work and
133+
reproducing the content of the NOTICE file.
134+
135+
#### 7. Disclaimer of Warranty
136+
137+
Unless required by applicable law or agreed to in writing, Licensor provides the
138+
Work (and each Contributor provides its Contributions) on an “AS IS” BASIS,
139+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
140+
including, without limitation, any warranties or conditions of TITLE,
141+
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
142+
solely responsible for determining the appropriateness of using or
143+
redistributing the Work and assume any risks associated with Your exercise of
144+
permissions under this License.
145+
146+
#### 8. Limitation of Liability
147+
148+
In no event and under no legal theory, whether in tort (including negligence),
149+
contract, or otherwise, unless required by applicable law (such as deliberate
150+
and grossly negligent acts) or agreed to in writing, shall any Contributor be
151+
liable to You for damages, including any direct, indirect, special, incidental,
152+
or consequential damages of any character arising as a result of this License or
153+
out of the use or inability to use the Work (including but not limited to
154+
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
155+
any and all other commercial damages or losses), even if such Contributor has
156+
been advised of the possibility of such damages.
157+
158+
#### 9. Accepting Warranty or Additional Liability
159+
160+
While redistributing the Work or Derivative Works thereof, You may choose to
161+
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
162+
other liability obligations and/or rights consistent with this License. However,
163+
in accepting such obligations, You may act only on Your own behalf and on Your
164+
sole responsibility, not on behalf of any other Contributor, and only if You
165+
agree to indemnify, defend, and hold each Contributor harmless for any liability
166+
incurred by, or claims asserted against, such Contributor by reason of your
167+
accepting any such warranty or additional liability.
168+
169+
_END OF TERMS AND CONDITIONS_
170+
171+
### APPENDIX: How to apply the Apache License to your work
172+
173+
To apply the Apache License to your work, attach the following boilerplate
174+
notice, with the fields enclosed by brackets `[]` replaced with your own
175+
identifying information. (Don't include the brackets!) The text should be
176+
enclosed in the appropriate comment syntax for the file format. We also
177+
recommend that a file or class name and description of purpose be included on
178+
the same “printed page” as the copyright notice for easier identification within
179+
third-party archives.
180+
181+
Copyright [yyyy] [name of copyright owner]
182+
183+
Licensed under the Apache License, Version 2.0 (the "License");
184+
you may not use this file except in compliance with the License.
185+
You may obtain a copy of the License at
186+
187+
http://www.apache.org/licenses/LICENSE-2.0
188+
189+
Unless required by applicable law or agreed to in writing, software
190+
distributed under the License is distributed on an "AS IS" BASIS,
191+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
192+
See the License for the specific language governing permissions and
193+
limitations under the License.

NOTICE

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
Copyright (C) 2016 con terra GmbH
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.
14+
15+
16+
=========================================================================
17+
== Apache Notice ==
18+
=========================================================================
19+
20+
This product includes software developed by
21+
The Apache Software Foundation (http://www.apache.org/).
22+
23+
=========================================================================
24+
== Spring Notice ==
25+
=========================================================================
26+
27+
This product includes software developed by
28+
the Apache Software Foundation (http://www.apache.org).
29+
30+
This product also includes software developed by
31+
Clinton Begin (http://www.ibatis.com).
32+
33+
The end-user documentation included with a redistribution, if any,
34+
must include the following acknowledgement:
35+
36+
"This product includes software developed by the Spring Framework
37+
Project (http://www.springframework.org)."
38+
39+
Alternately, this acknowledgement may appear in the software itself,
40+
if and wherever such third-party acknowledgements normally appear.
41+
42+
The names "Spring" and "Spring Framework" must not be used to
43+
endorse or promote products derived from this software without
44+
prior written permission. For written permission, please contact
45+
rod.johnson@interface21.com or juergen.hoeller@interface21.com.
46+
47+
=========================================================================
48+
== H2 Notice ==
49+
=========================================================================
50+
51+
This software contains unmodified binary redistributions for
52+
H2 database engine (http://www.h2database.com/),
53+
which is dual licensed and available under the MPL 2.0
54+
(Mozilla Public License) or under the EPL 1.0 (Eclipse Public License).
55+
An original copy of the license agreement can be found at:
56+
http://www.h2database.com/html/license.html

README.md

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# open.nrw-fassaden (Version: 0.9.0-SNAPSHOT)
2+
Facades for open.nrw: Provide CKAN data to the catalog service of the Geoportal and vice versa.
3+
4+
##### Overview
5+
6+
* Provides an OAI-PMH interface to harvest ISO 19139 metadata from CSW (INSPIRE catalogs) and returns it in DCAT-AP schema
7+
* Provides an OAI-PMH interface to harvest DCAT-AP metadata from CKAN and returns it in ISO 19139 schema (STILL WORK IN PROGRESS)
8+
* Deployed as a web application in Java servlet container
9+
* Implementation is based on Apache Camel
10+
11+
##### Requirements
12+
13+
* JRE 8
14+
* Tomcat 8
15+
16+
##### Building with Apache Maven
17+
18+
1. cd to the root folder of this project (the folder that contains the pom.xml and this readme)
19+
2. from the command line run
20+
21+
> mvn clean package
22+
23+
##### Deployment
24+
25+
Use your preferred method to deploy the webapp in Tomcat, e.g.:
26+
27+
* Copy the war file to the Tomcat webapps folder
28+
* Create a context file in the Tomcat host folder
29+
30+
##### Configuration
31+
32+
Logging can be configured with the log4j framework (see http://logging.apache.org/log4j/1.2/).
33+
By default a logfile is created here: tomcat/logs/open-nrw-ci-fassaden.log.
34+
35+
If you build with the env-dev profile, you can set your parameters during build, by including a build.poperties
36+
file in the modile base directory. Please check the pom.xml
37+
to see how parameters are set. The parameters can be changed after deployment in the file
38+
camel-oai-pmh.properties. The available parameters are:
39+
40+
* oai-pmh.base.url.external: URL that external clients use to access the OAI-PMH interface web application
41+
* db.item.csw.TYPE: should be one of inspire, inspireSoap11 or inspireSoap11, depending on the protocol of the Geoportal
42+
* db.item.csw.URL: GetRecords URL of the geoportal to be harvested
43+
* db.item.ckan.TYPE: currently only ckan is supported
44+
* db.item.ckan.URL: CKAN catalog URL to be harvested
45+
46+
Note on HTTPS: There are a few catalogs that use HTTPS connections. However, some use self-signed certificates, or
47+
certificates from a CA that is not trusted by the JVM per default. In order to allow integration of such catalogs,
48+
the Facades trusts all server certificates. Of course this is insecure, as it makes the harvester vulnerable
49+
to man-in-the-middle attacks. But the same is true for catalogs that are connected via plain HTTP (ca. 90% of
50+
catalogs), so this vulnerability is inherent as long as HTTP connections are allowed.
51+
If you require trusted connections via HTTPS, just remove the bean
52+
eu.odp.harvest.geo.oai.http.AllowAllHttpClientConfig from the Apache Camel Spring configuration
53+
(/WEB-INF/classes/camel-oai-pmh.xml).
54+
55+
## Usage
56+
57+
##### OAI-PMH
58+
59+
Each Facades is exposed by a distinct HTTP endpoint. The endpoints are reached with this URL pattern:
60+
61+
<tomcat-base-url><webapp-path>/omdf/<harvester>?<verb=operation>&<OPTIONAL argument>
62+
63+
So for example if tomcat-base-url is "http://localhost:8080", webapp-path is "/" and
64+
you have a harvester "gp-csw" for the Geoportal, you can reach it with this URL:
65+
66+
http://localhost:8080/omdf/gp-csw
67+
68+
a harvester "gp-ckan" for the NRW open data portal:
69+
70+
http://localhost:8080/omdf/gp-ckan
71+
72+
You can issue OAI-PMH requests to all of the available endpoints. All endpoints support the same set of operations.
73+
74+
Supported operations:
75+
* <b>ListIdentifiers</b>: 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.
76+
* <b>ListRecords</b>: 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.
77+
* <b>GetRecord</b>: 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.
78+
79+
Operations arguments:
80+
* <b>ListIdentifiers</b>
81+
* <b>from</b> 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.
82+
* <b>until</b> 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.
83+
* <b>resumptionToken</b> an EXCLUSIVE argument with a value that is the flow control token returned by a previous ListIdentifiers request that issued a partial response.
84+
* Example:<br>
85+
http://localhost:8080/omdf/gp-csw?verb=ListIdentifiers&from=2018-06-26&until=2018-07-01<br>
86+
http://localhost:8080/omdf/gp-ckan?verb=ListIdentifiers&from=2018-06-26
87+
88+
* <b>ListRecords</b>
89+
* <b>from</b> an optional argument with a UTCdatetime value, which specifies a lower bound for datestamp-based selective harvesting.
90+
* <b>until</b> an optional argument with a UTCdatetime value, which specifies a upper bound for datestamp-based selective harvesting.
91+
* <b>resumptionToken</b> an EXCLUSIVE argument with a value that is the flow control token returned by a previous ListIdentifiers request that issued a partial response.
92+
* Example:<br>
93+
http://localhost:8080/omdf/gp-csw?verb=ListRecords&from=2018-06-26&until=2018-07-01<br>
94+
http://localhost:8080/omdf/gp-ckan?verb=ListRecords&from=2018-06-26
95+
96+
* <b>GetRecord</b>
97+
* <b>identifier</b> a required argument that specifies the unique identifier of the item in the repository from which the record must be disseminated.
98+
* Example:<br>
99+
http://localhost:8080/omdf/gp-csw?verb=GetRecord&identifier=2c0b2365-347e-44aa-a1c8-a67b7ca5328e<br>
100+
http://localhost:8080/omdf/gp-ckan?verb=GetRecord&identifier=d04a7b1e-3e60-4591-b04c-94912ac54afe
101+
102+
103+
##### Further Reading
104+
105+
* http://www.openarchives.org/OAI/openarchivesprotocol.html
106+
* http://www.w3.org/TR/vocab-dcat/
107+
* https://joinup.ec.europa.eu/asset/dcat_application_profile/description
108+
* https://joinup.ec.europa.eu/asset/dcat_application_profile/asset_release/geodcat-ap-v10
109+
* http://camel.apache.org/
110+

0 commit comments

Comments
 (0)