import org.simantics.db.layer0.variable.AbstractChildVariable;
import org.simantics.db.layer0.variable.StandardGraphChildVariable;
import org.simantics.db.layer0.variable.Variable;
+import org.simantics.structural.stubs.StructuralResource2;
public class ImmutableComponentVariable extends AbstractChildVariable {
@Override
public Variable getPossibleChild(ReadGraph graph, String name) throws DatabaseException {
+
+ if(content.procedural) {
+ return new StandardGraphChildVariable(parent, null, content.resource).getPossibleChild(graph, name);
+ }
+
if(content.children == null) return null;
ImmutableComponentVariableContent c = content.children.get(name);
if(c == null) return null;
@Override
public Collection<Variable> getChildren(ReadGraph graph) throws DatabaseException {
+
+ if(content.procedural) {
+ return new StandardGraphChildVariable(parent, null, content.resource).getChildren(graph);
+ }
+
if(content.children == null) return Collections.emptyList();
ArrayList<Variable> result = new ArrayList<Variable>(content.children.size());
for(ImmutableComponentVariableContent c : content.children.values()) {
result.add(new ImmutableComponentVariable(this, c));
}
return result;
+
}
@Override