X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Fvariable%2FStandardGraphPropertyVariable.java;fp=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Fvariable%2FStandardGraphPropertyVariable.java;h=b7eaf075edea1c1e051981662954629f70673cf1;hp=7927614cd37f9779292ee4ace98e5fd4ba7f00f0;hb=4b6820a8ec78410eb22f90e87e3e36572b9ba1f5;hpb=b8e4909d7723ad4bffcae324ade14d94d837e6da diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StandardGraphPropertyVariable.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StandardGraphPropertyVariable.java index 7927614cd..b7eaf075e 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StandardGraphPropertyVariable.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/variable/StandardGraphPropertyVariable.java @@ -35,12 +35,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class StandardGraphPropertyVariable extends AbstractPropertyVariable { + private static final Logger LOGGER = LoggerFactory.getLogger(StandardGraphPropertyVariable.class); - - protected static final PropertyInfo NO_PROPERTY = new PropertyInfo(null, null, - false, false, Collections. emptySet(), null, null, null, null, null, null, - Collections.> emptyMap(), - null, false); + + protected static final PropertyInfo NO_PROPERTY = new PropertyInfo(null, null, true, + false, false, Collections. emptySet(), null, null, null, null, null, null, + Collections.> emptyMap(), + null, false); final public Variable parent; final public Resource parentResource; @@ -170,13 +171,10 @@ public class StandardGraphPropertyVariable extends AbstractPropertyVariable { if(represents == null) throw new InvalidVariableException("Variable is not represented by any resource (URI=" + getPossibleURI(graph) + ")."); return represents; -// return graph.getSingleObject(parentResource, property.predicate); } @Override public Resource getPossibleRepresents(ReadGraph graph) throws DatabaseException { -// if(parentResource == null) return null; -// return graph.getPossibleObject(parentResource, property.predicate); return represents; } @@ -226,16 +224,6 @@ public class StandardGraphPropertyVariable extends AbstractPropertyVariable { @Override public Datatype getDatatype(ReadGraph graph) throws DatabaseException { -//<<<<<<< .mine -// -// Binding binding = getPossibleDefaultBinding(graph); -// if(binding != null) return binding.type(); -// -// Variant vt = getVariantValue(graph); -// binding = vt.getBinding(); -// if(binding == null) throw new DatabaseException("No binding in Variant with value " + vt.getValue()); -// return binding.type(); -//======= Datatype type; try { type = getValueAccessor(graph).getDatatype(graph, this); @@ -252,7 +240,6 @@ public class StandardGraphPropertyVariable extends AbstractPropertyVariable { } return type; -//>>>>>>> .r30794 }