Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dcat-catalog-proxy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open-Data
dcat-catalog-proxy
Merge requests
!2
Resolve "dct:rights Statement für Distributionen"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "dct:rights Statement für Distributionen"
2-dct-rights-statement-fuer-distributionen
into
master
Overview
0
Commits
1
Pipelines
0
Changes
2
Merged
Jesper Zedlitz
requested to merge
2-dct-rights-statement-fuer-distributionen
into
master
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
2
Expand
Closes
#2 (closed)
Edited
3 years ago
by
Jesper Zedlitz
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
8b1c32cb
1 commit,
3 years ago
2 files
+
47
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
src/main/java/de/landsh/opendata/catalogproxy/CatalogFilter.java
+
21
−
0
Options
@@ -74,6 +74,7 @@ public class CatalogFilter implements InitializingBean {
rewriteDownloadAndAccessURLs
(
model
);
addDownloadURLs
(
model
);
addAccessRights
(
model
);
addRights
(
model
);
return
model
;
}
@@ -292,4 +293,24 @@ public class CatalogFilter implements InitializingBean {
urlReplacements
.
put
(
source
,
target
);
}
}
/**
* Add a dct:rights statement to Distributions. The German DCAT-AP.de treats dct:rights as a not so
* important optional property and relies on dct:license. However, the European data portal values the
* dct:rights property highly.
*/
void
addRights
(
Model
model
)
{
final
ResIterator
it
=
model
.
listSubjectsWithProperty
(
RDF
.
type
,
DCAT
.
Distribution
);
while
(
it
.
hasNext
())
{
final
Resource
distribution
=
it
.
next
();
final
Resource
rights
=
distribution
.
getPropertyResourceValue
(
DCTerms
.
rights
);
final
Resource
license
=
distribution
.
getPropertyResourceValue
(
DCTerms
.
license
);
if
(
rights
==
null
&&
license
!=
null
)
{
distribution
.
addProperty
(
DCTerms
.
rights
,
license
);
}
}
}
}
Loading