1
|
/**
|
2
|
* Copyright (C) 2019 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
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.
|
8
|
*/
|
9
|
package eu.etaxonomy.taxeditor.view.search.facet.term;
|
10
|
|
11
|
import java.util.HashSet;
|
12
|
import java.util.Set;
|
13
|
|
14
|
import eu.etaxonomy.cdm.persistence.dto.TermDto;
|
15
|
import eu.etaxonomy.cdm.remote.l10n.TermRepresentation_L10n;
|
16
|
import eu.etaxonomy.taxeditor.view.search.facet.Facet;
|
17
|
import eu.etaxonomy.taxeditor.view.search.facet.SearchResult;
|
18
|
|
19
|
/**
|
20
|
* @author pplitzner
|
21
|
* @since Jan 24, 2019
|
22
|
*
|
23
|
*/
|
24
|
public class TermSearchResult extends SearchResult<TermDto> {
|
25
|
|
26
|
public TermSearchResult(TermDto content) {
|
27
|
super(content);
|
28
|
}
|
29
|
|
30
|
@Override
|
31
|
protected Set<Facet> initFacets(TermDto content) {
|
32
|
Set<Facet> facets = new HashSet<>();
|
33
|
content.localize(new TermRepresentation_L10n());
|
34
|
facets.add(new Facet(content.getVocRepresentation_L10n()));
|
35
|
return facets;
|
36
|
}
|
37
|
|
38
|
}
|