Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
13d4b2f1
Commit
13d4b2f1
authored
Sep 20, 2017
by
Matija Obreza
Browse files
Fixed dataset accession display
parent
7bda3986
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/genesys2/server/servlet/controller/DatasetController.java
View file @
13d4b2f1
...
...
@@ -18,9 +18,11 @@ package org.genesys2.server.servlet.controller;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.util.stream.Collectors
;
import
javax.servlet.http.HttpServletResponse
;
import
org.genesys2.server.model.elastic.AccessionDetails
;
import
org.genesys2.server.model.genesys.AccessionData
;
import
org.genesys2.server.model.genesys.Metadata
;
import
org.genesys2.server.model.impl.FaoInstitute
;
...
...
@@ -30,6 +32,7 @@ import org.genesys2.server.service.InstituteService;
import
org.genesys2.spring.ResourceNotFoundException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.ModelMap
;
...
...
@@ -52,9 +55,6 @@ public class DatasetController extends BaseController {
@Autowired
private
DatasetService
datasetService
;
@Autowired
private
Validator
validator
;
@Autowired
private
InstituteService
instituteService
;
...
...
@@ -79,7 +79,7 @@ public class DatasetController extends BaseController {
model
.
addAttribute
(
"faoInstitute"
,
faoInstitute
);
final
Page
<
AccessionData
>
accessions
=
genesysService
.
listMetadataAccessions
(
metadata
.
getId
(),
new
PageRequest
(
page
-
1
,
50
));
model
.
addAttribute
(
"pagedData"
,
accessions
);
model
.
addAttribute
(
"pagedData"
,
new
PageImpl
<
AccessionDetails
>(
genesysService
.
getAccessionDetails
(
accessions
.
getContent
().
stream
().
map
(
a
->
a
.
getId
()).
collect
(
Collectors
.
toList
())),
new
PageRequest
(
page
-
1
,
50
),
accessions
.
getTotalElements
())
);
// Map[accession.id][method.id]
model
.
addAttribute
(
"accessionMethods"
,
genesysService
.
getMetadataTraitValues
(
metadata
,
accessions
.
getContent
()));
...
...
src/main/webapp/WEB-INF/jsp/metadata/view.jsp
View file @
13d4b2f1
...
...
@@ -127,7 +127,7 @@
<td><local:accession
-details-link accession="${accession}"
/></td>
<%-- <td><a href="<c:url value="/geo/${accession.origin}" />"><c:out value="${accession.countryOfOrigin.getName(pageContext.response.locale)}" /></a></td>
--%>
<td><span
dir=
"ltr"
class=
"sci-name"
><c:out
escapeXml=
"false"
value=
"
${
accession
.
taxonomy
.
taxon
NameHtml
}
"
/></span></td>
<td><span
dir=
"ltr"
class=
"sci-name"
><c:out
escapeXml=
"false"
value=
"
${
accession
.
taxonomy
.
sci
NameHtml
}
"
/></span></td>
<%-- <td><a href="<c:url value="/wiews/${accession.institute.code}" />"><c:out value="${accession.institute.code}" /></a></td>
<td><a href="<c:url value="/geo/${accession.institute.country.code3}" />"><c:out value="${accession.institute.country.getName(pageContext.response.locale)}" /></a></td>
--%>
...
...
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