01: /*
02: * Created on 23.06.2005 for PIROL
03: *
04: * SVN header information:
05: * $Author: javamap $
06: * $Rev: 856 $
07: * $Date: 2007-06-18 21:15:27 -0700 (Mon, 18 Jun 2007) $
08: * $Id: FormulaValue.java 856 2007-06-19 04:15:27Z javamap $
09: */
10: package de.fho.jump.pirol.utilities.FormulaParsing;
11:
12: import com.vividsolutions.jump.feature.Feature;
13:
14: import de.fho.jump.pirol.utilities.debugOutput.DebugUserIds;
15: import de.fho.jump.pirol.utilities.debugOutput.PersonalLogger;
16:
17: /**
18: * Base class for each sub-formula or value of a formula, since we don't want to parse the formula again and again for each value...
19: *
20: * @author Ole Rahn
21: * <br>
22: * <br>FH Osnabrück - University of Applied Sciences Osnabrück,
23: * <br>Project: PIROL (2005),
24: * <br>Subproject: Daten- und Wissensmanagement
25: *
26: * @version $Rev: 856 $
27: *
28: */
29: public abstract class FormulaValue {
30:
31: protected PersonalLogger logger = new PersonalLogger(
32: DebugUserIds.ALL);
33:
34: /**
35: * Returns the value (as a double) of this part of the formula.
36: * It may be the rsult of a sub-formula, a feature-specific attribute value or just a constant value...
37: * Since the value may depend on a feature, we give the feature to the method to get a unified interface...
38: *@return value of this part of the formula
39: */
40: public abstract double getValue(Feature feature);
41:
42: /**
43: * Helps to determine, if the value depends on a feature's attribute value.
44: * @return true, if the value depends on a feature
45: */
46: public abstract boolean isFeatureDependent();
47:
48: /**
49: * @inheritDoc
50: */
51: public String toString() {
52: return "";
53: }
54:
55: }
|