try {
Layer0 L0 = Layer0.getInstance(graph);
if (graph.isInstanceOf(r, L0.Assertion)) {
- Resource pred = graph.getSingleObject(r, L0.HasPredicate);
+ Resource pred = graph.getPossibleObject(r, L0.HasPredicate);
// Don't know how I encountered this but it seems to be possible in some cases..
// Resource obj = graph.getSingleObject(r, L0.HasObject);
Resource obj = graph.getPossibleObject(r, L0.HasObject);
- String tmp = htmlEscape( getResourceName(graph, pred) + " -> " + (obj == null ? "No object ?" : getResourceName(graph, obj)) + " (Assertion)" );
+ String tmp = htmlEscape( (pred == null ? "No predicate ?" : getResourceName(graph, pred)) + " -> " + (obj == null ? "No object ?" : getResourceName(graph, obj)) + " (Assertion)" );
name = tmp.substring(0, Math.min(80, tmp.length()));
} else {
String resourceName = getResourceName(graph, r);