very first version of some statistics classes
[cdmlib.git] / cdmlib-services / src / main / java / eu / etaxonomy / cdm / api / service / statistics / StatisticsConfigurator.java
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.Collections;
13 import java.util.List;
14
15 /**
16 * This class configures the statistical request to
17 * a CDM Store. It defines which statistical values should
18 * be computed and returned.
19 *
20 * on a CDM Store
21 * @author a.mueller
22 * @date 21.09.2012
23 *
24 */
25 public class StatisticsConfigurator {
26
27 public static StatisticsConfigurator NewDefaultAllConfigurator(){
28 StatisticsConfigurator result = new StatisticsConfigurator();
29 result.addPart(StatisticsPartEnum.ALL);
30 return result;
31 }
32
33 private List<StatisticsPartEnum> partList;
34
35
36 // *************************** METHODS ******************************/
37
38 public void addPart(StatisticsPartEnum part) {
39 this.partList.add(part);
40 }
41
42 public void addPart(int index, StatisticsPartEnum part) {
43 this.partList.add(index, part);
44 }
45
46 public List<StatisticsPartEnum> getPartList() {
47 return Collections.unmodifiableList(partList);
48 }
49
50
51
52
53 }