/**
   * create a 1-d String array from a network's node attributes, for easy transmission to R. use
   * this format for each attribute of each node: nodeName::attributeName::value
   *
   * @param network a gaggle network
   * @return the network's node attributes as a string array
   */
  protected String[] networkNodeAttributesToStringArray(Network network) {
    String[] attributeNames = network.getNodeAttributeNames();
    // System.out.println (" nnatsa, attribute name count: " + attributeNames.length);
    ArrayList<String> list = new ArrayList<String>();

    for (String attributeName : attributeNames) {
      // System.out.println (" nnatsa, attribute name: " + attributeName);
      HashMap attributeHash = network.getNodeAttributes(attributeName);
      // can't remove this warning until Network is genericized in next api release:
      String[] nodeNames = (String[]) attributeHash.keySet().toArray(new String[0]);
      for (String nodeName : nodeNames) {
        // System.out.println (" nnatsa, node name: " + nodeName);
        Object value = attributeHash.get(nodeName);
        String terseForm = nodeName + "::" + attributeName + "::" + value.toString();
        list.add(terseForm);
      } // for n
    } // for i

    return list.toArray(new String[0]);
  } // networkEdgeAttributesToStringArray