import org.simantics.db.Resource;
import org.simantics.db.WriteGraph;
import org.simantics.db.common.procedure.adapter.TransientCacheAsyncListener;
-import org.simantics.db.common.utils.Logger;
import org.simantics.db.common.validation.L0Validations;
import org.simantics.db.exception.DatabaseException;
import org.simantics.db.exception.ValidationException;
import org.simantics.layer0.Layer0;
import org.simantics.utils.Development;
import org.simantics.utils.datastructures.Pair;
+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, Collections.<String> emptySet(), null, null, null, null, null, null,
Collections.<String, Pair<Resource, ChildReference>> emptyMap(),
if(Development.DEVELOPMENT) {
String error = L0Validations.checkValueType(graph, parentResource, property.predicate);
if(error != null) {
- Logger.defaultLogError(new ValidationException(error));
+ LOGGER.error(error);
//throw new ValidationException(error);
}
}
if(Development.DEVELOPMENT) {
String error = L0Validations.checkValueType(graph, parentResource, property.predicate);
if(error != null) {
- Logger.defaultLogError(new ValidationException(error));
+ LOGGER.error(error);
throw new ValidationException(error);
}
}
if(Development.DEVELOPMENT) {
String error = L0Validations.checkValueType(graph, parentResource, property.predicate);
if(error != null) {
- Logger.defaultLogError(new ValidationException(error));
+ LOGGER.error(error);
//throw new ValidationException(error);
}
}
if(Development.DEVELOPMENT) {
String error = L0Validations.checkValueType(graph, parentResource, property.predicate);
if(error != null) {
- Logger.defaultLogError(new ValidationException(error));
+ LOGGER.error(error);
throw new ValidationException(error);
}
}
return valueMap.getVariable(graph, this, name);
} catch (DatabaseException e) {
return null;
- } catch (Throwable t) {
- System.err.println("err: " + getURI(graph) + " # " + name);
+ } catch (Exception t) {
+ LOGGER.error("getPossibleDomainProperty is implemented incorrectly, but returns null on Exception for backward compatibility. URI="+getURI(graph)+", name="+name+".", t);
return null;
}