Commit 0783f042 authored by Matija Obreza's avatar Matija Obreza
Browse files

DatasetLocation: Added ISO3 country code

parent 37d971e1
/*
* Copyright 2017 Global Crop Diversity Trust
* Copyright 2018 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.
......@@ -38,11 +38,17 @@ public class DatasetLocation extends UuidModel implements PublishValidationInter
*/
private static final long serialVersionUID = -3107167591979299613L;
/** The user country. */
/** The dataset. */
@ManyToOne(cascade = { CascadeType.REFRESH, CascadeType.MERGE, CascadeType.PERSIST, CascadeType.DETACH }, optional = false, fetch = FetchType.EAGER)
@JoinColumn(name = "datasetId")
@JsonIgnore
private Dataset dataset;
/** The user-provided country name. */
@PublishValidation
private String userCountry;
/** The map country. */
/** Country as detected from coordinates. */
@PublishValidation
private String mapCountry;
......@@ -61,6 +67,7 @@ public class DatasetLocation extends UuidModel implements PublishValidationInter
@PublishValidation
private Double decimalLongitude;
/** ISO3 country code of the location */
@Column(length = 3)
private String countryCode;
......@@ -72,11 +79,9 @@ public class DatasetLocation extends UuidModel implements PublishValidationInter
@Column(length = 8)
private String endDate;
/** The dataset. */
@ManyToOne(cascade = { CascadeType.REFRESH, CascadeType.MERGE, CascadeType.PERSIST, CascadeType.DETACH }, optional = false, fetch = FetchType.EAGER)
@JoinColumn(name = "datasetId")
@JsonIgnore
private Dataset dataset;
/** Description of environment conditions. */
@Lob
private String description;
/**
* Instantiates a new location.
......@@ -268,6 +273,24 @@ public class DatasetLocation extends UuidModel implements PublishValidationInter
}
}
/**
* Gets the description.
*
* @return the description
*/
public String getDescription() {
return description;
}
/**
* Sets the description.
*
* @param description the new description
*/
public void setDescription(String description) {
this.description = description;
}
/*
* (non-Javadoc)
* @see org.genesys.catalog.service.PublishValidationInterface#validation()
......
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