private BundleWiringDTO getBundleWiringDTO(BundleWiring wiring) {
   if (wiring == null) {
     return null;
   }
   BundleWiringDTO dto = new BundleWiringDTO();
   dto.bundle = wiring.getBundle().getBundleId();
   dto.root = getWiringId(wiring);
   dto.nodes = new HashSet<BundleWiringDTO.NodeDTO>(wiringnodes.values());
   dto.resources = new HashSet<BundleRevisionDTO>(resources.values());
   return dto;
 }
 private BundleWiringDTO.NodeDTO getBundleWiringNodeDTO(BundleWiring wiring) {
   if (wiring == null) {
     return null;
   }
   BundleWiringDTO.NodeDTO dto = wiringnodes.get(wiring);
   if (dto != null) {
     return dto;
   }
   dto = new BundleWiringDTO.NodeDTO();
   dto.id = identifier(wiring);
   wiringnodes.put(wiring, dto);
   dto.current = wiring.isCurrent();
   dto.inUse = wiring.isInUse();
   dto.resource = getResourceId(wiring.getRevision());
   dto.capabilities = getListCapabilityRefDTO(wiring.getCapabilities(null));
   dto.requirements = getListRequirementRefDTO(wiring.getRequirements(null));
   dto.providedWires = getListBundleWireDTO(wiring.getProvidedWires(null));
   dto.requiredWires = getListBundleWireDTO(wiring.getRequiredWires(null));
   return dto;
 }