code: private ArrayList<String> getNameInCluster(Cluster cluster) {
      ArrayList<String> itemsInCluster = new ArrayList<String>();
  
      String nodeName;
      if (cluster.isLeaf()) {
        nodeName = cluster.getName();
        itemsInCluster.add(nodeName);
      }
      else {
        // String[] clusterName = cluster.getName().split("#");
        // nodeName = clusterName[1];
      }
  
      for (Cluster child : cluster.getChildren()) {
        ArrayList<String> childrenNames = getNameInCluster(child);
        itemsInCluster.addAll(childrenNames);
      }
      return itemsInCluster;
    }
docs: Finds out cluster names.
  
  @param cluster the cluster.
  @return pattern names.