// Copy the resource to this storage, if the content URL does not match
if (urlspec.startsWith(getBaseURL().toExternalForm()) == false) {
ResourceBuilder builder = createResourceBuilder();
for (Capability cap : res.getCapabilities(null)) {
if (!ContentNamespace.CONTENT_NAMESPACE.equals(cap.getNamespace())) {
builder.addCapability(cap.getNamespace(), cap.getAttributes(), cap.getDirectives());
}
}
for (Capability cap : ccaps) {
ContentCapability ccap = cap.adapt(ContentCapability.class);
Map<String, Object> contentAtts = new HashMap<String, Object>();