RepositoryReader reader = new DefaultRepositoryXMLReader(input);
Resource auxres = reader.nextResource();
while (auxres != null) {
ResourceIdentity identity = auxres.getIdentity();
if (repository.getResource(identity.getCanonicalForm()) == null) {
repository.addResource(auxres.adapt(CompositeData.class));
result.add(identity);
}
auxres = reader.nextResource();
}
} finally {