예제 #1
0
 private static boolean isNameUsedInHierarchy(String aName, FIBModelObject object) {
   if (object.getName() != null && object.getName().equals(aName)) {
     return true;
   }
   if (object.getEmbeddedObjects() != null) {
     for (FIBModelObject o : object.getEmbeddedObjects()) {
       if (isNameUsedInHierarchy(aName, o)) return true;
     }
   }
   return false;
 }
예제 #2
0
 private static List<FIBModelObject> retrieveObjectsWithName(
     String aName, FIBModelObject object, List<FIBModelObject> list) {
   if (object.getName() != null && object.getName().equals(aName)) {
     list.add(object);
   }
   if (object.getEmbeddedObjects() != null) {
     for (FIBModelObject o : object.getEmbeddedObjects()) {
       retrieveObjectsWithName(aName, o, list);
     }
   }
   return list;
 }