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
19
Issues
19
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
889e36af
Commit
889e36af
authored
Sep 01, 2014
by
Matija Obreza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Exclude NOR051 (SGSV) from DUPLSITE stats
TODOs for AccessionDetails, Taxonomy, ExplorerController#overview
parent
711a7e56
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
6 deletions
+39
-6
src/main/java/org/genesys2/server/model/elastic/AccessionDetails.java
...a/org/genesys2/server/model/elastic/AccessionDetails.java
+17
-3
src/main/java/org/genesys2/server/model/elastic/Taxonomy.java
...main/java/org/genesys2/server/model/elastic/Taxonomy.java
+3
-0
src/main/java/org/genesys2/server/service/impl/ElasticsearchSearchServiceImpl.java
...2/server/service/impl/ElasticsearchSearchServiceImpl.java
+8
-3
src/main/java/org/genesys2/server/servlet/controller/ExplorerController.java
...enesys2/server/servlet/controller/ExplorerController.java
+1
-0
src/main/webapp/WEB-INF/jsp/accession/overview.jsp
src/main/webapp/WEB-INF/jsp/accession/overview.jsp
+10
-0
No files found.
src/main/java/org/genesys2/server/model/elastic/AccessionDetails.java
View file @
889e36af
...
@@ -46,6 +46,8 @@ public class AccessionDetails {
...
@@ -46,6 +46,8 @@ public class AccessionDetails {
private
Boolean
available
;
private
Boolean
available
;
private
Date
createdDate
;
private
Date
createdDate
;
// FIXME @Field(index = FieldIndex.not_analyzed, type = FieldType.String)
// FIXME @Field(index = FieldIndex.not_analyzed, type = FieldType.String)
// TODO Also handle ElasticsearchSearchServiceImpl and move to #isAnalyzed()
// section!
private
List
<
String
>
duplSite
;
private
List
<
String
>
duplSite
;
private
Boolean
mlsStatus
;
private
Boolean
mlsStatus
;
private
Boolean
art15
;
private
Boolean
art15
;
...
@@ -61,6 +63,8 @@ public class AccessionDetails {
...
@@ -61,6 +63,8 @@ public class AccessionDetails {
@Field
(
type
=
FieldType
.
Nested
)
@Field
(
type
=
FieldType
.
Nested
)
private
ArrayList
<
Alias
>
aliases
;
private
ArrayList
<
Alias
>
aliases
;
private
Svalbard
sgsv
;
private
Svalbard
sgsv
;
// FIXME TODO Enable inSgsv!
// private boolean inSgsv;
@Field
(
type
=
FieldType
.
Nested
,
store
=
false
)
@Field
(
type
=
FieldType
.
Nested
,
store
=
false
)
private
ArrayList
<
Remark
>
remarks
;
private
ArrayList
<
Remark
>
remarks
;
...
@@ -120,6 +124,8 @@ public class AccessionDetails {
...
@@ -120,6 +124,8 @@ public class AccessionDetails {
public
void
svalbard
(
SvalbardData
svalbardData
)
{
public
void
svalbard
(
SvalbardData
svalbardData
)
{
this
.
sgsv
=
Svalbard
.
from
(
svalbardData
);
this
.
sgsv
=
Svalbard
.
from
(
svalbardData
);
// FIXME TODO inSgsv
// this.inSgsv = this.sgsv != null;
}
}
public
void
remarks
(
List
<
AccessionRemark
>
listAccessionRemarks
)
{
public
void
remarks
(
List
<
AccessionRemark
>
listAccessionRemarks
)
{
...
@@ -387,4 +393,12 @@ public class AccessionDetails {
...
@@ -387,4 +393,12 @@ public class AccessionDetails {
public
void
setArt15
(
Boolean
art15
)
{
public
void
setArt15
(
Boolean
art15
)
{
this
.
art15
=
art15
;
this
.
art15
=
art15
;
}
}
// TODO FIXME enable #inSgsv
// public boolean isInSgsv() {
// return inSgsv;
// }
// public void setInSgsv(boolean inSgsv) {
// this.inSgsv = inSgsv;
// }
}
}
src/main/java/org/genesys2/server/model/elastic/Taxonomy.java
View file @
889e36af
...
@@ -13,6 +13,9 @@ public class Taxonomy {
...
@@ -13,6 +13,9 @@ public class Taxonomy {
private
String
genus
;
private
String
genus
;
@Field
(
index
=
FieldIndex
.
not_analyzed
,
type
=
FieldType
.
String
)
@Field
(
index
=
FieldIndex
.
not_analyzed
,
type
=
FieldType
.
String
)
private
String
species
;
private
String
species
;
// TODO FIXME Enable non-indexed access to genus+species
// @Field(index = FieldIndex.not_analyzed, type = FieldType.String)
// private String genusSpecies;
private
String
spAuthor
;
private
String
spAuthor
;
private
String
subtax
;
private
String
subtax
;
private
String
subtAuthor
;
private
String
subtAuthor
;
...
...
src/main/java/org/genesys2/server/service/impl/ElasticsearchSearchServiceImpl.java
View file @
889e36af
...
@@ -116,7 +116,12 @@ public class ElasticsearchSearchServiceImpl implements ElasticService, Initializ
...
@@ -116,7 +116,12 @@ public class ElasticsearchSearchServiceImpl implements ElasticService, Initializ
AndFilterBuilder
filterBuilder
=
getFilterBuilder
(
appliedFilters
);
AndFilterBuilder
filterBuilder
=
getFilterBuilder
(
appliedFilters
);
FacetRequest
termFacetRequest
=
new
TermFacetRequestBuilder
(
"f"
).
applyQueryFilter
().
fields
(
term
).
size
(
size
).
build
();
FacetRequest
termFacetRequest
;
if
(
FilterConstants
.
DUPLSITE
.
equals
(
term
))
{
termFacetRequest
=
new
TermFacetRequestBuilder
(
"f"
).
applyQueryFilter
().
fields
(
term
).
excludeTerms
(
"nor051"
).
size
(
size
).
build
();
}
else
{
termFacetRequest
=
new
TermFacetRequestBuilder
(
"f"
).
applyQueryFilter
().
fields
(
term
).
size
(
size
).
build
();
}
SearchQuery
searchQuery
=
new
NativeSearchQueryBuilder
().
withFilter
(
filterBuilder
).
withFacet
(
termFacetRequest
).
build
();
SearchQuery
searchQuery
=
new
NativeSearchQueryBuilder
().
withFilter
(
filterBuilder
).
withFacet
(
termFacetRequest
).
build
();
try
{
try
{
...
...
src/main/java/org/genesys2/server/servlet/controller/ExplorerController.java
View file @
889e36af
...
@@ -482,6 +482,7 @@ public class ExplorerController extends BaseController {
...
@@ -482,6 +482,7 @@ public class ExplorerController extends BaseController {
private
void
overviewManagement
(
ModelMap
model
,
AppliedFilters
appliedFilters
)
throws
SearchException
{
private
void
overviewManagement
(
ModelMap
model
,
AppliedFilters
appliedFilters
)
throws
SearchException
{
model
.
addAttribute
(
"statsStorage"
,
elasticService
.
termStatisticsAuto
(
appliedFilters
,
FilterConstants
.
STORAGE
,
30
));
model
.
addAttribute
(
"statsStorage"
,
elasticService
.
termStatisticsAuto
(
appliedFilters
,
FilterConstants
.
STORAGE
,
30
));
model
.
addAttribute
(
"statsDuplSite"
,
elasticService
.
termStatisticsAuto
(
appliedFilters
,
FilterConstants
.
DUPLSITE
,
10
));
model
.
addAttribute
(
"statsDuplSite"
,
elasticService
.
termStatisticsAuto
(
appliedFilters
,
FilterConstants
.
DUPLSITE
,
10
));
model
.
addAttribute
(
"statsSGSV"
,
elasticService
.
termStatistics
(
appliedFilters
,
FilterConstants
.
SGSV
,
2
));
}
}
private
void
overviewComposition
(
ModelMap
model
,
AppliedFilters
appliedFilters
)
throws
SearchException
{
private
void
overviewComposition
(
ModelMap
model
,
AppliedFilters
appliedFilters
)
throws
SearchException
{
...
...
src/main/webapp/WEB-INF/jsp/accession/overview.jsp
View file @
889e36af
...
@@ -194,6 +194,16 @@
...
@@ -194,6 +194,16 @@
<c:remove
var=
"termResult"
/>
<c:remove
var=
"termResult"
/>
<c:remove
var=
"type"
/>
<c:remove
var=
"type"
/>
</div>
</div>
<%-- TODO FIXME enable #inSgsv
<div class="col-xs-12 col-sm-6 row-section">
<h4 id="stats-duplsite"><spring:message code="filter.sgsv" /></h4>
<c:set var="type" value="bool" />
<c:set var="termResult" value="${statsSGSV}" />
<%@include file="termresult.jspf"%>
<c:remove var="termResult" />
<c:remove var="type" />
</div>
--%>
</div>
</div>
...
...
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