public List<TrustedServiceWrapper> getTrustedServices() { List<TrustedServiceWrapper> result = new ArrayList<TrustedServiceWrapper>(); List<XmlTrustedServiceProvider> tsps = certificate.getTrustedServiceProviders(); if (Utils.isCollectionNotEmpty(tsps)) { for (XmlTrustedServiceProvider tsp : tsps) { List<XmlTrustedService> trustedServices = tsp.getTrustedServices(); if (Utils.isCollectionNotEmpty(trustedServices)) { for (XmlTrustedService trustedService : trustedServices) { TrustedServiceWrapper wrapper = new TrustedServiceWrapper(); wrapper.setTspName(tsp.getTSPName()); wrapper.setServiceName(trustedService.getServiceName()); wrapper.setCountryCode(tsp.getCountryCode()); wrapper.setStatus(trustedService.getStatus()); wrapper.setType(trustedService.getServiceType()); wrapper.setStartDate(trustedService.getStartDate()); wrapper.setEndDate(trustedService.getEndDate()); wrapper.setCapturedQualifiers(new ArrayList<String>(trustedService.getCapturedQualifiers())); wrapper.setAdditionalServiceInfos(new ArrayList<String>(trustedService.getAdditionalServiceInfoUris())); result.add(wrapper); } } } } return result; }