3 * Copyright (C) 2009 EDIT
4 * European Distributed Institute of Taxonomy
5 * http://www.e-taxonomy.eu
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.
10 package eu
.etaxonomy
.cdm
.api
.service
.statistics
;
12 import java
.util
.ArrayList
;
13 import java
.util
.Collections
;
14 import java
.util
.List
;
16 import eu
.etaxonomy
.cdm
.model
.common
.IdentifiableEntity
;
19 * This class configures the statistical request to
20 * a CDM Store. It defines which statistical values should
21 * be computed and returned.
28 public class StatisticsConfigurator
{
30 public static StatisticsConfigurator
NewDefaultAllConfigurator(){
31 StatisticsConfigurator result
= new StatisticsConfigurator();
32 result
.addPart(StatisticsPartEnum
.ALL
);
37 private List
<IdentifiableEntity
> filter
= new ArrayList
<IdentifiableEntity
>();
38 private List
<StatisticsPartEnum
> partList
;
41 // *************************** METHODS ******************************/
43 public void addPart(StatisticsPartEnum part
) {
44 this.partList
.add(part
);
47 public void addPart(int index
, StatisticsPartEnum part
) {
48 this.partList
.add(index
, part
);
51 public List
<StatisticsPartEnum
> getPartList() {
52 return Collections
.unmodifiableList(partList
);
56 public List
<IdentifiableEntity
> getFilter() {
60 public void addFilter(IdentifiableEntity filterItem
) {
61 this.filter
.add(filterItem
);