+ // Final fallback: check types corresponding to
+ // node classification(s) and look for asserted
+ // properties from the URIs specified.
+ if (variable.node != null) {
+ try {
+ @SuppressWarnings("unchecked")
+ Set<String> classifications = variable.node.support.manager.getClassifications(variable.node.node);
+ if (!classifications.isEmpty()) {
+ for (String uri : classifications) {
+ Resource type = graph.syncRequest(
+ new PossibleResource(uri),
+ TransientCacheAsyncListener.instance());
+ if (type == null)
+ continue;
+ Map<String, Pair<PropertyInfo, Resource>> pm = graph.syncRequest(
+ new UnescapedAssertedPropertyMapOfResource(type),
+ TransientCacheAsyncListener.instance());
+ Pair<PropertyInfo, Resource> pi = pm.get(name);
+ if (pi != null) {
+ return new StandardAssertedGraphPropertyVariable(graph, context, null, type, pi.first.predicate, pi.second);
+ }
+ }
+ }
+ } catch(NodeManagerException e) {
+ throw new DatabaseException(e);
+ }
+ }