Commit ee8118de authored by Matija Obreza's avatar Matija Obreza

Support for "newInstituteCode"

parent 860059e6
......@@ -61,7 +61,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import swing2swt.layout.BorderLayout;
import java.io.IOException;
import java.util.Arrays;
import java.util.Set;
......
......@@ -36,7 +36,6 @@ import org.genesys2.anno.reader.JDBCRowReader;
import org.genesys2.anno.util.ConnectionUtils;
import org.genesys2.client.oauth.GenesysClient;
import org.genesys2.client.oauth.GenesysTokens;
import org.genesys2.client.oauth.api.GenesysApi;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
......
......@@ -93,6 +93,9 @@ public class GenesysJSON {
List<JsonField> columns = new ArrayList<JsonField>();
JsonField instCode = new JsonField(Api1Constants.Accession.INSTCODE, RdfMCPD.INSTCODE).setRequired(true);
columns.add(instCode);
JsonField newInstCode = new JsonField(Api1Constants.Accession.INSTCODE_NEW, RdfMCPD.INSTCODE_NEW).setRequired(false);
columns.add(newInstCode);
JsonField doi = new JsonField(Api1Constants.Accession.DOI, RdfMCPD.DOI).setRequired(false);
columns.add(doi);
......
......@@ -34,6 +34,10 @@ public class MCPD {
instCode.getValidators().add(new FaoWiewsInstCodeValidator());
columns.add(instCode);
ColumnDef newInstCode = new ColumnDef("INSTCODE_NEW", "New institute code", ColumnDataType.TEXT, false, RdfMCPD.INSTCODE_NEW);
newInstCode.getValidators().add(new FaoWiewsInstCodeValidator());
columns.add(newInstCode);
ColumnDef doi = new ColumnDef("DOI", "Digital object identifier", ColumnDataType.TEXT, true, RdfMCPD.DOI);
columns.add(doi);
......
......@@ -19,6 +19,7 @@ package org.genesys2.anno.predefined;
public class RdfMCPD {
// http://purl.org/germplasm/germplasmTerm#
public static final String INSTCODE = "http://rs.tdwg.org/dwc/terms/institutionCode";
public static final String INSTCODE_NEW = "https://www.genesys-pgr.org/rdf/mcpd#newInstituteCode";
public static final String DOI = "http://prismstandard.org/namespaces/1.2/basic/doi";
public static final String ACCENUMB = "http://purl.org/germplasm/germplasmTerm#germplasmID";
......
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