686cc9c45e1935322425161bd39f07b84abcd32c
2 * Copyright (C) 2019 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.taxeditor
.view
.search
.facet
.term
;
11 import java
.util
.HashSet
;
14 import eu
.etaxonomy
.cdm
.model
.common
.TermType
;
15 import eu
.etaxonomy
.cdm
.persistence
.dto
.TermDto
;
16 import eu
.etaxonomy
.cdm
.remote
.l10n
.TermRepresentation_L10n
;
17 import eu
.etaxonomy
.taxeditor
.view
.search
.facet
.Facet
;
18 import eu
.etaxonomy
.taxeditor
.view
.search
.facet
.SearchResult
;
25 public class TermSearchResult
extends SearchResult
<TermDto
> {
27 public TermSearchResult(TermDto content
) {
32 protected Set
<Facet
> initFacets(TermDto content
) {
33 Set
<Facet
> facets
= new HashSet
<>();
34 content
.localize(new TermRepresentation_L10n());
35 TermType termType
= content
.getTermType();
36 facets
.add(new Facet(content
.getVocRepresentation_L10n(), termType
!=null?termType
.getMessage():null));