private CapabilityRefDTO getCapabilityRefDTO(BundleCapability cap) { if (cap == null) { return null; } CapabilityRefDTO dto = new CapabilityRefDTO(); dto.capability = identifier(cap); dto.resource = getResourceId(cap.getRevision()); return dto; }
private CapabilityDTO getCapabilityDTO(BundleCapability cap) { if (cap == null) { return null; } CapabilityDTO dto = new CapabilityDTO(); dto.id = identifier(cap); dto.namespace = cap.getNamespace(); dto.resource = getResourceId(cap.getRevision()); dto.attributes = newAttributesMapDTO(cap.getAttributes()); dto.directives = newDirectivesMapDTO(cap.getDirectives()); return dto; }