]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.modeling/src/org/simantics/modeling/query/QueryRootVariable.java
Find SCL references in SCLModuleEditor with Ctrl+Shift+G
[simantics/platform.git] / bundles / org.simantics.modeling / src / org / simantics / modeling / query / QueryRootVariable.java
1 package org.simantics.modeling.query;
2
3 import org.simantics.databoard.Bindings;
4 import org.simantics.db.ReadGraph;
5 import org.simantics.db.Resource;
6 import org.simantics.db.exception.DatabaseException;
7 import org.simantics.db.layer0.variable.ConstantPropertyVariable;
8 import org.simantics.db.layer0.variable.ProxyChildVariable;
9 import org.simantics.db.layer0.variable.StandardGraphChildVariable;
10 import org.simantics.db.layer0.variable.Variable;
11 import org.simantics.db.layer0.variable.Variables;
12
13 public class QueryRootVariable extends StandardGraphChildVariable {
14
15     public QueryRootVariable(QueryProxyChildVariable parent, Resource resource) {
16         super(parent, null, resource);
17     }
18     
19     @Override
20     public String getName(ReadGraph graph) throws DatabaseException {
21         return ProxyChildVariable.CONTEXT_END;
22     }
23     
24     @SuppressWarnings("deprecation")
25     @Override
26     public Variable getNameVariable(ReadGraph graph) throws DatabaseException {
27         return new ConstantPropertyVariable(this, Variables.NAME, ProxyChildVariable.CONTEXT_END, Bindings.STRING);
28     }
29     
30 }