public static void addConstituentToDSSK(DD_SK d_SK, D_Constituent constituent) { if (constituent == null) return; for (D_Constituent c : d_SK.constit) { if (c == constituent) return; if (c.getLID() == constituent.getLID()) return; } d_SK.constit.add(constituent); addOrganizationToDSSK(d_SK, constituent.getOrganization()); constituent.loadNeighborhoods(D_Constituent.EXPAND_ALL); D_Neighborhood[] n = constituent.getNeighborhood(); if (n != null) { for (D_Neighborhood _n : n) { // could also add a witness for the neighborhood (with its source... if it is me) addNeighborhoodToDSSK(d_SK, _n); } } // constituent.setNeighborhood(null); }