// convert requirements
org.osgi.service.obr.Requirement[] r = resource.getRequirements();
if (r != null) {
requirements = new Requirement[r.length];
for (int i = 0; i < r.length; i++) {
RequirementImpl req = new RequirementImpl(r[i].getName());
req.setFilter(r[i].getFilter());
req.setOptional(r[i].isOptional());
req.setExtend(r[i].isExtend());
req.setMultiple(r[i].isMultiple());
requirements[i] = req;
}
}
}