Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPSLogic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VIPS
VIPSLogic
Commits
7964ce90
Commit
7964ce90
authored
3 years ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
Added language support for observation list items
parent
2ce1a635
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/no/nibio/vips/logic/entity/Observation.java
+2
-2
2 additions, 2 deletions
src/main/java/no/nibio/vips/logic/entity/Observation.java
src/main/java/no/nibio/vips/logic/service/ObservationService.java
+7
-4
7 additions, 4 deletions
.../java/no/nibio/vips/logic/service/ObservationService.java
with
9 additions
and
6 deletions
src/main/java/no/nibio/vips/logic/entity/Observation.java
+
2
−
2
View file @
7964ce90
...
...
@@ -639,9 +639,9 @@ public class Observation implements Serializable, no.nibio.vips.observation.Obse
this
.
getObservationId
(),
this
.
getTimeOfObservation
(),
this
.
getOrganismId
(),
this
.
getOrganism
().
getLocalName
(
locale
),
this
.
getOrganism
().
getLocalName
(
locale
)
.
trim
()
!=
""
?
this
.
getOrganism
().
getLocalName
(
locale
)
:
this
.
getOrganism
().
getLatinName
()
,
this
.
getCropOrganismId
(),
this
.
getCropOrganism
().
getLocalName
(
locale
),
this
.
getCropOrganism
().
getLocalName
(
locale
)
.
trim
()
!=
""
?
this
.
getCropOrganism
().
getLocalName
(
locale
)
:
this
.
getCropOrganism
().
getLatinName
()
,
// Specific geoInfo trumps location. This is to be interpreted
// as that the observation has been geographically masked by
// choice of the observer
...
...
This diff is collapsed.
Click to expand it.
src/main/java/no/nibio/vips/logic/service/ObservationService.java
+
7
−
4
View file @
7964ce90
...
...
@@ -142,16 +142,19 @@ public class ObservationService {
@QueryParam
(
"cropCategoryId"
)
List
<
Integer
>
cropCategoryId
,
@QueryParam
(
"from"
)
String
fromStr
,
@QueryParam
(
"to"
)
String
toStr
,
@QueryParam
(
"userUUID"
)
String
userUUID
@QueryParam
(
"userUUID"
)
String
userUUID
,
@QueryParam
(
"locale"
)
String
localeStr
)
{
VipsLogicUser
user
=
(
VipsLogicUser
)
httpServletRequest
.
getSession
().
getAttribute
(
"user"
);
if
(
user
==
null
&&
userUUID
!=
null
)
{
user
=
SessionControllerGetter
.
getUserBean
().
findVipsLogicUser
(
UUID
.
fromString
(
userUUID
));
}
//System.out.println("getFilteredObservationListItems");
String
locale
=
localeStr
!=
null
?
localeStr
:
user
!=
null
?
user
.
getOrganizationId
().
getDefaultLocale
()
:
SessionControllerGetter
.
getUserBean
().
getOrganization
(
organizationId
).
getDefaultLocale
();
return
Response
.
ok
().
entity
(
getFilteredObservationsFromBackend
(
organizationId
,
...
...
@@ -161,7 +164,7 @@ public class ObservationService {
fromStr
,
toStr
,
user
).
stream
().
map
(
obs
->
obs
.
getListItem
(
"nb"
)).
collect
(
Collectors
.
toList
())
).
stream
().
map
(
obs
->
obs
.
getListItem
(
locale
)).
collect
(
Collectors
.
toList
())
).
build
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment