1 package org.simantics.document.linking.report.evaluator;
6 import org.eclipse.jface.resource.ImageDescriptor;
7 import org.simantics.db.ReadGraph;
8 import org.simantics.db.exception.DatabaseException;
9 import org.simantics.db.layer0.variable.Variable;
10 import org.simantics.document.linking.report.DocumentLine;
14 * Base interface for user configurable content.
16 * @author Marko Luukkainen <marko.luukkainen@vtt.fi>
19 public interface EvaluatorItem {
22 * Returns rootNode of the evaluation tree, or null.
25 public EvaluatorRoot getRoot();
28 * Return parent node, or null.
31 public EvaluatorNode getParent();
34 * Sets parent node. This method is for internal use only.
37 void setParent(EvaluatorNode parent);
40 * Returns result of evaluation as a single String. Lines are separated with line.separator system property. All styling hints are omitted.
45 * @throws DatabaseException
47 public String getValue(ReadGraph graph, Variable variable, Map<Object, Object> context) throws DatabaseException;
50 * Returns result of evaluation as collection of lines with styling hints.
55 * @throws DatabaseException
57 public List<DocumentLine> getLines(ReadGraph graph, Variable variable, Map<Object, Object> context) throws DatabaseException;
60 * Copies the evaluation node and its children.
63 public EvaluatorItem copy();
67 public ImageDescriptor getImage();