/** * Returns the given set of resources after expansion (by resolution of blocks, for instance) by * the kernel. * * @param resources The set of resources to be expanded. * @return The given set of resources after expansion (by resolution of blocks, for instance) by * the kernel. */ private Set<TCSResource> expandResources(Set<TCSResource> resources) { assert resources != null; // Build a set of references Set<TCSResourceReference> refs = new HashSet<>(); for (TCSResource curResource : resources) { refs.add(curResource.getReference()); } // Let the kernel expand the resources for us. try { Set<TCSResource> result = localKernel.expandResources(refs); log.fine("Set " + resources + " expanded to " + result); return result; } catch (ObjectUnknownException exc) { throw new IllegalStateException("Unexpected exception", exc); } }