1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2009 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.cdm.api.service.statistics;
|
11
|
|
12
|
import java.util.ArrayList;
|
13
|
import java.util.Collections;
|
14
|
import java.util.List;
|
15
|
|
16
|
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
|
17
|
|
18
|
/**
|
19
|
* This class configures the statistical request to
|
20
|
* a CDM Store. It defines which statistical values should
|
21
|
* be computed and returned.
|
22
|
*
|
23
|
* on a CDM Store
|
24
|
* @author a.mueller , s.buers
|
25
|
* @date 21.09.2012
|
26
|
*
|
27
|
*/
|
28
|
|
29
|
public class StatisticsConfigurator {
|
30
|
|
31
|
|
32
|
//*********************** MEMBERS ********************************
|
33
|
|
34
|
// the filter list represents the path to
|
35
|
private List<IdentifiableEntity> filter = new ArrayList<IdentifiableEntity>();
|
36
|
|
37
|
private List<StatisticsTypeEnum> type = new ArrayList<StatisticsTypeEnum>();
|
38
|
|
39
|
|
40
|
|
41
|
// *********************** CONSTRUCTORS ***************************
|
42
|
|
43
|
|
44
|
public StatisticsConfigurator(){}
|
45
|
|
46
|
public StatisticsConfigurator(List<IdentifiableEntity> filter, List<StatisticsTypeEnum> types){
|
47
|
this.filter=filter;
|
48
|
this.type=types;
|
49
|
}
|
50
|
|
51
|
|
52
|
// *************************** METHODS ******************************/
|
53
|
|
54
|
public List<StatisticsTypeEnum> getType() {
|
55
|
return Collections.unmodifiableList(type);
|
56
|
}
|
57
|
|
58
|
public void addType(StatisticsTypeEnum type){
|
59
|
this.type.add(type);
|
60
|
}
|
61
|
|
62
|
public void setType(List<StatisticsTypeEnum> newType) {
|
63
|
this.type=newType;
|
64
|
}
|
65
|
|
66
|
//------------------------------------------------
|
67
|
|
68
|
public List<IdentifiableEntity> getFilter() {
|
69
|
return filter;
|
70
|
}
|
71
|
|
72
|
public void addFilter(IdentifiableEntity filterItem) {
|
73
|
this.filter.add(filterItem);
|
74
|
}
|
75
|
|
76
|
|
77
|
|
78
|
|
79
|
|
80
|
|
81
|
|
82
|
}
|