InputStream input = getResourceContent(ccap);
try {
addResourceContent(input, contentAtts);
builder.addCapability(ContentNamespace.CONTENT_NAMESPACE, contentAtts, cap.getDirectives());
} catch (RepositoryStorageException ex) {
throw new RepositoryStorageException("Cannot add resource to storeage: " + mimeType, ex);
}
}
for (Requirement req : res.getRequirements(null)) {
String namespace = req.getNamespace();
builder.addRequirement(namespace, req.getAttributes(), req.getDirectives());