Commit 67b68674 authored by Richard Bruskiewich's avatar Richard Bruskiewich Committed by Matija Obreza
Browse files

Added "sameAs" field in Parameter details, to display curated rdfURI

pointing to an external standard such as the
data.bioversityinternational.org.
parent d9f2907a
......@@ -82,6 +82,25 @@ public class Parameter extends VersionedAuditedModel implements AclAwareModel {
return this.rdfUri;
}
public String getRdfUriId()
{
if(this.rdfUri == null)
return "" ;
else {
// first, check for hash URIs
String[] hashpart = rdfUri.split("#") ;
if(hashpart.length>1)
// assumed well-formed URI.. tail part is the RDF ID
return hashpart[1] ;
else
// not a hash uri... hmmm...
// since this should be a term URI,
// then take the tail part of the path as the RDF ID
return rdfUri.substring(rdfUri.lastIndexOf('/')+1) ;
}
}
public void setRdfUri(final String rdfUri) {
this.rdfUri = rdfUri;
}
......
......@@ -166,6 +166,7 @@ accession.methods=Characterization & Evaluation data
unit-of-measure=Unit of Measure
ce.trait=Trait
ce.sameAs=Same As
ce.methods=Methods
ce.method=Method
method.fieldName=DB Field
......@@ -464,4 +465,4 @@ stats.number-of-countries={0} Countries
stats.number-of-institutes={0} Institutes
stats.number-of-accessions={0} Accessions
navigate.back=Back
\ No newline at end of file
navigate.back=Back
......@@ -165,6 +165,7 @@ accession.methods=بيانات الوصف والتقييم
unit-of-measure=وحدة القياس
ce.trait=السمة
ce.sameAs=نفس و
ce.methods=الوسائل
ce.method=الوسيلة
method.fieldName=حقل قاعدة البيانات
......
......@@ -165,6 +165,7 @@ accession.methods=Charakterisierungs- und Evaluierungsdaten
unit-of-measure=Maßeinheit
ce.trait=Merkmal
ce.sameAs=Gleich wie
ce.methods=Methoden
ce.method=Methode
method.fieldName=Datenbankfeld
......
......@@ -165,6 +165,7 @@ accession.methods=Caracterización y evaluación
unit-of-measure=Unidad de medida
ce.trait=Rasgo característico
ce.sameAs=Igual que
ce.methods=Métodos
ce.method=Método
method.fieldName=Campo BD
......
......@@ -155,6 +155,7 @@ accession.metadatas=اطلاعات C&E
unit-of-measure=واحد اندازه گیری
# ce.trait=Trait
ce.sameAs=همان
ce.methods=روش ها
ce.method=روش
# method.fieldName=DB Field
......
......@@ -165,6 +165,7 @@ accession.methods=Données de caractérisation et d'évaluation
unit-of-measure=Unité de mesure
ce.trait=Trait
ce.sameAs=Même que
ce.methods=Méthodes
ce.method=Méthode
method.fieldName=Champ DB
......
......@@ -165,6 +165,7 @@ accession.methods=Caraterização & Dados de avaliação
unit-of-measure=Unidade de Medida
ce.trait=Traço
ce.sameAs=O mesmo que
ce.methods=Métodos
ce.method=Método
method.fieldName=Campo DB
......
......@@ -165,6 +165,7 @@ accession.methods=Данные по характеристике и оценке
unit-of-measure=Единица измерения
ce.trait=Особенность
ce.sameAs=То же, что
ce.methods=Методы
ce.method=Метод
method.fieldName=Поле БД
......
......@@ -165,6 +165,7 @@ accession.methods=评价鉴定数据
unit-of-measure=度量单位
ce.trait=性状
ce.sameAs=
ce.methods=方法
ce.method=方法
method.fieldName=数据库字段
......
......@@ -24,6 +24,7 @@
<thead>
<tr>
<td><spring:message code="ce.trait" /></td>
<td><spring:message code="ce.sameAs" /></td>
<td><spring:message code="ce.method" /></td>
<td><spring:message code="unit-of-measure" /></td>
<td><spring:message code="method.fieldName" /></td>
......@@ -32,6 +33,13 @@
<c:forEach items="${traitMethods}" var="method">
<tr>
<td><c:out value="${method.parameter.getTitle(pageContext.response.locale)}" /></td>
<td>
<c:if test="${method.parameter.rdfUri ne null}">
<a href="<c:url value="${method.parameter.rdfUri}" />">
<c:out value="${method.parameter.getRdfUriId()}" />
</a>
</c:if>
</td>
<td><a href="<c:url value="/descriptors/${trait.id}/${method.id}" />"><c:out value="${method.getMethod(pageContext.response.locale)}" /></a></td>
<td><c:out value="${method.unit}" /></td>
<td><c:out value="${method.fieldName}" /></td>
......
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