private RequirementDTO getRequirementDTO(BundleRequirement req) {
   if (req == null) {
     return null;
   }
   RequirementDTO dto = new RequirementDTO();
   dto.id = identifier(req);
   dto.namespace = req.getNamespace();
   dto.resource = getResourceId(req.getRevision());
   dto.attributes = newAttributesMapDTO(req.getAttributes());
   dto.directives = newDirectivesMapDTO(req.getDirectives());
   return dto;
 }
 private RequirementRefDTO getRequirementRefDTO(BundleRequirement req) {
   if (req == null) {
     return null;
   }
   RequirementRefDTO dto = new RequirementRefDTO();
   dto.requirement = identifier(req);
   dto.resource = getResourceId(req.getRevision());
   return dto;
 }