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
15
Issues
15
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
c11fb1cf
Commit
c11fb1cf
authored
Aug 04, 2014
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ElasticSearch
parent
f2f4e14a
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
1925 additions
and
75 deletions
+1925
-75
pom.xml
pom.xml
+66
-0
src/main/java/org/apache/lucene/util/Version.java
src/main/java/org/apache/lucene/util/Version.java
+236
-0
src/main/java/org/genesys2/server/model/elastic/AccessionDetails.java
...a/org/genesys2/server/model/elastic/AccessionDetails.java
+379
-0
src/main/java/org/genesys2/server/model/elastic/AccessionEsTrait.java
...a/org/genesys2/server/model/elastic/AccessionEsTrait.java
+144
-0
src/main/java/org/genesys2/server/model/elastic/Alias.java
src/main/java/org/genesys2/server/model/elastic/Alias.java
+48
-0
src/main/java/org/genesys2/server/model/elastic/Collect.java
src/main/java/org/genesys2/server/model/elastic/Collect.java
+40
-0
src/main/java/org/genesys2/server/model/elastic/Country.java
src/main/java/org/genesys2/server/model/elastic/Country.java
+51
-0
src/main/java/org/genesys2/server/model/elastic/Geo.java
src/main/java/org/genesys2/server/model/elastic/Geo.java
+87
-0
src/main/java/org/genesys2/server/model/elastic/Institute.java
...ain/java/org/genesys2/server/model/elastic/Institute.java
+62
-0
src/main/java/org/genesys2/server/model/elastic/Remark.java
src/main/java/org/genesys2/server/model/elastic/Remark.java
+39
-0
src/main/java/org/genesys2/server/model/elastic/Svalbard.java
...main/java/org/genesys2/server/model/elastic/Svalbard.java
+50
-0
src/main/java/org/genesys2/server/model/elastic/Taxonomy.java
...main/java/org/genesys2/server/model/elastic/Taxonomy.java
+82
-0
src/main/java/org/genesys2/server/service/ElasticService.java
...main/java/org/genesys2/server/service/ElasticService.java
+32
-0
src/main/java/org/genesys2/server/service/GenesysService.java
...main/java/org/genesys2/server/service/GenesysService.java
+3
-0
src/main/java/org/genesys2/server/service/SearchService.java
src/main/java/org/genesys2/server/service/SearchService.java
+1
-2
src/main/java/org/genesys2/server/service/impl/ElasticsearchSearchServiceImpl.java
...2/server/service/impl/ElasticsearchSearchServiceImpl.java
+201
-0
src/main/java/org/genesys2/server/service/impl/GenesysServiceImpl.java
.../org/genesys2/server/service/impl/GenesysServiceImpl.java
+26
-1
src/main/java/org/genesys2/server/service/impl/SearchException.java
...ava/org/genesys2/server/service/impl/SearchException.java
+32
-0
src/main/java/org/genesys2/server/servlet/controller/AdminController.java
...g/genesys2/server/servlet/controller/AdminController.java
+16
-3
src/main/java/org/genesys2/server/servlet/controller/ExplorerController.java
...enesys2/server/servlet/controller/ExplorerController.java
+8
-6
src/main/java/org/genesys2/server/servlet/controller/JspHelper.java
...ava/org/genesys2/server/servlet/controller/JspHelper.java
+8
-0
src/main/java/org/genesys2/server/servlet/controller/SearchController.java
.../genesys2/server/servlet/controller/SearchController.java
+12
-21
src/main/java/org/genesys2/server/servlet/controller/rest/AccessionController.java
...2/server/servlet/controller/rest/AccessionController.java
+2
-6
src/main/java/org/genesys2/server/servlet/controller/rest/ElasticsearchHelper.java
...2/server/servlet/controller/rest/ElasticsearchHelper.java
+98
-0
src/main/java/org/genesys2/spring/config/ApplicationConfig.java
...in/java/org/genesys2/spring/config/ApplicationConfig.java
+1
-1
src/main/java/org/genesys2/spring/config/SpringElasticsearchConfig.java
...org/genesys2/spring/config/SpringElasticsearchConfig.java
+82
-0
src/main/resources/content/language.properties
src/main/resources/content/language.properties
+2
-0
src/main/resources/spring/spring-security.xml
src/main/resources/spring/spring-security.xml
+3
-3
src/main/resources/spring/spring.properties
src/main/resources/spring/spring.properties
+4
-1
src/main/webapp/WEB-INF/jsp/admin/index.jsp
src/main/webapp/WEB-INF/jsp/admin/index.jsp
+10
-0
src/main/webapp/WEB-INF/jsp/search/accessions.jsp
src/main/webapp/WEB-INF/jsp/search/accessions.jsp
+30
-31
src/test/java/org/genesys2/server/service/impl/ElasticsearchTest.java
...a/org/genesys2/server/service/impl/ElasticsearchTest.java
+70
-0
No files found.
pom.xml
View file @
c11fb1cf
...
...
@@ -337,6 +337,12 @@
<groupId>
org.hibernate
</groupId>
<artifactId>
hibernate-search
</artifactId>
<version>
4.5.1.Final
</version>
<exclusions>
<exclusion>
<artifactId>
solr-analysis-extras
</artifactId>
<groupId>
org.apache.solr
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.apache.tomcat
</groupId>
...
...
@@ -419,6 +425,66 @@
<version>
${jetty.version}
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.data
</groupId>
<artifactId>
spring-data-elasticsearch
</artifactId>
<version>
1.0.2.RELEASE
</version>
<exclusions>
<exclusion>
<artifactId>
lucene-core
</artifactId>
<groupId>
org.apache.lucene
</groupId>
</exclusion>
<exclusion>
<artifactId>
lucene-sandbox
</artifactId>
<groupId>
org.apache.lucene
</groupId>
</exclusion>
<exclusion>
<artifactId>
lucene-queries
</artifactId>
<groupId>
org.apache.lucene
</groupId>
</exclusion>
<exclusion>
<artifactId>
lucene-codecs
</artifactId>
<groupId>
org.apache.lucene
</groupId>
</exclusion>
<exclusion>
<artifactId>
lucene-grouping
</artifactId>
<groupId>
org.apache.lucene
</groupId>
</exclusion>
<exclusion>
<artifactId>
lucene-memory
</artifactId>
<groupId>
org.apache.lucene
</groupId>
</exclusion>
<exclusion>
<artifactId>
lucene-spatial
</artifactId>
<groupId>
org.apache.lucene
</groupId>
</exclusion>
<exclusion>
<artifactId>
lucene-suggest
</artifactId>
<groupId>
org.apache.lucene
</groupId>
</exclusion>
<exclusion>
<artifactId>
lucene-queryparser
</artifactId>
<groupId>
org.apache.lucene
</groupId>
</exclusion>
<exclusion>
<artifactId>
lucene-misc
</artifactId>
<groupId>
org.apache.lucene
</groupId>
</exclusion>
<exclusion>
<artifactId>
lucene-join
</artifactId>
<groupId>
org.apache.lucene
</groupId>
</exclusion>
<exclusion>
<artifactId>
lucene-highlighter
</artifactId>
<groupId>
org.apache.lucene
</groupId>
</exclusion>
<exclusion>
<artifactId>
lucene-analyzers-common
</artifactId>
<groupId>
org.apache.lucene
</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
com.jayway.jsonpath
</groupId>
...
...
src/main/java/org/apache/lucene/util/Version.java
0 → 100644
View file @
c11fb1cf
package
org.apache.lucene.util
;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
import
java.util.Locale
;
/**
* Use by certain classes to match version compatibility across releases of
* Lucene.
*
* <p>
* <b>WARNING</b>: When changing the version parameter that you supply to
* components in Lucene, do not simply change the version at search-time, but
* instead also adjust your indexing code to match, and re-index.
*/
public
enum
Version
{
/**
* Match settings and bugs in Lucene's 2.0 release.
*
* @deprecated (3.1) Use latest
*/
@Deprecated
LUCENE_20
,
/**
* Match settings and bugs in Lucene's 2.1 release.
*
* @deprecated (3.1) Use latest
*/
@Deprecated
LUCENE_21
,
/**
* Match settings and bugs in Lucene's 2.2 release.
*
* @deprecated (3.1) Use latest
*/
@Deprecated
LUCENE_22
,
/**
* Match settings and bugs in Lucene's 2.3 release.
*
* @deprecated (3.1) Use latest
*/
@Deprecated
LUCENE_23
,
/**
* Match settings and bugs in Lucene's 2.4 release.
*
* @deprecated (3.1) Use latest
*/
@Deprecated
LUCENE_24
,
/**
* Match settings and bugs in Lucene's 2.9 release.
*
* @deprecated (3.1) Use latest
*/
@Deprecated
LUCENE_29
,
/**
* Match settings and bugs in Lucene's 3.0 release.
*
* @deprecated (4.0) Use latest
*/
@Deprecated
LUCENE_30
,
/**
* Match settings and bugs in Lucene's 3.1 release.
*
* @deprecated (4.0) Use latest
*/
@Deprecated
LUCENE_31
,
/**
* Match settings and bugs in Lucene's 3.2 release.
*
* @deprecated (4.0) Use latest
*/
@Deprecated
LUCENE_32
,
/**
* Match settings and bugs in Lucene's 3.3 release.
*
* @deprecated (4.0) Use latest
*/
@Deprecated
LUCENE_33
,
/**
* Match settings and bugs in Lucene's 3.4 release.
*
* @deprecated (4.0) Use latest
*/
@Deprecated
LUCENE_34
,
/**
* Match settings and bugs in Lucene's 3.5 release.
*
* @deprecated (4.0) Use latest
*/
@Deprecated
LUCENE_35
,
/**
* Match settings and bugs in Lucene's 3.6 release.
*
* @deprecated (4.0) Use latest
*/
@Deprecated
LUCENE_36
,
/**
* Match settings and bugs in Lucene's 3.6 release.
*
* @deprecated (4.1) Use latest
*/
@Deprecated
LUCENE_40
,
/**
* Match settings and bugs in Lucene's 4.1 release.
*
* @deprecated (4.2) Use latest
*/
@Deprecated
LUCENE_41
,
/**
* Match settings and bugs in Lucene's 4.2 release.
*
* @deprecated (4.3) Use latest
*/
@Deprecated
LUCENE_42
,
/**
* Match settings and bugs in Lucene's 4.3 release.
*
* @deprecated (4.4) Use latest
*/
@Deprecated
LUCENE_43
,
/**
* Match settings and bugs in Lucene's 4.4 release.
*
* @deprecated (4.5) Use latest
*/
@Deprecated
LUCENE_44
,
/**
* Match settings and bugs in Lucene's 4.5 release.
*
* @deprecated (4.6) Use latest
*/
@Deprecated
LUCENE_45
,
/**
* Match settings and bugs in Lucene's 4.6 release.
*
* @deprecated (4.7) Use latest
*/
@Deprecated
LUCENE_46
,
/**
* Match settings and bugs in Lucene's 4.7 release.
*
* @deprecated (4.8) Use latest
*/
@Deprecated
LUCENE_47
,
/**
* Match settings and bugs in Lucene's 4.8 release.
* <p>
* Use this to get the latest & greatest settings, bug fixes, etc, for
* Lucene.
*/
LUCENE_48
,
/* Add new constants for later versions **here** to respect order! */
/**
* <p>
* <b>WARNING</b>: if you use this setting, and then upgrade to a newer
* release of Lucene, sizable changes may happen. If backwards compatibility
* is important then you should instead explicitly specify an actual
* version.
* <p>
* If you use this constant then you may need to <b>re-index all of your
* documents</b> when upgrading Lucene, as the way text is indexed may have
* changed. Additionally, you may need to <b>re-test your entire
* application</b> to ensure it behaves as expected, as some defaults may
* have changed and may break functionality in your application.
*
* @deprecated Use an actual version instead.
*/
@Deprecated
LUCENE_CURRENT
;
public
boolean
onOrAfter
(
Version
other
)
{
return
compareTo
(
other
)
>=
0
;
}
public
static
Version
parseLeniently
(
String
version
)
{
String
parsedMatchVersion
=
version
.
toUpperCase
(
Locale
.
ROOT
);
return
Version
.
valueOf
(
parsedMatchVersion
.
replaceFirst
(
"^(\\d)\\.(\\d)$"
,
"LUCENE_$1$2"
));
}
}
src/main/java/org/genesys2/server/
servlet/controller/rest
/AccessionDetails.java
→
src/main/java/org/genesys2/server/
model/elastic
/AccessionDetails.java
View file @
c11fb1cf
package
org.genesys2.server.
servlet.controller.rest
;
package
org.genesys2.server.
model.elastic
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.
Map
;
import
java.util.
regex.Pattern
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.log4j.Logger
;
import
org.genesys2.server.model.genesys.Accession
;
import
org.genesys2.server.model.genesys.AccessionAlias
;
import
org.genesys2.server.model.genesys.AccessionBreeding
;
...
...
@@ -14,117 +15,95 @@ import org.genesys2.server.model.genesys.AccessionCollect;
import
org.genesys2.server.model.genesys.AccessionExchange
;
import
org.genesys2.server.model.genesys.AccessionGeo
;
import
org.genesys2.server.model.genesys.AccessionRemark
;
import
org.genesys2.server.model.genesys.ExperimentTrait
;
import
org.genesys2.server.model.genesys.Method
;
import
org.genesys2.server.model.genesys.SvalbardData
;
import
org.genesys2.server.model.genesys.Taxonomy2
;
import
org.genesys2.server.model.impl.Crop
;
import
org.genesys2.server.model.impl.FaoInstitute
;
import
org.springframework.data.annotation.Id
;
import
org.springframework.data.annotation.Version
;
import
org.springframework.data.elasticsearch.annotations.Document
;
import
org.springframework.data.elasticsearch.annotations.Field
;
import
org.springframework.data.elasticsearch.annotations.FieldIndex
;
import
org.springframework.data.elasticsearch.annotations.FieldType
;
@Document
(
indexName
=
"genesys"
,
type
=
"mcpd"
,
refreshInterval
=
"-1"
)
public
class
AccessionDetails
{
public
long
version
;
public
Long
id
;
public
String
uuid
;
public
String
acceNumb
;
public
String
acqDate
;
public
String
acqSrc
;
public
Boolean
availability
;
public
Date
createdDate
;
public
String
duplSite
;
public
Boolean
mlsStatus
;
public
Integer
sampStat
;
public
List
<
Integer
>
storage
;
public
Institute
institute
;
public
Country
orgCty
;
public
Taxonomy
taxonomy
;
public
ArrayList
<
Alias
>
aliases
;
public
Svalbard
sgsv
;
public
ArrayList
<
Remark
>
remarks
;
public
ArrayList
<
String
>
crops
;
public
Geo
geo
;
public
Collect
coll
;
public
String
pedigree
;
public
String
donorCode
;
public
String
donorName
;
public
String
donorNumb
;
public
HashMap
<
String
,
List
<
Object
>>
traits
;
private
static
final
Logger
LOG
=
Logger
.
getLogger
(
AccessionDetails
.
class
);
private
static
Pattern
mcpdSplit
=
Pattern
.
compile
(
"\\w*;\\w*"
);
@Version
private
Long
version
;
@Id
private
Long
id
;
@Field
(
index
=
FieldIndex
.
not_analyzed
,
type
=
FieldType
.
String
)
private
String
uuid
;
@Field
(
type
=
FieldType
.
String
)
private
String
acceNumb
;
@Field
(
index
=
FieldIndex
.
not_analyzed
,
type
=
FieldType
.
String
)
private
String
acqDate
;
@Field
(
index
=
FieldIndex
.
not_analyzed
,
type
=
FieldType
.
String
)
private
String
acqSrc
;
private
Boolean
availability
;
private
Date
createdDate
;
private
List
<
String
>
duplSite
;
private
Boolean
mlsStatus
;
private
Integer
sampStat
;
private
List
<
Integer
>
storage
;
@Field
(
type
=
FieldType
.
Object
)
private
Institute
institute
;
@Field
(
type
=
FieldType
.
Object
)
private
Country
orgCty
;
@Field
(
type
=
FieldType
.
Object
)
private
Taxonomy
taxonomy
;
@Field
(
type
=
FieldType
.
Nested
)
private
ArrayList
<
Alias
>
aliases
;
private
Svalbard
sgsv
;
@Field
(
type
=
FieldType
.
Nested
,
store
=
false
)
private
ArrayList
<
Remark
>
remarks
;
@Field
(
index
=
FieldIndex
.
not_analyzed
,
type
=
FieldType
.
String
)
private
ArrayList
<
String
>
crops
;
@Field
(
type
=
FieldType
.
Object
)
private
Geo
geo
;
@Field
(
type
=
FieldType
.
Object
)
private
Collect
coll
;
private
String
pedigree
;
@Field
(
index
=
FieldIndex
.
not_analyzed
,
type
=
FieldType
.
String
)
private
String
donorCode
;
private
String
donorName
;
@Field
(
index
=
FieldIndex
.
not_analyzed
,
type
=
FieldType
.
String
)
private
String
donorNumb
;
private
Date
modifiedDate
;
private
Date
acqusitionDate
;
public
static
AccessionDetails
from
(
Accession
accession
)
{
AccessionDetails
ad
=
new
AccessionDetails
();
ad
.
version
=
accession
.
getVersion
();
ad
.
id
=
accession
.
getId
();
ad
.
uuid
=
accession
.
getUuid
();
ad
.
createdDate
=
accession
.
getCreatedDate
();
ad
.
modifiedDate
=
accession
.
getLastModifiedDate
();
ad
.
acceNumb
=
accession
.
getAccessionName
();
ad
.
acqDate
=
accession
.
getAcquisitionDate
();
ad
.
acqSrc
=
accession
.
getAcquisitionSource
();
ad
.
availability
=
accession
.
getAvailability
();
ad
.
orgCty
=
Country
.
from
(
accession
.
getCountryOfOrigin
());
ad
.
createdDate
=
accession
.
getCreatedDate
();
ad
.
duplSite
=
accession
.
getDuplSite
(
);
ad
.
institute
=
AccessionDetails
.
Institute
.
from
(
accession
.
getInstitute
());
if
(
StringUtils
.
isNotBlank
(
accession
.
getDuplSite
()))
ad
.
duplSite
=
Arrays
.
asList
(
mcpdSplit
.
split
(
accession
.
getDuplSite
())
);
ad
.
institute
=
Institute
.
from
(
accession
.
getInstitute
());
ad
.
mlsStatus
=
accession
.
getMlsStatus
();
ad
.
sampStat
=
accession
.
getSampleStatus
();
ad
.
storage
=
accession
.
getStoRage
();
ad
.
taxonomy
=
Taxonomy
.
from
(
accession
.
getTaxonomy
());
return
ad
;
}
public
static
class
Institute
{
public
Long
id
;
public
String
acronym
;
public
String
code
;
public
Country
country
;
public
String
fullName
;
public
static
Institute
from
(
FaoInstitute
institute
)
{
Institute
i
=
new
Institute
();
i
.
id
=
institute
.
getId
();
i
.
acronym
=
institute
.
getAcronym
();
i
.
code
=
institute
.
getCode
();
i
.
country
=
Country
.
from
(
institute
.
getCountry
());
i
.
fullName
=
institute
.
getFullName
();
return
i
;
}
}
public
static
class
Country
{
public
String
iso3
;
public
String
iso2
;
public
String
name
;
public
static
Country
from
(
org
.
genesys2
.
server
.
model
.
impl
.
Country
country
)
{
Country
c
=
new
Country
();
c
.
iso3
=
country
.
getCode3
();
c
.
iso2
=
country
.
getCode2
();
c
.
name
=
country
.
getName
();
return
c
;
}
}
public
static
class
Taxonomy
{
public
String
sciName
;
public
String
genus
;
public
String
species
;
public
String
spAuthor
;
public
String
subtax
;
public
String
subtAuthor
;
public
static
Taxonomy
from
(
Taxonomy2
taxonomy
)
{
Taxonomy
t
=
new
Taxonomy
();
t
.
sciName
=
taxonomy
.
getTaxonName
();
t
.
genus
=
taxonomy
.
getGenus
();
t
.
species
=
taxonomy
.
getSpecies
();
t
.
spAuthor
=
StringUtils
.
defaultIfBlank
(
taxonomy
.
getSpAuthor
(),
null
);
t
.
subtax
=
StringUtils
.
defaultIfBlank
(
taxonomy
.
getSubtaxa
(),
null
);
t
.
subtAuthor
=
StringUtils
.
defaultIfBlank
(
taxonomy
.
getSubtAuthor
(),
null
);
return
t
;
if
(
ad
.
taxonomy
==
null
)
{
LOG
.
warn
(
"Go check "
+
ad
.
id
);
}
return
ad
;
}
public
void
aliases
(
List
<
AccessionAlias
>
listAccessionAliases
)
{
...
...
@@ -136,44 +115,10 @@ public class AccessionDetails {
}
}
public
static
class
Alias
{
public
String
name
;
public
String
lang
;
public
String
usedBy
;
public
static
Alias
from
(
AccessionAlias
aa
)
{
Alias
a
=
new
Alias
();
a
.
name
=
aa
.
getName
();
a
.
lang
=
StringUtils
.
defaultIfBlank
(
aa
.
getLang
(),
null
);
a
.
usedBy
=
StringUtils
.
defaultIfBlank
(
aa
.
getUsedBy
(),
null
);
return
a
;
}
}
public
void
svalbard
(
SvalbardData
svalbardData
)
{
this
.
sgsv
=
Svalbard
.
from
(
svalbardData
);
}
public
static
class
Svalbard
{
public
Float
qty
;
public
String
boxNo
;
public
String
depositDate
;
public
static
Svalbard
from
(
SvalbardData
svalbardData
)
{
if
(
svalbardData
==
null
)
return
null
;
Svalbard
s
=
new
Svalbard
();
s
.
boxNo
=
svalbardData
.
getBoxNumber
();
s
.
qty
=
svalbardData
.
getQuantity
();
s
.
depositDate
=
svalbardData
.
getDepositDate
();
return
s
;
}
}
public
void
remarks
(
List
<
AccessionRemark
>
listAccessionRemarks
)
{
if
(
listAccessionRemarks
==
null
||
listAccessionRemarks
.
isEmpty
())
return
;
...
...
@@ -183,20 +128,6 @@ public class AccessionDetails {
}
}
public
static
class
Remark
{
public
String
field
;
public
String
remark
;
public
static
Remark
from
(
AccessionRemark
ar
)
{
Remark
r
=
new
Remark
();
r
.
field
=
StringUtils
.
defaultIfBlank
(
ar
.
getFieldName
(),
null
);
r
.
remark
=
StringUtils
.
defaultIfBlank
(
ar
.
getRemark
(),
null
);
return
r
;
}
}
public
void
crops
(
List
<
Crop
>
crops
)
{
if
(
crops
==
null
||
crops
.
isEmpty
())
return
;
...
...
@@ -212,65 +143,10 @@ public class AccessionDetails {
this
.
geo
=
Geo
.
from
(
ag
);
}
public
static
class
Geo
{
public
String
method
;
public
Double
uncertainty
;
public
Double
latitude
;
public
Double
longitude
;
public
Double
[]
coordinates
;
public
Double
elevation
;
public
String
datum
;