private String getNetworkMeasureParametersAsString(List<NetworkMeasureParameter> parameterLists) {
   String returnString = "";
   if (parameterLists != null) {
     for (NetworkMeasureParameter parameter : parameterLists) {
       if (!"".equals(returnString)) {
         returnString += "; ";
       }
       returnString += parameter.getName() + " = ";
       returnString +=
           !StringUtil.isEmpty(parameter.getValue())
               ? parameter.getValue()
               : parameter.getDefaultValue();
     }
   }
   return returnString;
 }
  private void initComponents() {
    vertexAttributeSelectItems = new ArrayList();
    edgeAttributeSelectItems = new ArrayList();
    automaticQuerySelectItems = new ArrayList();
    networkMeasureSelectItems = new ArrayList();
    friendlyNameMap = new HashMap();
    networkMeasureParameterMap = new HashMap();

    // start with manual query atribute lists
    for (DataVariable dv : file.getVertexDataTable().getDataVariables()) {
      vertexAttributeSelectItems.add(new SelectItem(dv.getName()));
    }

    for (DataVariable dv : file.getEdgeDataTable().getDataVariables()) {
      edgeAttributeSelectItems.add(new SelectItem(dv.getName()));
    }

    // TODO: we will eventually have to read all the queries and network measures from xml
    // add automatic queries
    friendlyNameMap.put(NetworkDataServiceLocal.AUTOMATIC_QUERY_NTHLARGEST, "Largest Graph");
    automaticQuerySelectItems.add(
        new SelectItem(
            NetworkDataServiceLocal.AUTOMATIC_QUERY_NTHLARGEST,
            friendlyNameMap.get(NetworkDataServiceLocal.AUTOMATIC_QUERY_NTHLARGEST)));

    /*
    friendlyNameMap.put(NetworkDataServiceLocal.AUTOMATIC_QUERY_BICONNECTED, "Biconnected Graph");
    automaticQuerySelectItems.add(new SelectItem(NetworkDataServiceLocal.AUTOMATIC_QUERY_BICONNECTED, friendlyNameMap.get(NetworkDataServiceLocal.AUTOMATIC_QUERY_BICONNECTED)));
    */

    friendlyNameMap.put(NetworkDataServiceLocal.AUTOMATIC_QUERY_NEIGHBORHOOD, "Neighborhood");
    automaticQuerySelectItems.add(
        new SelectItem(
            NetworkDataServiceLocal.AUTOMATIC_QUERY_NEIGHBORHOOD,
            friendlyNameMap.get(NetworkDataServiceLocal.AUTOMATIC_QUERY_NEIGHBORHOOD)));

    // and network measures
    friendlyNameMap.put(NetworkDataServiceLocal.NETWORK_MEASURE_RANK, "Page Rank");
    networkMeasureSelectItems.add(
        new SelectItem(
            NetworkDataServiceLocal.NETWORK_MEASURE_RANK,
            friendlyNameMap.get(NetworkDataServiceLocal.NETWORK_MEASURE_RANK)));
    List parameters = new ArrayList();
    NetworkMeasureParameter d = new NetworkMeasureParameter();
    d.setName("d");
    d.setDefaultValue(".85");
    parameters.add(d);
    networkMeasureParameterMap.put(NetworkDataServiceLocal.NETWORK_MEASURE_RANK, parameters);

    friendlyNameMap.put(NetworkDataServiceLocal.NETWORK_MEASURE_DEGREE, "Degree");
    networkMeasureSelectItems.add(
        new SelectItem(
            NetworkDataServiceLocal.NETWORK_MEASURE_DEGREE,
            friendlyNameMap.get(NetworkDataServiceLocal.NETWORK_MEASURE_DEGREE)));

    friendlyNameMap.put(NetworkDataServiceLocal.NETWORK_MEASURE_UNIQUE_DEGREE, "Unique Degree");
    networkMeasureSelectItems.add(
        new SelectItem(
            NetworkDataServiceLocal.NETWORK_MEASURE_UNIQUE_DEGREE,
            friendlyNameMap.get(NetworkDataServiceLocal.NETWORK_MEASURE_UNIQUE_DEGREE)));

    friendlyNameMap.put(NetworkDataServiceLocal.NETWORK_MEASURE_IN_LARGEST, "In Largest Component");
    networkMeasureSelectItems.add(
        new SelectItem(
            NetworkDataServiceLocal.NETWORK_MEASURE_IN_LARGEST,
            friendlyNameMap.get(NetworkDataServiceLocal.NETWORK_MEASURE_IN_LARGEST)));

    /*
    friendlyNameMap.put(NetworkDataServiceLocal.NETWORK_MEASURE_BONACICH_CENTRALITY, "Bonacich Centrality");
    networkMeasureSelectItems.add(new SelectItem(NetworkDataServiceLocal.NETWORK_MEASURE_BONACICH_CENTRALITY, friendlyNameMap.get(NetworkDataServiceLocal.NETWORK_MEASURE_BONACICH_CENTRALITY)));
    parameters = new ArrayList();
    NetworkMeasureParameter p1 = new NetworkMeasureParameter();
    p1.setName("alpha");
    p1.setDefaultValue("1");
    parameters.add(p1);

    NetworkMeasureParameter p2 = new NetworkMeasureParameter();
    p2.setName("exo");
    p2.setDefaultValue("1");
    parameters.add(p2);
    networkMeasureParameterMap.put(NetworkDataServiceLocal.NETWORK_MEASURE_BONACICH_CENTRALITY, parameters);
    */
    networkMeasureParamterList = networkMeasureParameterMap.get(networkMeasureType);

    // and finally, add the initial event
    events.add(getInitialEvent());
  }