Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
486bbe51
Commit
486bbe51
authored
Jul 22, 2021
by
Piotr Gawron
Browse files
unused method removed
parent
4e638a6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
rest-api/src/main/java/lcsb/mapviewer/api/BaseRestImpl.java
View file @
486bbe51
...
...
@@ -38,11 +38,9 @@ import lcsb.mapviewer.common.exception.InvalidArgumentException;
import
lcsb.mapviewer.common.exception.InvalidStateException
;
import
lcsb.mapviewer.common.exception.InvalidXmlSchemaException
;
import
lcsb.mapviewer.converter.Converter
;
import
lcsb.mapviewer.model.Article
;
import
lcsb.mapviewer.model.Project
;
import
lcsb.mapviewer.model.map.BioEntity
;
import
lcsb.mapviewer.model.map.MiriamData
;
import
lcsb.mapviewer.model.map.MiriamType
;
import
lcsb.mapviewer.model.map.reaction.Reaction
;
import
lcsb.mapviewer.model.map.species.Element
;
import
lcsb.mapviewer.modelutils.map.ElementUtils
;
...
...
@@ -114,30 +112,6 @@ public abstract class BaseRestImpl {
return
result
;
};
protected
Map
<
String
,
Object
>
createAnnotation
(
Article
article
)
{
Map
<
String
,
Object
>
result
=
new
TreeMap
<>();
if
(
article
!=
null
)
{
MiriamType
type
=
MiriamType
.
PUBMED
;
result
.
put
(
"link"
,
miriamConnector
.
getUrlString
(
new
MiriamData
(
MiriamType
.
PUBMED
,
article
.
getPubmedId
())));
result
.
put
(
"article"
,
article
);
result
.
put
(
"type"
,
type
);
result
.
put
(
"resource"
,
article
.
getId
());
}
return
result
;
}
protected
List
<
Map
<
String
,
Object
>>
createAnnotations
(
Collection
<
Article
>
references
)
{
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
for
(
Object
miriamData
:
references
)
{
if
(
miriamData
instanceof
Article
)
{
result
.
add
(
createAnnotation
((
Article
)
miriamData
));
}
else
{
throw
new
InvalidArgumentException
();
}
}
return
result
;
}
/**
* @return the modelService
* @see #modelService
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment