Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Genesys Backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Backend
Commits
473f89b2
Commit
473f89b2
authored
Nov 19, 2018
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Update GLIS if DOIs **are** provided
- My fault
parent
7b838e83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/main/java/org/genesys2/spring/config/AccessionListenersConfig.java
.../org/genesys2/spring/config/AccessionListenersConfig.java
+4
-2
No files found.
src/main/java/org/genesys2/spring/config/AccessionListenersConfig.java
View file @
473f89b2
...
...
@@ -68,7 +68,7 @@ public class AccessionListenersConfig {
}
return
new
AccessionModifiedListener
()
{
private
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
AccessionListenersConfig
.
class
+
".
g
lisUpdater"
);
private
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
AccessionListenersConfig
.
class
+
".
G
lisUpdater"
);
@Override
public
void
onUpdate
(
Collection
<
Accession
>
accessions
)
{
...
...
@@ -76,7 +76,7 @@ public class AccessionListenersConfig {
targets
.
addKwsItem
(
TermConstants
.
PASSPORT_DATA
);
accessions
.
stream
().
map
(
a
->
a
.
getDoi
()).
filter
(
doi
->
doi
!=
null
).
forEach
(
doi
->
targets
.
addDoisItem
(
doi
));
if
(
CollectionUtils
.
isEmpty
(
targets
.
getDois
()))
{
if
(
!
CollectionUtils
.
isEmpty
(
targets
.
getDois
()))
{
try
{
LOG
.
info
(
"Updating GLIS for {} accessions with DOIs"
,
targets
.
getDois
().
size
());
List
<
UpdatedTarget
>
glisResponse
=
glisGenesysApi
.
registerGenesysAsTarget
(
targets
);
...
...
@@ -90,6 +90,8 @@ public class AccessionListenersConfig {
}
catch
(
Throwable
e
)
{
LOG
.
error
(
"Error updating GLIS targets: {}"
,
e
.
getMessage
(),
e
);
}
}
else
{
LOG
.
info
(
"Updated {} accessions do not have DOIs assigned"
,
accessions
.
size
());
}
}
...
...
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