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
29dfcca7
Commit
29dfcca7
authored
2 years ago
by
Thorge Petersen
Browse files
Options
Downloads
Patches
Plain Diff
Workaround for long running collection relation item name to id conversion
parent
b16d94bc
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!34
Workaround for long running collection relation item name to id conversion
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ckanext/odsh/profiles/odsh_dcat_de_profile.py
+6
-0
6 additions, 0 deletions
ckanext/odsh/profiles/odsh_dcat_de_profile.py
with
6 additions
and
0 deletions
ckanext/odsh/profiles/odsh_dcat_de_profile.py
+
6
−
0
View file @
29dfcca7
...
@@ -27,6 +27,7 @@ class ODSHDCATdeProfile(DCATdeProfile):
...
@@ -27,6 +27,7 @@ class ODSHDCATdeProfile(DCATdeProfile):
)
)
self
.
_parse_distributions
(
dataset_dict
,
dataset_ref
)
self
.
_parse_distributions
(
dataset_dict
,
dataset_ref
)
self
.
_parse_type
(
dataset_dict
,
dataset_ref
)
self
.
_parse_type
(
dataset_dict
,
dataset_ref
)
self
.
_parse_references
(
dataset_dict
,
dataset_ref
)
if
self
.
_belongs_to_collection
(
dataset_dict
,
dataset_ref
):
if
self
.
_belongs_to_collection
(
dataset_dict
,
dataset_ref
):
self
.
_mark_for_adding_to_ckan_collection
(
dataset_dict
,
dataset_ref
)
self
.
_mark_for_adding_to_ckan_collection
(
dataset_dict
,
dataset_ref
)
return
dataset_dict
return
dataset_dict
...
@@ -50,6 +51,11 @@ class ODSHDCATdeProfile(DCATdeProfile):
...
@@ -50,6 +51,11 @@ class ODSHDCATdeProfile(DCATdeProfile):
ckan_type
=
helpers_tpsh
.
map_dct_type_to_ckan_type
(
str
(
dct_type
))
ckan_type
=
helpers_tpsh
.
map_dct_type_to_ckan_type
(
str
(
dct_type
))
dataset_dict
.
update
({
'
type
'
:
ckan_type
})
dataset_dict
.
update
({
'
type
'
:
ckan_type
})
def
_parse_references
(
self
,
dataset_dict
,
dataset_ref
):
value
=
self
.
_object
(
dataset_ref
,
DCT
.
references
)
if
value
:
ds_utils
.
insert_new_extras_field
(
dataset_dict
,
'
reference
'
,
value
)
def
_belongs_to_collection
(
self
,
dataset_dict
,
dataset_ref
):
def
_belongs_to_collection
(
self
,
dataset_dict
,
dataset_ref
):
dct_is_version_of
=
self
.
_object
(
dataset_ref
,
DCT
.
isVersionOf
)
dct_is_version_of
=
self
.
_object
(
dataset_ref
,
DCT
.
isVersionOf
)
belongs_to_collection
=
True
if
dct_is_version_of
else
False
belongs_to_collection
=
True
if
dct_is_version_of
else
False
...
...
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