CapabilityImpl wCap = new CapabilityImpl(wrapped, cap.getNamespace(), cap.getDirectives(), cap.getAttributes());
map.put(cap, wCap);
wrapped.addCapability(wCap);
}
for (Requirement req : resource.getRequirements(null)) {
RequirementImpl wReq = new RequirementImpl(wrapped, req.getNamespace(), req.getDirectives(), req.getAttributes());
wrapped.addRequirement(wReq);
}
addIdentityRequirement(wrapped, subsystem, false);
resToSub.put(wrapped, subsystem);
// TODO: use RepositoryContent ?