/**
   * This method finds and returns all the strings found in the graph used to give a variable its
   * value. Each found string will be splitted with comma and the results will be treated as unique
   * values. For example In graph: reqtag1 = "REQ1" + ",REQ2," reqtag1 = reqtag1 + "REQ3" reqtag2 =
   * "REQ3,REQ4" reqtag3 = "RE" + "Q5," reqtag4 = getValueFromExternalFunction("REQ6");
   *
   * @return Hashmap with the variable name as key, and a string containing 1 to many colon
   *     separated values, as the value For example In HashMap ({key,value} {
   *     reqtag1,"REQ1:REQ2:REQ3" reqtag2,"REQ3:REQ4" reqtag3,"RE:Q5" reqtag4,"REQ6"
   */
  public Hashtable<String, String> getAllVariableValues() {

    Hashtable<String, String> varVal = new Hashtable<String, String>();

    Vector<AbstractElement> abstractElements = new Vector<AbstractElement>();
    abstractElements.addAll(getAllVertices());
    abstractElements.addAll(getAllEdges());

    for (AbstractElement abstractElement : abstractElements) {
      String actionkey = abstractElement.getActionsKey();
      if (!actionkey.isEmpty()) {
        String[] tags = actionkey.split(";");
        for (int j = 0; j < tags.length; j++) {
          if (!tags[j].contains("=")) continue;
          String[] variableAndValue = tags[j].split("=");
          variableAndValue[0] = variableAndValue[0].replaceAll("[ ]*", "");
          while (variableAndValue[1].contains("\"")) {

            String[] splittedValue = variableAndValue[1].split("\"", 3);
            String[] reqs = splittedValue[1].split(",");
            for (String s : reqs) {

              if (s.length() == 0) continue;
              // fetching previously stored values for this variable
              String tmpVal = varVal.get(variableAndValue[0]);
              String newValue;
              if (tmpVal == null) {
                newValue = s;
              } else newValue = tmpVal + ":" + s;

              varVal.put(variableAndValue[0], newValue);
            }
            variableAndValue[1] = splittedValue[2];
          }
        }
      }
    }
    return varVal;
  }