protected void checkType(Resource root, Resource type) {
   if (!root.hasProperty(RDF.type, type))
     throw new CannotConstructException(this.getClass(), root, type);
 }