Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ckanext-odsh
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
ckanext-odsh
Commits
5964ff41
Commit
5964ff41
authored
1 year ago
by
Thorge Petersen
Browse files
Options
Downloads
Patches
Plain Diff
Removed duplicate code
parent
164be02a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ckanext/odsh/profiles/odsh_dcat_de_profile.py
+0
-21
0 additions, 21 deletions
ckanext/odsh/profiles/odsh_dcat_de_profile.py
with
0 additions
and
21 deletions
ckanext/odsh/profiles/odsh_dcat_de_profile.py
+
0
−
21
View file @
5964ff41
...
@@ -145,27 +145,6 @@ class ODSHDCATdeProfile(DCATdeProfile):
...
@@ -145,27 +145,6 @@ class ODSHDCATdeProfile(DCATdeProfile):
created
,
datatype
=
"
http://www.w3.org/2001/XMLSchema#dateTime
"
))
created
,
datatype
=
"
http://www.w3.org/2001/XMLSchema#dateTime
"
))
)
)
def
_add_modified_and_issued
(
self
,
dataset_dict
,
dataset_ref
):
'''
Adds distributions last_modified and created values to
dcat:modified and dcat:issued.
'''
for
distribution
in
self
.
g
.
objects
(
dataset_ref
,
DCAT
.
distribution
):
for
resource_dict
in
dataset_dict
.
get
(
'
resources
'
,
[]):
# Match distribution in graph and distribution in ckan-dict
if
str
(
distribution
)
==
resource_uri
(
resource_dict
):
last_modified
=
resource_dict
.
get
(
'
last_modified
'
,
None
)
if
last_modified
:
self
.
g
.
set
(
(
distribution
,
DCT
.
modified
,
rdflib
.
Literal
(
last_modified
,
datatype
=
"
http://www.w3.org/2001/XMLSchema#dateTime
"
))
)
created
=
resource_dict
.
get
(
'
created
'
,
None
)
if
created
:
self
.
g
.
set
(
(
distribution
,
DCT
.
issued
,
rdflib
.
Literal
(
created
,
datatype
=
"
http://www.w3.org/2001/XMLSchema#dateTime
"
))
)
def
_add_version
(
self
,
dataset_dict
,
dataset_ref
):
def
_add_version
(
self
,
dataset_dict
,
dataset_ref
):
'''
'''
Adds CKAN isReplacedBy extra field to dublin core isReplacedBy and sets version information.
Adds CKAN isReplacedBy extra field to dublin core isReplacedBy and sets version information.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment