private Map<String, String> prepareNetworkDownloadDataResponse(CollaborationData coPIData) {

    String outputFileName = "";

    if (coPIData.getCollaborators() != null && coPIData.getCollaborators().size() > 0) {

      outputFileName =
          UtilityFunctions.slugify(coPIData.getEgoCollaborator().getCollaboratorName())
              + "_co-investigator-network.graphml"
              + ".xml";

    } else {
      outputFileName = "no_co-investigator-network.graphml" + ".xml";
    }

    CoPIGraphMLWriter coPIGraphMLWriter = new CoPIGraphMLWriter(coPIData);

    Map<String, String> fileData = new HashMap<String, String>();
    fileData.put(DataVisualizationController.FILE_NAME_KEY, outputFileName);
    fileData.put(DataVisualizationController.FILE_CONTENT_TYPE_KEY, "text/xml");
    fileData.put(
        DataVisualizationController.FILE_CONTENT_KEY,
        coPIGraphMLWriter.getCoPIGraphMLContent().toString());

    return fileData;
  }
  /**
   * Provides a response when graphml formatted co-pi network is requested, typically by the flash
   * vis.
   *
   * @param coPIData
   * @param response
   */
  private Map<String, String> prepareNetworkStreamDataResponse(CollaborationData coPIData) {

    CoPIGraphMLWriter coPIGraphMLWriter = new CoPIGraphMLWriter(coPIData);

    Map<String, String> fileData = new HashMap<String, String>();
    fileData.put(DataVisualizationController.FILE_CONTENT_TYPE_KEY, "text/xml");
    fileData.put(
        DataVisualizationController.FILE_CONTENT_KEY,
        coPIGraphMLWriter.getCoPIGraphMLContent().toString());

    return fileData;
  }