コード例 #1
0
  // Build the key-node map for the entire root network
  // Note: The keyColName should start with "shared"
  private void initNodeMap() {

    String networkCollectionName = this.rootNetworkList.getSelectedValue().toString();
    CyRootNetwork rootNetwork = this.name2RootMap.get(networkCollectionName);

    if (networkCollectionName.equalsIgnoreCase(CRERATE_NEW_COLLECTION_STRING)) {
      return;
    }

    String targetKeyColName = this.targetColumnList.getSelectedValue();

    if (rootNetwork == null) {
      return;
    }

    Iterator<CyNode> it = rootNetwork.getNodeList().iterator();

    while (it.hasNext()) {
      CyNode node = it.next();
      Object keyValue = rootNetwork.getRow(node).getRaw(targetKeyColName);
      this.nMap.put(keyValue, node);
    }
  }