Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Genesys Backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
18
Issues
18
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Genesys PGR
Genesys Backend
Commits
0783f042
Commit
0783f042
authored
Oct 04, 2018
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DatasetLocation: Added ISO3 country code
parent
37d971e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
8 deletions
+31
-8
src/main/java/org/genesys/catalog/model/dataset/DatasetLocation.java
...va/org/genesys/catalog/model/dataset/DatasetLocation.java
+31
-8
No files found.
src/main/java/org/genesys/catalog/model/dataset/DatasetLocation.java
View file @
0783f042
/*
* Copyright 201
7
Global Crop Diversity Trust
* Copyright 201
8
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()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment