コード例 #1
0
 /**
  * Retrieves a set containing sbb entity ids in the factory cache data
  *
  * @return
  */
 public Set<SbbEntityID> getSbbEntities() {
   final Node node = getNode();
   if (node == null) {
     return Collections.emptySet();
   }
   HashSet<SbbEntityID> result = new HashSet<SbbEntityID>();
   ServiceID serviceID = null;
   for (Object obj : node.getChildrenNames()) {
     serviceID = (ServiceID) obj;
     for (SbbEntityID sbbEntityID : getRootSbbEntityIDs(serviceID)) {
       result.add(sbbEntityID);
       collectSbbEntities(sbbEntityID, result);
     }
   }
   return result;
 }
コード例 #2
0
 public Set<SbbEntityID> getRootSbbEntityIDs(ServiceID serviceID) {
   final Node node = getNode();
   if (node == null) {
     return Collections.emptySet();
   }
   final Node serviceNode = node.getChild(serviceID);
   if (serviceNode == null) {
     return Collections.emptySet();
   }
   HashSet<SbbEntityID> result = new HashSet<SbbEntityID>();
   RootSbbEntityID rootSbbEntityID = null;
   for (Object obj : serviceNode.getChildrenNames()) {
     rootSbbEntityID = new RootSbbEntityID(serviceID, (String) obj);
     result.add(rootSbbEntityID);
   }
   return result;
 }