import org.simantics.databoard.util.binary.BinaryFile;
import org.simantics.databoard.util.binary.RandomAccessBinary;
import org.simantics.db.AsyncReadGraph;
+import org.simantics.db.ComputationalValue;
import org.simantics.db.DevelopmentKeys;
import org.simantics.db.ExternalValueSupport;
import org.simantics.db.ReadGraph;
import org.simantics.scl.compiler.types.Type;
import org.simantics.scl.compiler.types.exceptions.SCLTypeParseException;
import org.simantics.scl.reflection.ReflectionUtils;
-import org.simantics.scl.reflection.ValueNotFoundException;
import org.simantics.scl.runtime.function.Function3;
import org.simantics.utils.DataContainer;
import org.simantics.utils.Development;
return getValue(r, binding);
}
} else if(types.contains(L0.ExternalValue)) {
- try {
- return (T)ReflectionUtils.getValue(getURI(r)).getValue();
- } catch(ValueNotFoundException e) {
- throw new DatabaseException(e);
- } catch(ClassCastException e) {
- throw new DatabaseException(e);
- }
+ try {
+ ComputationalValue cv = adapt(r, ComputationalValue.class);
+ return cv.getValue(this, r);
+ //return (T)ReflectionUtils.getValue(getURI(r)).getValue();
+// } catch(ValueNotFoundException e) {
+// throw new DatabaseException(e);
+ } catch(ClassCastException e) {
+ throw new DatabaseException(e);
+ }
+// try {
+// return (T)ReflectionUtils.getValue(getURI(r)).getValue();
+// } catch(ValueNotFoundException e) {
+// throw new DatabaseException(e);
+// } catch(ClassCastException e) {
+// throw new DatabaseException(e);
+// }
}
else {
Function3<ReadGraph,Resource,Object,T> function = requestValueFunction(r);