Commit ce973bc7 authored by Matija Obreza's avatar Matija Obreza

Enhanced SGSV records with unitId and acceUrl

parent c8a881d5
......@@ -33,6 +33,9 @@ public class SvalbardData implements java.io.Serializable {
private String boxNo;
private String taxonomy;
private int version;
private Long unitId;
@Column(length = 300, nullable = true)
private String acceUrl;
@Id
@Column(name = "id")
......@@ -87,4 +90,20 @@ public class SvalbardData implements java.io.Serializable {
public void setVersion(int version) {
this.version = version;
}
public void setUnitId(Long unitId) {
this.unitId = unitId;
}
public Long getUnitId() {
return unitId;
}
public String getAcceUrl() {
return acceUrl;
}
public void setAcceUrl(String acceUrl) {
this.acceUrl = acceUrl;
}
}
......@@ -31,6 +31,8 @@ class SGSVEntry implements AccessionIdentifier3 {
String boxNo;
String depositDate;
Float quantity;
long unitId;
String acceUrl;
public SGSVEntry() {
}
......@@ -49,6 +51,8 @@ class SGSVEntry implements AccessionIdentifier3 {
quantity = Float.parseFloat(entry[7]);
}
boxNo = entry[2];
acceUrl = entry[11];
unitId = Long.parseLong(entry[0]);
}
@Override
......
......@@ -284,6 +284,10 @@ public class SGSVUpdate {
svalbardData.setDepositDate(entry.depositDate);
svalbardData.setQuantity(entry.quantity);
svalbardData.setTaxonomy(entry.fullTaxa);
svalbardData.setUnitId(entry.unitId);
if (StringUtils.isNotBlank(entry.acceUrl)) {
svalbardData.setAcceUrl(entry.acceUrl);
}
svalbards.add(svalbardData);
if (updateAccession) {
......
......@@ -302,6 +302,7 @@ accession.availability.false=Not available
accession.historic.true=Historic
accession.historic.false=Active
accession.acceUrl=Additional accession URL
accession.page.profile.title=Accession profile: {0}
accession.page.resolve.title=Multiple accessions found
......@@ -628,3 +629,6 @@ accession.pdci.dependent-items=Depending on the population type
accession.donorNumb = WIEWS code of donor institute
accession.svalbard-data.url=Svalbard database URL
accession.svalbard-data.url-title=Deposit information in SGSV database
accession.svalbard-data.url-text=View SGSV deposit information for {0}
......@@ -552,6 +552,19 @@
<spring:message code="accession.svalbard-data" />
</h4>
<c:if test="${svalbardData.unitId ne null}">
<div class="row">
<div class="col-xs-4">
<spring:message code="accession.svalbard-data.url" />
</div>
<div class="col-xs-8">
<a target="_blank" title="<spring:message code="accession.svalbard-data.url-title" />"
href="http://nordgen.org/sgsv/index.php?app=data_unit&unit=sgsv&unit_id=${svalbardData.unitId}"
><spring:message code="accession.svalbard-data.url-text" arguments="${accession.accessionName}" /></a>
</div>
</div>
</c:if>
<div class="row">
<div class="col-xs-4">
<spring:message code="accession.svalbard-data.taxonomy" />
......@@ -578,6 +591,16 @@
<div class="col-xs-8">${svalbardData.quantity}</div>
</div>
<c:if test="${svalbardData.acceUrl ne null}">
<div class="row">
<div class="col-xs-4">
<spring:message code="accession.acceUrl" />
</div>
<div class="col-xs-8">
<a href="<c:out value="${svalbardData.acceUrl}" />"><c:out value="${svalbardData.acceUrl}" /></a>
</div>
</div>
</c:if>
</c:if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment