Commit f406d4f9 authored by Matija Obreza's avatar Matija Obreza

Using AccessionAlias#usedBy instead of #instCode

parent 0012117c
......@@ -76,7 +76,7 @@ public class AccessionAlias extends BusinessModel {
@Field(name = "title", store = Store.NO)
private String name;
@Column(length = 7)
@Column(length = 10)
private String instCode;
@Column
......@@ -85,6 +85,9 @@ public class AccessionAlias extends BusinessModel {
@Column(length = 2)
private String lang;
@Column(length = 64)
private String usedBy;
public AccessionAlias() {
}
......@@ -135,4 +138,12 @@ public class AccessionAlias extends BusinessModel {
public void setLang(String lang) {
this.lang = lang;
}
public String getUsedBy() {
return usedBy;
}
public void setUsedBy(String usedBy) {
this.usedBy=usedBy;
}
}
......@@ -46,7 +46,7 @@ public class AccessionExchange extends BusinessModel {
@Column(name = "donorName", length = 200)
private String donorName;
@Column(name = "acceNumb", length = 36)
@Column(name = "acceNumb", length = 200)
private String accNumbDonor;
public AccessionExchange() {
......
......@@ -1298,10 +1298,10 @@ public class GenesysServiceImpl implements GenesysService, TraitService, Dataset
if (StringUtils.isBlank(oin[1])) {
continue;
}
alias.setInstCode(StringUtils.defaultIfBlank(oin[0].trim(), null));
alias.setUsedBy(StringUtils.defaultIfBlank(oin[0].trim(), null));
if (alias.getInstCode() != null && alias.getInstCode().length() > 7) {
LOG.warn("Invalid instCode: " + alias.getInstCode() + " in=" + oi);
if (alias.getUsedBy() != null && alias.getUsedBy().length() > 7) {
LOG.warn("Invalid instCode: " + alias.getUsedBy() + " in=" + oi);
continue;
}
......
......@@ -18,11 +18,12 @@ package org.genesys2.server.servlet.controller.rest.model;
public class AccessionAliasJson {
public String name;
public String usedBy;
public String instCode;
public int type = 0;
@Override
public String toString() {
return "" + name + "@" + instCode;
return "" + name + "@" + usedBy;
}
}
......@@ -155,6 +155,9 @@
${accessionAlias.instCode}
</a>
</c:if>
<c:if test="${accessionAlias.usedBy != ''}">
${accessionAlias.usedBy}
</c:if>
<c:if test="${accessionAlias.lang != ''}">
<c:out value="${accessionAlias.lang}" />
</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