Commit 64fc0c0a authored by Maxym Borodenko's avatar Maxym Borodenko Committed by Matija Obreza

Migrate to API v1

- Using genesys-client-api:2.0-SNAPSHOT
parent 1c6edc24
......@@ -819,9 +819,9 @@ public class PushDialog extends Dialog {
String serverResponse = null;
if (op == GenesysOp.UPSERT)
serverResponse = genesysClient.updateAccessions(instCode, objectMapper.writeValueAsString(accns));
serverResponse = genesysClient.updateAccession(instCode, objectMapper.writeValueAsString(accns));
else if (op == GenesysOp.DELETE)
serverResponse = genesysClient.deleteAccessionsByName(instCode, objectMapper.writeValueAsString(accns));
serverResponse = genesysClient.deleteAccessions(instCode, objectMapper.writeValueAsString(accns));
if (_log.isTraceEnabled())
_log.trace(serverResponse);
......
......@@ -100,25 +100,10 @@ public class GenesysJSON {
JsonField acceNumb = new JsonField(Api1Constants.Accession.ACCENUMB, RdfMCPD.ACCENUMB).setRequired(true);
columns.add(acceNumb);
JsonField newAcceNumb = new JsonField(Api1Constants.Accession.ACCENUMB_NEW, RdfMCPD.NEWACCENUMB).setRequired(false);
JsonField newAcceNumb = new JsonField(Api1Constants.Accession.ACCENUMB_NEW, RdfMCPD.ACCENUMB_NEW).setRequired(false);
columns.add(newAcceNumb);
JsonField genus = new JsonField(Api1Constants.Accession.GENUS, RdfMCPD.GENUS).setRequired(true);
columns.add(genus);
JsonField species = new JsonField(Api1Constants.Accession.SPECIES, RdfMCPD.SPECIES);
columns.add(species);
JsonField columnDef;
columnDef = new JsonField(Api1Constants.Accession.SPAUTHOR, RdfMCPD.SPAUTHOR);
columns.add(columnDef);
columnDef = new JsonField(Api1Constants.Accession.SUBTAXA, RdfMCPD.SUBTAXA);
columns.add(columnDef);
columnDef = new JsonField(Api1Constants.Accession.SUBTAUTHOR, RdfMCPD.SUBTAUTHOR);
columns.add(columnDef);
columnDef = new JsonField(Api1Constants.Accession.ACCENAME, RdfMCPD.ACCENAME).setAllowMultiple(true);
columns.add(columnDef);
......@@ -188,6 +173,24 @@ public class GenesysJSON {
columnDef = new JsonField(Api1Constants.Accession.GEO + "." + Api1Constants.Geo.ELEVATION, RdfMCPD.ELEVATION).setType(double.class);
columns.add(columnDef);
columnDef = new JsonField(Api1Constants.Accession.TAXONOMY + "." + Api1Constants.Taxonomy.GENUS, RdfMCPD.GENUS);
columns.add(columnDef);
columnDef = new JsonField(Api1Constants.Accession.TAXONOMY + "." + Api1Constants.Taxonomy.GENUS_NEW, RdfMCPD.GENUS_NEW);
columns.add(columnDef);
columnDef = new JsonField(Api1Constants.Accession.TAXONOMY + "." + Api1Constants.Taxonomy.SPECIES, RdfMCPD.SPECIES);
columns.add(columnDef);
columnDef = new JsonField(Api1Constants.Accession.TAXONOMY + "." + Api1Constants.Taxonomy.SPAUTHOR, RdfMCPD.SPAUTHOR);
columns.add(columnDef);
columnDef = new JsonField(Api1Constants.Accession.TAXONOMY + "." + Api1Constants.Taxonomy.SUBTAXA, RdfMCPD.SUBTAXA);
columns.add(columnDef);
columnDef = new JsonField(Api1Constants.Accession.TAXONOMY + "." + Api1Constants.Taxonomy.SUBTAUTHOR, RdfMCPD.SUBTAUTHOR);
columns.add(columnDef);
columnDef = new JsonField(Api1Constants.Accession.BREDCODE, RdfMCPD.BREDCODE).setAllowMultiple(true);
columns.add(columnDef);
......
......@@ -40,7 +40,7 @@ public class MCPD {
ColumnDef acceNumb = new ColumnDef("ACCENUMB", "Accession number", ColumnDataType.TEXT, true, RdfMCPD.ACCENUMB);
columns.add(acceNumb);
ColumnDef newAcceNumb = new ColumnDef("NEWACCENUMB", "New accession number", ColumnDataType.TEXT, true, RdfMCPD.NEWACCENUMB);
ColumnDef newAcceNumb = new ColumnDef("ACCENUMB_NEW", "New accession number", ColumnDataType.TEXT, true, RdfMCPD.ACCENUMB_NEW);
columns.add(newAcceNumb);
ColumnDef columnDef = new ColumnDef("COLLNUMB", "Collecting number", ColumnDataType.TEXT, false, RdfMCPD.COLLNUMB);
......@@ -62,6 +62,9 @@ public class MCPD {
ColumnDef genus = new ColumnDef("GENUS", "Genus", ColumnDataType.TEXT, false, RdfMCPD.GENUS);
columns.add(genus);
ColumnDef newGenus = new ColumnDef("NEWGENUS", "New genus", ColumnDataType.TEXT, false, RdfMCPD.GENUS_NEW);
columns.add(newGenus);
ColumnDef species = new ColumnDef("SPECIES", "Species", ColumnDataType.TEXT, false, RdfMCPD.SPECIES);
columns.add(species);
......
......@@ -22,9 +22,10 @@ public class RdfMCPD {
public static final String DOI = "http://prismstandard.org/namespaces/1.2/basic/doi";
public static final String ACCENUMB = "http://purl.org/germplasm/germplasmTerm#germplasmID";
public static final String NEWACCENUMB = "https://www.genesys-pgr.org/rdf/mcpd#newAcceNumb";
public static final String ACCENUMB_NEW = "https://www.genesys-pgr.org/rdf/mcpd#newAcceNumb";
public static final String GENUS = "http://rs.tdwg.org/dwc/terms/genus";
public static final String GENUS_NEW = "https://www.genesys-pgr.org/rdf/mcpd#newGenus";
public static final String SPECIES = "http://rs.tdwg.org/dwc/terms/specificEpithet";
public static final String SPAUTHOR = "http://rs.tdwg.org/dwc/terms/infraspecificEpithetAuthorship";
public static final String SUBTAXA = "http://rs.tdwg.org/dwc/terms/infraspecificEpithet";
......
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