BrightSide Workbench Full Report + Source Code
IElephantIndicator.java
Go to the documentation of this file.
1 /*
2  * TurrĂ³ i Cutiller Foundation. License notice.
3  * Copyright (C) 2020 Lluis TurrĂ³ Cutiller <http://www.turro.org/>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Affero General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Affero General Public License for more details.
14  *
15  * You should have received a copy of the GNU Affero General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 package org.turro.indicator;
19 
20 import java.util.List;
21 import java.util.stream.Stream;
22 import org.turro.matching.GenericSiblings;
23 
28 public interface IElephantIndicator {
29 
30  public void initIndicator();
31  public void prepareIndicator();
32  public void generateSiblings();
33 
34  public String getRoot();
35  public List<IndicatorVariable> getVariables();
36  public List<IndicatorVariable> getAllVariables();
37  public IndicatorVariable getVariable(String name);
38 
39  public boolean itsMine(String root);
40  public boolean itsMine(IndicatorVariable variable);
41 
42  public List<IndicatorVariable> getAllRankingVariables(String root);
43  public List<IndicatorVariable> getAllMatchingVariables(String root);
44 
45  public double getValue(IndicatorVariable variable, Object entity);
46  public double getValue(IndicatorVariable variable, Object entity, String relatedPath);
47 
48  //Read indicators
49  public IndicatorResult readIndicator(String storeClass, String indicator);
50 
51  // Preprocess
52  public void preprocess(IndicatorVariable variable, IPreprocessor preprocessor, String entityRoot, String relatedRoot);
53 
54  // Postprocess
55  public void postprocess(IndicatorVariable variable, IPreprocessor preprocessor, String entityRoot, String relatedRoot);
56 
57  // Streams
58  public Stream<String> getEntityPaths(String entityRoot);
59  public Stream<GenericSiblings> getSiblingPaths(String entityPath);
60 
61 }
IndicatorVariable getVariable(String name)
List< IndicatorVariable > getAllRankingVariables(String root)
List< IndicatorVariable > getAllMatchingVariables(String root)
boolean itsMine(IndicatorVariable variable)
void postprocess(IndicatorVariable variable, IPreprocessor preprocessor, String entityRoot, String relatedRoot)
List< IndicatorVariable > getVariables()
double getValue(IndicatorVariable variable, Object entity, String relatedPath)
Stream< String > getEntityPaths(String entityRoot)
List< IndicatorVariable > getAllVariables()
void preprocess(IndicatorVariable variable, IPreprocessor preprocessor, String entityRoot, String relatedRoot)
double getValue(IndicatorVariable variable, Object entity)
Stream< GenericSiblings > getSiblingPaths(String entityPath)
IndicatorResult readIndicator(String storeClass, String indicator)