Search in sources :

Example 1 with OrganizationWebConverter

use of org.codice.ddf.registry.schemabindings.converter.web.OrganizationWebConverter in project ddf by codice.

the class RegistryReportBuilder method getOrganizationMap.

private Map<String, Object> getOrganizationMap(RegistryPackageType registryPackage) {
    Map<String, Object> organizationMap = new HashMap<>();
    List<Map<String, Object>> organizations = new ArrayList<>();
    RegistryPackageTypeHelper rpt = new RegistryPackageTypeHelper(registryPackage);
    OrganizationWebConverter owc = new OrganizationWebConverter();
    organizations.addAll(rpt.getOrganizations().stream().map(owc::convert).collect(Collectors.toList()));
    webMapHelper.putIfNotEmpty(organizationMap, ORGANIZATION_KEY, organizations);
    return organizationMap;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) RegistryPackageTypeHelper(org.codice.ddf.registry.schemabindings.helper.RegistryPackageTypeHelper) ImmutableMap(com.google.common.collect.ImmutableMap) HashMap(java.util.HashMap) Map(java.util.Map) OrganizationWebConverter(org.codice.ddf.registry.schemabindings.converter.web.OrganizationWebConverter)

Aggregations

ImmutableMap (com.google.common.collect.ImmutableMap)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 OrganizationWebConverter (org.codice.ddf.registry.schemabindings.converter.web.OrganizationWebConverter)1 RegistryPackageTypeHelper (org.codice.ddf.registry.schemabindings.helper.RegistryPackageTypeHelper)1