Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Backend
Commits
1355c915
Commit
1355c915
authored
Jan 13, 2016
by
Matija Obreza
Browse files
Genus may not contain "sp.", " " is permitted
parent
816d09f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/genesys2/server/service/impl/BatchRESTServiceImpl.java
View file @
1355c915
...
...
@@ -106,8 +106,8 @@ public class BatchRESTServiceImpl implements BatchRESTService {
current
.
setSubtaxa
(
StringUtils
.
defaultIfBlank
(
stringIfProvided
(
accnJson
.
get
(
Api1Constants
.
Accession
.
SUBTAXA
),
current
.
getSubtaxa
()),
""
));
current
.
setSubtAuthor
(
StringUtils
.
defaultIfBlank
(
stringIfProvided
(
accnJson
.
get
(
Api1Constants
.
Accession
.
SUBTAUTHOR
),
current
.
getSubtAuthor
()),
""
));
if
(
current
.
getGenus
().
contains
(
"
"
)
||
current
.
getGenus
().
contains
(
"
sp."
))
{
throw
new
RESTApiException
(
"GENUS cannot contain
spaces or
'sp.'. Offending genus: "
+
current
.
getGenus
());
if
(
current
.
getGenus
().
contains
(
"sp."
))
{
throw
new
RESTApiException
(
"GENUS cannot contain 'sp.'. Offending genus: "
+
current
.
getGenus
());
}
if
(
LOG
.
isDebugEnabled
())
{
...
...
@@ -829,7 +829,7 @@ public class BatchRESTServiceImpl implements BatchRESTService {
if
(
jsonNode
.
isNull
())
{
return
null
;
}
return
StringUtils
.
defaultIfBlank
(
jsonNode
.
textValue
(),
currentValue
);
return
StringUtils
.
defaultIfBlank
(
jsonNode
.
textValue
()
.
trim
()
,
currentValue
);
}
return
currentValue
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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