Commit 9871018b authored by Matija Obreza's avatar Matija Obreza

Imported classes from genesys2-server

parent 09026cc0
/**
* Copyright 2014 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.api;
import org.genesys2.client.oauth.api.Api1Constants.Accession;
import com.fasterxml.jackson.annotation.JsonProperty;
public class AccessionJson {
private long version = 0;
private Long genesysId;
@JsonProperty(value = Accession.INSTCODE)
private String instCode;
@JsonProperty(value = Accession.ACCENUMB)
private String acceNumb;
@JsonProperty(value = Accession.GENUS)
private String genus;
@JsonProperty(value = Accession.SPECIES)
private String species;
@JsonProperty(value = Accession.SPAUTHOR)
private String spauthor;
@JsonProperty(value = Accession.SUBTAXA)
private String subtaxa;
@JsonProperty(value = Accession.SUBTAUTHOR)
private String subtauthor;
@JsonProperty(value = Accession.UUID)
private String uuid;
@JsonProperty(value = Accession.ORIGCTY)
private String orgCty;
@JsonProperty(value = Accession.ACQDATE)
private String acqDate;
@JsonProperty(value = Accession.MLSSTAT)
private Boolean mlsStat;
@JsonProperty(value = Accession.INTRUST)
private Boolean inTrust;
@JsonProperty(value = Accession.AVAILABLE)
private Boolean available;
@JsonProperty(value = Accession.STORAGE)
private Integer[] storage;
@JsonProperty(value = Accession.SAMPSTAT)
private Integer sampStat;
@JsonProperty(value = Accession.DUPLSITE)
private String[] duplSite;
@JsonProperty(value = Accession.BREDCODE)
private String bredCode;
@JsonProperty(value = Accession.ANCEST)
private String ancest;
@JsonProperty(value = Accession.DONORCODE)
private String donorCode;
@JsonProperty(value = Accession.DONORNUMB)
private String donorNumb;
@JsonProperty(value = Accession.DONORNAME)
private String donorName;
@JsonProperty(value = Accession.COLL)
private CollectingJson coll;
@JsonProperty(value = Accession.GEO)
private GeoJson geo;
@JsonProperty(value = Accession.REMARKS)
private Remark[] remarks;
@JsonProperty(value = Accession.HISTORIC)
private boolean historic;
public long getVersion() {
return version;
}
public void setVersion(long l) {
this.version = l;
}
public Long getGenesysId() {
return genesysId;
}
public void setGenesysId(Long genesysId) {
this.genesysId = genesysId;
}
public String getInstCode() {
return instCode;
}
public void setInstCode(String instCode) {
this.instCode = instCode;
}
public String getAcceNumb() {
return acceNumb;
}
public void setAcceNumb(String acceNumb) {
this.acceNumb = acceNumb;
}
public String getGenus() {
return genus;
}
public void setGenus(String genus) {
this.genus = genus;
}
public String getSpecies() {
return species;
}
public void setSpecies(String species) {
this.species = species;
}
public String getSpauthor() {
return spauthor;
}
public void setSpauthor(String spauthor) {
this.spauthor = spauthor;
}
public String getSubtaxa() {
return subtaxa;
}
public void setSubtaxa(String subtaxa) {
this.subtaxa = subtaxa;
}
public String getSubtauthor() {
return subtauthor;
}
public void setSubtauthor(String subtauthor) {
this.subtauthor = subtauthor;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public String getOrgCty() {
return orgCty;
}
public void setOrgCty(String orgCty) {
this.orgCty = orgCty;
}
public String getAcqDate() {
return acqDate;
}
public void setAcqDate(String acqDate) {
this.acqDate = acqDate;
}
public Boolean getMlsStat() {
return mlsStat;
}
public void setMlsStat(Boolean mlsStat) {
this.mlsStat = mlsStat;
}
public Boolean getInTrust() {
return inTrust;
}
public void setInTrust(Boolean inTrust) {
this.inTrust = inTrust;
}
public Boolean getAvailable() {
return available;
}
public void setAvailable(Boolean available) {
this.available = available;
}
public Integer[] getStorage() {
return storage;
}
public void setStorage(Integer[] storage) {
this.storage = storage;
}
public Integer getSampStat() {
return sampStat;
}
public void setSampStat(Integer sampStat) {
this.sampStat = sampStat;
}
public String[] getDuplSite() {
return duplSite;
}
public void setDuplSite(String[] duplSite) {
this.duplSite = duplSite;
}
public String getBredCode() {
return bredCode;
}
public void setBredCode(String bredCode) {
this.bredCode = bredCode;
}
public String getAncest() {
return ancest;
}
public void setAncest(String ancest) {
this.ancest = ancest;
}
public String getDonorCode() {
return donorCode;
}
public void setDonorCode(String donorCode) {
this.donorCode = donorCode;
}
public String getDonorNumb() {
return donorNumb;
}
public void setDonorNumb(String donorNumb) {
this.donorNumb = donorNumb;
}
public String getDonorName() {
return donorName;
}
public void setDonorName(String donorName) {
this.donorName = donorName;
}
public CollectingJson getColl() {
return coll;
}
public void setColl(CollectingJson coll) {
this.coll = coll;
}
public GeoJson getGeo() {
return geo;
}
public void setGeo(GeoJson geo) {
this.geo = geo;
}
public Remark[] getRemarks() {
return remarks;
}
public void setRemarks(Remark[] remarks) {
this.remarks = remarks;
}
public void setHistoric(boolean historic) {
this.historic = historic;
}
public boolean getHistoric() {
return this.historic;
}
}
/**
* Copyright 2015 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.api;
/**
* @author mobreza
*/
public interface Api1Constants {
public static interface Accession {
/**
* WIEWS code of accession holding institute.
*/
public static final String INSTCODE = "instCode";
/**
* Accession number.
*/
public static final String ACCENUMB = "acceNumb";
/**
* Used to assign new ACCENUMB
*/
public static final String ACCENUMB_NEW = "newAcceNumb";
/**
* 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";
/**
* 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";
/**
* 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";
/**
* 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";
/**
* 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.
*/
public static final String AVAILABLE = "available";
/**
* MCPD Type of germplasm storage (Corresponds to MCPD STORAGE field).
*/
public static final String STORAGE = "storage";
/**
* 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.
*/
public static final String DUPLSITE = "duplSite";
/**
* Corresponds to BREDCODE.
*/
public static final String BREDCODE = "bredCode";
/**
* Corresponds to ANCEST.
*/
public static final String ANCEST = "ancest";
/**
* FAO WIEWS code of the donor institute
*/
public static final String DONORCODE = "donorCode";
/**
* Accession number at donor institute.
*/
public static final String DONORNUMB = "donorNumb";
/**
* 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
*/
public static final String COLL = "coll";
/**
* Object containing georeference data
*/
public static final String GEO = "geo";
/**
* MCPD Remarks
*/
public static final String REMARKS = "remarks";
/**
* Marks if accession record is about a historic holding and the
* accession no longer exists.
*/
public static final String HISTORIC = "historic";
/**
* Accession name
*/
public static final String ACCENAME = "acceName";
/**
* Other numbers
*/
public static final String OTHERNUMB = "otherNumb";
}
public static interface Collecting {
/**
* Corresponds to COLLDATE
*/
public static final String COLLDATE = "collDate";
/**
* Corresponds to COLLSITE
*/
public static final String COLLSITE = "collSite";
/**
* Corresponds to MCPD COLLNUMB
*/
public static final String COLLNUMB = "collNumb";
/**
* Corresponds to MCPD COLLSRC
*/
public static final String COLLSRC = "collSrc";
/**
* FAO WIEWS code of collecting institute
*/
public static final String COLLCODE = "collCode";
/**
* The name of the collecting institute if collCode is not available.
*/
public static final String COLLNAME = "collName";
/**
* The address of the collecting institute if collCode is not available.
*/
public static final String COLLINSTADDRESS = "collInstAddress";
/**
* Corresponds to COLLMISSID
*/
public static final String COLLMISSID = "collMissId";
}
public static interface Geo {
/**
* Latitude
*/
public static final String LATITUDE = "latitude";
/**
* Longitude
*/
public static final String LONGITUDE = "longitude";
/**
* Elevation
*/
public static final String ELEVATION = "elevation";
/**
* COORDUNCERT (in meters)
*/
public static final String COORDUNCERT = "coordUncert";
/**
* Corresponds to COORDATUM
*/
public static final String COORDDATUM = "coordDatum";
/**
* Corresponds to GEOREFMETH
*/
public static final String GEOREFMETH = "georefMeth";
}
}
/**
* Copyright 2014 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.api;
import org.genesys2.client.oauth.api.Api1Constants.Collecting;
import com.fasterxml.jackson.annotation.JsonProperty;
public class CollectingJson {
@JsonProperty(value = Collecting.COLLDATE)
private String collDate;
@JsonProperty(value = Collecting.COLLSITE)
private String collSite;
@JsonProperty(value = Collecting.COLLNUMB)
private String collNumb;
@JsonProperty(value = Collecting.COLLSRC)
private Integer collSrc;
@JsonProperty(value = Collecting.COLLCODE)
private String collCode;
@JsonProperty(value = Collecting.COLLNAME)
private String collName;
@JsonProperty(value = Collecting.COLLINSTADDRESS)
private String collInstAddress;
@JsonProperty(value = Collecting.COLLMISSID)
private String collMissId;
public String getCollDate() {
return collDate;
}
public void setCollDate(String collDate) {
this.collDate = collDate;
}
public String getCollSite() {
return collSite;
}
public void setCollSite(String collSite) {
this.collSite = collSite;
}
public String getCollNumb() {
return collNumb;
}
public void setCollNumb(String collNumb) {
this.collNumb = collNumb;
}
public Integer getCollSrc() {
return collSrc;
}
public void setCollSrc(Integer integer) {
this.collSrc = integer;
}
public String getCollCode() {
return collCode;
}