Project

General

Profile

Download (1.84 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2009 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.cdm.api.service.statistics;
10

    
11
import java.util.ArrayList;
12
import java.util.Collections;
13
import java.util.List;
14

    
15
import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
16

    
17
/**
18
 * This class configures the statistical request to 
19
 * a CDM Store. It defines which statistical values should
20
 * be computed and returned.
21
 * 
22
 * on a CDM Store
23
 * @author a.mueller , s.buers
24
 * @since 21.09.2012
25
 *
26
 */
27

    
28
public class StatisticsConfigurator {
29
	
30

    
31
	//*********************** MEMBERS ********************************
32

    
33
	// the filter list represents the path to 
34
	private List<IdentifiableEntity> filter = new ArrayList<IdentifiableEntity>();
35

    
36
	private List<StatisticsTypeEnum> type = new ArrayList<StatisticsTypeEnum>();
37
	
38
	
39
	
40
	// *********************** CONSTRUCTORS ***************************
41
	
42
	
43
	public StatisticsConfigurator(){}
44
	
45
	public StatisticsConfigurator(List<IdentifiableEntity> filter, List<StatisticsTypeEnum> types){
46
		this.filter=filter;
47
		this.type=types;
48
	}
49
	
50
	
51
	// *************************** METHODS ******************************/
52
	
53
	public List<StatisticsTypeEnum> getType() {
54
		return Collections.unmodifiableList(type);
55
	}
56
	
57
	public void addType(StatisticsTypeEnum type){
58
		this.type.add(type);
59
	}
60
	
61
	public void setType(List<StatisticsTypeEnum> newType) {
62
		this.type=newType;	
63
	}
64

    
65
	//------------------------------------------------
66
	
67
	public List<IdentifiableEntity> getFilter() {
68
		return filter;
69
	}
70
	
71
	public void addFilter(IdentifiableEntity filterItem) {
72
		this.filter.add(filterItem);
73
	}
74

    
75

    
76

    
77
	
78
	
79
	
80
	
81
}
(2-2/4)