Commit fbbb75d6 authored by Matija Obreza's avatar Matija Obreza

Merge branch '9-accession-api-v1' into 'master'

Resolve "Accession API v1"

Closes #9

See merge request !9
parents f442311b e75f511d
Pipeline #9596 passed with stage
in 41 seconds
This diff is collapsed.
/*
* Copyright 2016 Global Crop Diversity Trust
* Copyright 2019 Global Crop Diversity Trust
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......
/*
* Copyright 2016 Global Crop Diversity Trust
* Copyright 2019 Global Crop Diversity Trust
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......
/*
* Copyright 2019 Global Crop Diversity Trust
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.genesys2.client.oauth;
public class HttpConstants {
......
/*
* Copyright 2016 Global Crop Diversity Trust
* Copyright 2019 Global Crop Diversity Trust
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......
/*
* Copyright 2016 Global Crop Diversity Trust
* Copyright 2019 Global Crop Diversity Trust
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......
/*
* Copyright 2016 Global Crop Diversity Trust
* Copyright 2019 Global Crop Diversity Trust
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......
/*
* Copyright 2016 Global Crop Diversity Trust
* Copyright 2019 Global Crop Diversity Trust
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......
/*
* Copyright 2016 Global Crop Diversity Trust
* Copyright 2019 Global Crop Diversity Trust
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -32,45 +32,21 @@ public class AccessionJson {
private Long genesysId;
/** The puid. */
@JsonProperty(value = Accession.PUID)
private String puid;
@JsonProperty(value = Accession.DOI)
private String doi;
/** The inst code. */
@JsonProperty(value = Accession.INSTCODE)
private String instCode;
private String instituteCode;
/** The acce numb. */
@JsonProperty(value = Accession.ACCENUMB)
private String acceNumb;
private String accessionNumber;
/** The new acce numb. */
@JsonProperty(value = Accession.ACCENUMB_NEW)
private String newAcceNumb;
/** The genus. */
@JsonProperty(value = Accession.GENUS)
private String genus;
/** The new genus. */
@JsonProperty(value = Accession.GENUS_NEW)
private String newGenus;
/** The species. */
@JsonProperty(value = Accession.SPECIES)
private String species;
/** The spauthor. */
@JsonProperty(value = Accession.SPAUTHOR)
private String spauthor;
/** The subtaxa. */
@JsonProperty(value = Accession.SUBTAXA)
private String subtaxa;
/** The subtauthor. */
@JsonProperty(value = Accession.SUBTAUTHOR)
private String subtauthor;
/** The uuid. */
@JsonProperty(value = Accession.UUID)
private String uuid;
......@@ -81,7 +57,7 @@ public class AccessionJson {
/** The acq date. */
@JsonProperty(value = Accession.ACQDATE)
private String acqDate;
private String acquisitionDate;
/** The mls stat. */
@JsonProperty(value = Accession.MLSSTAT)
......@@ -109,7 +85,11 @@ public class AccessionJson {
/** The bred code. */
@JsonProperty(value = Accession.BREDCODE)
private String[] bredCode;
private String[] breederCode;
/** The bred code. */
@JsonProperty(value = Accession.BREDNAME)
private String[] breederName;
/** The ancest. */
@JsonProperty(value = Accession.ANCEST)
......@@ -135,6 +115,10 @@ public class AccessionJson {
@JsonProperty(value = Accession.GEO)
private GeoJson geo;
/** The taxonomy. */
@JsonProperty(value = Accession.TAXONOMY)
private TaxonomyJson taxonomy;
/** The remarks. */
@JsonProperty(value = Accession.REMARKS)
private Remark[] remarks;
......@@ -162,6 +146,7 @@ public class AccessionJson {
public AccessionJson() {
this.geo = new GeoJson();
this.coll = new CollectingJson();
this.taxonomy = new TaxonomyJson();
}
/**
......@@ -205,56 +190,49 @@ public class AccessionJson {
* @return the puid
*/
public String getPuid() {
return puid;
return doi;
}
/**
* @param puid the puid to set
*/
public void setPuid(String puid) {
this.puid = puid;
}
/**
* Gets the inst code.
* Gets the FAO WIEWS institute code.
*
* @return the inst code
*/
public String getInstCode() {
return instCode;
public String getInstituteCode() {
return instituteCode;
}
/**
* Sets the inst code.
*
* @param instCode the new inst code
* @param instituteCode the new inst code
*/
public void setInstCode(final String instCode) {
this.instCode = instCode;
public void setInstituteCode(final String instituteCode) {
this.instituteCode = instituteCode;
}
/**
* Gets the acce numb.
* Gets the accession number.
*
* @return the acce numb
* @return the accession number
*/
public String getAcceNumb() {
return acceNumb;
public String getAccessionNumber() {
return accessionNumber;
}
/**
* Sets the acce numb.
* Sets the accession number.
*
* @param acceNumb the new acce numb
* @param accessionNumber the new accession number
*/
public void setAcceNumb(final String acceNumb) {
this.acceNumb = acceNumb;
public void setAccessionNumber(String accessionNumber) {
this.accessionNumber = accessionNumber;
}
/**
* Gets the new acce numb.
* Gets the new accession number.
*
* @return the new acce numb
* @return the new accession number
*/
public String getNewAcceNumb() {
return newAcceNumb;
......@@ -269,114 +247,6 @@ public class AccessionJson {
this.newAcceNumb = newAcceNumb;
}
/**
* Gets the genus.
*
* @return the genus
*/
public String getGenus() {
return genus;
}
/**
* Sets the genus.
*
* @param genus the new genus
*/
public void setGenus(final String genus) {
this.genus = genus;
}
/**
* Gets the new genus.
*
* @return the new genus
*/
public String getNewGenus() {
return newGenus;
}
/**
* Sets the new genus.
*
* @param newGenus the new new genus
*/
public void setNewGenus(final String newGenus) {
this.newGenus = newGenus;
}
/**
* Gets the species.
*
* @return the species
*/
public String getSpecies() {
return species;
}
/**
* Sets the species.
*
* @param species the new species
*/
public void setSpecies(final String species) {
this.species = species;
}
/**
* Gets the spauthor.
*
* @return the spauthor
*/
public String getSpauthor() {
return spauthor;
}
/**
* Sets the spauthor.
*
* @param spauthor the new spauthor
*/
public void setSpauthor(final String spauthor) {
this.spauthor = spauthor;
}
/**
* Gets the subtaxa.
*
* @return the subtaxa
*/
public String getSubtaxa() {
return subtaxa;
}
/**
* Sets the subtaxa.
*
* @param subtaxa the new subtaxa
*/
public void setSubtaxa(final String subtaxa) {
this.subtaxa = subtaxa;
}
/**
* Gets the subtauthor.
*
* @return the subtauthor
*/
public String getSubtauthor() {
return subtauthor;
}
/**
* Sets the subtauthor.
*
* @param subtauthor the new subtauthor
*/
public void setSubtauthor(final String subtauthor) {
this.subtauthor = subtauthor;
}
/**
* Gets the uuid.
*
......@@ -414,21 +284,21 @@ public class AccessionJson {
}
/**
* Gets the acq date.
* Gets the acquisition date.
*
* @return the acq date
* @return the acquisition date
*/
public String getAcqDate() {
return acqDate;
public String getAcquisitionDate() {
return acquisitionDate;
}
/**
* Sets the acq date.
* Sets the acquisition date.
*
* @param acqDate the new acq date
* @param acquisitionDate the new acquisition date
*/
public void setAcqDate(final String acqDate) {
this.acqDate = acqDate;
public void setAcquisitionDate(String acquisitionDate) {
this.acquisitionDate = acquisitionDate;
}
/**
......@@ -545,7 +415,7 @@ public class AccessionJson {
* @return the bred code
*/
public String[] getBredCode() {
return bredCode;
return breederCode;
}
/**
......@@ -554,7 +424,7 @@ public class AccessionJson {
* @param bredCode the new bred code
*/
public void setBredCode(final String[] bredCode) {
this.bredCode = bredCode;
this.breederCode = bredCode;
}
/**
......@@ -665,6 +535,24 @@ public class AccessionJson {
this.geo = geo;
}
/**
* Gets the taxonomy.
*
* @return the taxonomy
*/
public TaxonomyJson getTaxonomy() {
return taxonomy;
}
/**
* Sets the taxonomy.
*
* @param taxonomy the new taxonomy
*/
public void setTaxonomy(final TaxonomyJson taxonomy) {
this.taxonomy = taxonomy;
}
/**
* Gets the remarks.
*
......
/*
* Copyright 2016 Global Crop Diversity Trust
* Copyright 2019 Global Crop Diversity Trust
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -40,69 +40,52 @@ public interface Api1Constants {
/**
* WIEWS code of accession holding institute.
*/
public static final String INSTCODE = "instCode";
public static final String INSTCODE = "instituteCode";
/**
* Accession number.
*/
public static final String ACCENUMB = "acceNumb";
/** Used to assign new ACCENUMB. */
public static final String ACCENUMB_NEW = "newAcceNumb";
public static final String ACCENUMB = "accessionNumber";
/**
* Reported genus of accession.
* Used to assign new ACCENUMB
*/
public static final String GENUS = "genus";
/**
* May be used to assign a different genus.
*/
public static final String GENUS_NEW = "newGenus";
/**
* Specific epithet portion of the scientific name, in latin, in lowercase letters.
* Following abbreviation is allowed: ‘sp.’
*/
public static final String SPECIES = "species";
/** Corresponds to MCPD SPAUTHOR. */
public static final String SPAUTHOR = "spauthor";
/** Corresponds to MCPD SUBTAXA. */
public static final String SUBTAXA = "subtaxa";
/** Corresponds to MCPD SUBTAUTHOR. */
public static final String SUBTAUTHOR = "subtauthor";
public static final String ACCENUMB_NEW = "newAcceNumb";
/**
* Universally Unique IDentifier for the accession, assigned by the first holding institute
* and immutable when accession is duplicated in another institute.
* Universally Unique IDentifier for the accession, assigned by the
* first holding institute and immutable when accession is duplicated in
* another institute.
*/
public static final String UUID = "uuid";
/**
* ISO3 country code of country of origin.
*/
public static final String ORIGCTY = "orgCty";
public static final String ORIGCTY = "origCty";
/**
* Date on which the accession entered the collection as YYYYMMDD. Missing data (MM or DD)
* should be indicated with hyphens. Leading zeros are required.
* Date on which the accession entered the collection as YYYYMMDD.
* Missing data (MM or DD) should be indicated with hyphens. Leading
* zeros are required.
*/
public static final String ACQDATE = "acqDate";
public static final String ACQDATE = "acquisitionDate";
/**
* The status of an accession with regards to the Multilateral System (MLS) of the
* International Treaty on PlantGenetic Resources for Food and Agriculture.
* The status of an accession with regards to the Multilateral System
* (MLS) of the International Treaty on PlantGenetic Resources for Food
* and Agriculture.
*/
public static final String MLSSTAT = "mlsStat";
public static final String MLSSTAT = "mlsStatus";
/** Is the accession “FAO In trust”. */
/**
* Is the accession “FAO In trust”
*/
public static final String INTRUST = "inTrust";
/**
* The general availability of the accession for distribution, but subject to current stock.
* The general availability of the accession for distribution, but
* subject to current stock.
*/
public static final String AVAILABLE = "available";
......@@ -111,26 +94,30 @@ public interface Api1Constants {
*/
public static final String STORAGE = "storage";
/** MCPD Sample status. */
/**
* MCPD Sample status
*/
public static final String SAMPSTAT = "sampStat";
/**
* FAO Institute Code (WIEWS code) of the institute where a safety duplicate of the
* accession is maintained.
* FAO Institute Code (WIEWS code) of the institute where a safety
* duplicate of the accession is maintained.
*/
public static final String DUPLSITE = "duplSite";
/**
* Corresponds to BREDCODE.
*/
public static final String BREDCODE = "bredCode";
public static final String BREDCODE = "breederCode";
/**
* Corresponds to ANCEST.
*/
public static final String ANCEST = "ancest";
/** FAO WIEWS code of the donor institute. */
/**
* FAO WIEWS code of the donor institute
*/
public static final String DONORCODE = "donorCode";
/**
......@@ -139,58 +126,125 @@ public interface Api1Constants {
public static final String DONORNUMB = "donorNumb";
/**
* Name of the donor institute (or person). Provide only when donorCode is not available.
* Name of the donor institute (or person). Provide only when donorCode
* is not available.
*/
public static final String DONORNAME = "donorName";
/** Object containing the collecting data. */
/**
* Object containing the collecting data
*/
public static final String COLL = "coll";
/** Object containing georeference data. */
/**
* Object containing georeference data
*/
public static final String GEO = "geo";
/** MCPD Remarks. */
/**
* Object containing taxonomy data.
* */
public static final String TAXONOMY = "taxonomy";
/**
* MCPD Remarks
*/
public static final String REMARKS = "remarks";
/**
* Marks if accession record is about a historic holding and the accession no longer exists.
* Marks if accession record is about a historic holding and the
* accession no longer exists.
*/
public static final String HISTORIC = "historic";
/** Accession name. */
/**
* Accession name
*/
public static final String ACCENAME = "acceName";
/** Other numbers. */
/**
* Other numbers
*/
public static final String OTHERNUMB = "otherNumb";
/**
* URL linking to additional data about the accession either in the holding genebank or from
* another source.
* URL linking to additional data about the accession either in the
* holding genebank or from another source.
*/
public static final String ACCEURL = "acceUrl";
/** Gene bank provided MCPD#CROPNAME. */
/**
* Gene bank provided MCPD#CROPNAME
*/
public static final String CROPNAME = "cropName";
/**
* Corresponds to BREDNAME.
*/
public static final String BREDNAME = "breederName";
}
public static interface Taxonomy {
/**
* Reported genus of accession.
*/
public static final String GENUS = "genus";
/**
* May be used to assign a different genus.
*/
public static final String GENUS_NEW = "newGenus";
/**
* Specific epithet portion of the scientific name, in latin, in
* lowercase letters. Following abbreviation is allowed: ‘sp.’
*/
public static final String SPECIES = "species";
/**
* Corresponds to MCPD SPAUTHOR
*/
public static final String SPAUTHOR = "spAuthor";
/**
* Corresponds to MCPD SUBTAXA
*/
public static final String SUBTAXA = "subtaxa";
/**
* Corresponds to MCPD SUBTAUTHOR
*/
public static final String SUBTAUTHOR = "subtAuthor";
}
/**
* The Interface Collecting.
*/
public static interface Collecting {
/** Corresponds to COLLDATE. */
/**
* Corresponds to COLLDATE
*/
public static final String COLLDATE = "collDate";
/** Corresponds to COLLSITE. */
/**
* Corresponds to COLLSITE
*/
public static final String COLLSITE = "collSite";
/** Corresponds to MCPD COLLNUMB. */
/**
* Corresponds to MCPD COLLNUMB
*/
public static final String COLLNUMB = "collNumb";
/** Corresponds to MCPD COLLSRC. */
/**
* Corresponds to MCPD COLLSRC
*/
public static final String COLLSRC = "collSrc";
/** FAO WIEWS code of collecting institute. */
/**
* FAO WIEWS code of collecting institute
*/
public static final String COLLCODE = "collCode";
/**
......@@ -203,31 +257,43 @@ public interface Api1Constants {
*/
public static final String