if (object.isConcrete())
{
Resource theClass = (Resource) configModel.asRDFNode(object);
Table table = class2table.get(theClass);
if (table == null)
throw new InconsistentException("Unknown class: " + object);
checkClasses(subject, theClass, nodeToClass);
nodeToClass.put(subject, theClass);
query.add(subject, table); // Just add the subject and table to the query.
}
else
throw new UnanswerableException("No type matches (yet)");
continue;
}
Resource prop = (Resource) configModel.getRDFNode(predicate);
if (!prop2col.containsKey(prop))
throw new InconsistentException("Unknown predicate: " + triple);
/* Domain / Range checks -- subjects have types specific to tables, objects are literals */
checkClasses(subject, prop.getProperty(RDFS.domain).getResource(), nodeToClass);
checkClasses(object, RDFS.Literal, nodeToClass);