Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OnedataSim
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LAGO
Software
OnedataSim
Commits
424459b4
Unverified
Commit
424459b4
authored
3 years ago
by
rpaganmunoz
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Update do_share_onedata.py
Adding an extra line to the metadata for fulfilling Dublin core format
parent
220fb2fc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wrappers/do_share_onedata.py
+47
-38
47 additions, 38 deletions
wrappers/do_share_onedata.py
with
47 additions
and
38 deletions
wrappers/do_share_onedata.py
+
47
−
38
View file @
424459b4
...
...
@@ -36,6 +36,13 @@ OneData_FolderLevel0_id = ""
catalog_path_temp
=
""
# LOCAL FOLDER TO SAVE THE XML FILES
OneData_handleServiceId
=
""
# Data for dublin core format
xmlns_oaci_dc
=
'"
http://www.openarchives.org/OAI/2.0/oai_dc/
"'
xmlns_dc
=
'"
http://purl.org/dc/elements/1.1/
"'
xmlns_xsi
=
'"
http://www.w3.org/2001/XMLSchema-instance
"'
xsi_schemaLocation
=
'"
http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd
"'
oai_dc_content
=
'
xmlns:oai_dc=
'
+
xmlns_oaci_dc
+
'
xmlns:dc=
'
+
xmlns_dc
+
'
xmlns:xsi=
'
+
xmlns_xsi
+
'
xsi:schemaLocation=
'
+
xsi_schemaLocation
# own functions
...
...
@@ -178,6 +185,7 @@ def folder1_getattrs (handleservice_id, local_path, folder1_id, host, token):
print
(
allinfo_level1
[
'
handleId
'
])
else
:
print
(
'
creating handle
'
)
# UNCOMMENT FOR CREATING ALL MISSING HANDLES (NOT TESTED)
#OneData_createhandle(handleservice_id, allinfo_level1['shareId'], local_path, allinfo_level1['name'], host, token)
else
:
...
...
@@ -208,44 +216,45 @@ for p in all_level0['children']:
doc
,
tag
,
text
=
Doc
().
tagtext
()
with
tag
(
'
metadata
'
):
with
tag
(
'
dc:title
'
):
text
(
all_level1
[
'
title
'
])
with
tag
(
'
dc:creator
'
):
text
(
all_level1
[
"
creator
"
][
'
@id
'
])
with
tag
(
'
dc:date
'
):
text
(
all_level1
[
"
@graph
"
][
1
][
'
prov:endedAtTime
'
])
with
tag
(
'
dc:subject
'
):
text
(
'
High energy astrophysics
'
)
with
tag
(
'
dc:subject
'
):
text
(
'
http://astrothesaurus.org/uat/739
'
)
with
tag
(
'
dc:subject
'
):
text
(
'
Particle astrophysics
'
)
with
tag
(
'
dc:subject
'
):
text
(
'
http://astrothesaurus.org/uat/96
'
)
with
tag
(
'
dc:subject
'
):
text
(
'
Astronomical simulations
'
)
with
tag
(
'
dc:subject
'
):
text
(
'
http://astrothesaurus.org/uat/1857
'
)
with
tag
(
'
dc:rights
'
):
text
(
'
CC BY 4.0
'
)
with
tag
(
'
dc:rights
'
):
text
(
'
https://creativecommons.org/licenses/by/4.0/
'
)
with
tag
(
'
dc:rights
'
):
text
(
'
LAGO rights
'
)
with
tag
(
'
dc:rights
'
):
text
(
'
https://raw.githubusercontent.com/lagoproject/DMP/1.1/rights/lagoCommonRights.jsonld
'
)
with
tag
(
'
dc:description
'
):
text
(
all_level1
[
"
description
"
])
with
tag
(
'
dc:contributor
'
):
text
(
'
EGI Datahub
'
)
with
tag
(
'
dc:instrument
'
):
text
(
'
LAGO Observatory
'
)
with
tag
(
'
dc:contact
'
):
text
(
'
lago-eosc(at)lagoproject.net
'
)
with
tag
(
'
dc:discipline
'
):
text
(
'
Astrophysics and Astronomy
'
)
with
tag
(
'
dc:publisher
'
):
text
(
'
LAGO Collaboration
'
)
with
tag
(
'
oai_dc:dc
'
,
oai_dc_content
):
with
tag
(
'
dc:title
'
):
text
(
all_level1
[
'
title
'
])
with
tag
(
'
dc:creator
'
):
text
(
all_level1
[
"
creator
"
][
'
@id
'
])
with
tag
(
'
dc:date
'
):
text
(
all_level1
[
"
@graph
"
][
1
][
'
prov:endedAtTime
'
])
with
tag
(
'
dc:subject
'
):
text
(
'
High energy astrophysics
'
)
with
tag
(
'
dc:subject
'
):
text
(
'
http://astrothesaurus.org/uat/739
'
)
with
tag
(
'
dc:subject
'
):
text
(
'
Particle astrophysics
'
)
with
tag
(
'
dc:subject
'
):
text
(
'
http://astrothesaurus.org/uat/96
'
)
with
tag
(
'
dc:subject
'
):
text
(
'
Astronomical simulations
'
)
with
tag
(
'
dc:subject
'
):
text
(
'
http://astrothesaurus.org/uat/1857
'
)
with
tag
(
'
dc:rights
'
):
text
(
'
CC BY 4.0
'
)
with
tag
(
'
dc:rights
'
):
text
(
'
https://creativecommons.org/licenses/by/4.0/
'
)
with
tag
(
'
dc:rights
'
):
text
(
'
LAGO rights
'
)
with
tag
(
'
dc:rights
'
):
text
(
'
https://raw.githubusercontent.com/lagoproject/DMP/1.1/rights/lagoCommonRights.jsonld
'
)
with
tag
(
'
dc:description
'
):
text
(
all_level1
[
"
description
"
])
with
tag
(
'
dc:contributor
'
):
text
(
'
EGI Datahub
'
)
with
tag
(
'
dc:instrument
'
):
text
(
'
LAGO Observatory
'
)
with
tag
(
'
dc:contact
'
):
text
(
'
lago-eosc(at)lagoproject.net
'
)
with
tag
(
'
dc:discipline
'
):
text
(
'
Astrophysics and Astronomy
'
)
with
tag
(
'
dc:publisher
'
):
text
(
'
LAGO Collaboration
'
)
result
=
indent
(
doc
.
getvalue
(),
...
...
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