1 package org.simantics.document.linking.report.evaluator;
3 import java.text.DateFormat;
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.Activator;
11 import org.simantics.document.linking.ontology.DocumentLink;
12 import org.simantics.objmap.graph.annotations.GraphType;
15 @GraphType(DocumentLink.URIs.EvaluatorTree_Date)
16 public class Date extends EvaluatorLeaf {
20 public String getValue(ReadGraph graph, Variable variable, Map<Object, Object> context) throws DatabaseException {
26 public String toString() {
30 private String getDate() {
31 java.util.Date date = new java.util.Date(System.currentTimeMillis());
32 String dateString = DateFormat.getDateTimeInstance().format(date);
37 public EvaluatorItem copy() {
42 public ImageDescriptor getImage() {
43 return Activator.imageDescriptorFromPlugin("com.famfamfam.silk", "icons/date.png");