private Json getAccessPolicies(Json groups) { if (!groups.isArray()) throw new IllegalArgumentException("Expected Array of cirmusergroups. e.g. legacy:311.."); Json cirmUserGroupsWithAccessPolicies = Json.array(); for (Json iri : groups.asJsonList()) { OWLIndividual group = dataFactory().getOWLNamedIndividual(fullIri(iri.asString())); // Here we need to make sure that the serialization stops at e.g. // individuals that are the objects of an AccessPolicy! Json groupWithAccessPolicies = OWL.toJSON(group, stopExpansionCondition); cirmUserGroupsWithAccessPolicies.add(groupWithAccessPolicies); } // Array of cirm groups with all access policy information serialized. return cirmUserGroupsWithAccessPolicies; // userdata.set("cirmusergroups", // cirmUserGroupsWithAccessPolicies); }