1 package org.simantics.db.layer0.variable;
3 import org.simantics.db.ReadGraph;
4 import org.simantics.db.Resource;
5 import org.simantics.db.common.adaption.SimpleContextualAdapter;
6 import org.simantics.db.exception.DatabaseException;
8 public class ResourcePropertyVariableAdapter extends SimpleContextualAdapter<Variable, ModelledVariablePropertyDescriptor> {
11 public Variable adapt(ReadGraph graph, Resource source, ModelledVariablePropertyDescriptor context) throws DatabaseException {
12 return new StandardGraphResourcePropertyVariable(graph, context.getVariable(), context.getSubject(), context.getProperty());