Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
limbra
limbra
Commits
d12fef74
Commit
d12fef74
authored
Jan 07, 2021
by
LE GAC Renaud
Browse files
Update Record with a better coding for oai and oai_url
parent
9bba88a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
18 deletions
+4
-18
modules/store_tools/record.py
modules/store_tools/record.py
+4
-18
No files found.
modules/store_tools/record.py
View file @
d12fef74
...
...
@@ -234,15 +234,8 @@ class Record(dict):
an empty string when it is not defined.
"""
oai_1
=
self
.
primary_oai
()
if
not
oai_1
:
return
""
oai_2
=
self
.
secondary_oai
()
if
not
oai_2
:
return
oai_1
return
"%s, %s"
%
(
oai_1
,
oai_2
)
lst
=
[
self
.
primary_oai
(),
self
.
secondary_oai
()]
return
", "
.
join
(
lst
).
strip
(
", "
)
def
oai_url
(
self
):
"""The Open Archive Initiative identifier URL(s).
...
...
@@ -255,15 +248,8 @@ class Record(dict):
not well formed.
"""
oai_url_1
=
self
.
primary_oai_url
()
if
not
oai_url_1
:
return
""
oai_url_2
=
self
.
secondary_oai_url
()
if
not
oai_url_2
:
return
oai_url_1
return
"%s, %s"
%
(
oai_url_1
,
oai_url_2
)
lst
=
[
self
.
primary_oai_url
(),
self
.
secondary_oai_url
()]
return
", "
.
join
(
lst
).
strip
(
", "
)
def
primary_oai
(
self
):
"""The primary Open Archive Initiative identifier.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment