/**
   * Sets either the InferredNS's cachedThumbURL, RawString, or external URL in order to know what
   * to display in the Local View. Also, sets the URI of the NodeSet.
   */
  public void setRootNSConclusionStringForLocalView(IWNodeSet root) {
    rootRawString = WebProbeNSInferenceInfo.getNodeSetRawString(root);
    rootURI = WebProbeNSInferenceInfo.getNodeSetURI(root);

    rootConclusionURL = "Other Solution"; // default value unless last must be used as last resort.

    String thumbURL = WebProbeNSInferenceInfo.getNodeSetCachedVisURL(rootURI);

    // Thumbnail available in cache?
    if (thumbURL != null) {
      rootCachedThumbURL = thumbURL;
      rootRawString = "Image Used Instead";
      rootConclusionURL = "Image Used Instead";
    } else {
      rootCachedThumbURL = null;
      String rootRaw = WebProbeNSInferenceInfo.getNodeSetRawString(root);

      if (rootRaw != null) {
        rootRawString = rootRaw;
        rootConclusionURL = "Embedded Raw String Used Instead";
      } else { // No Conclusion Embedded, try getting URL to Conclusion

        rootRawString = "hasURL?";

        Loader loader = new Loader(false);
        PMLNode pmlNode = loader.loadNode(rootURI, null);
        rootConclusionURL = pmlNode.getConclusion().getHasURL();

        // GetURLContents.downloadText(conclusion.getHasURL());
      }
    }
  }
  private NodeSetGraphic drawDAG(PMLNode node, int _currentLevel, int level) {
    if (node.getCurrentlySelectedInferenceStep().isLeaf()) {
      System.out.println("only one node and is a parent");
      return drawOnlyChild(node);
    }

    int counter = 0;
    ArrayList childNodes = new ArrayList();

    int numTest = node.getCurrentlySelectedInferenceStep().getAntecedents().length;
    for (int i = 0; i < node.getCurrentlySelectedInferenceStep().getAntecedents().length; i++) {
      NodeSetGraphic aChild = null;
      PMLNode aNode = node.getCurrentlySelectedInferenceStep().getAntecedents()[i];

      if ((_currentLevel > 1) && (!aNode.getCurrentlySelectedInferenceStep().isLeaf()))
        aChild = drawDAG(aNode, _currentLevel - 1, level - 1);
      else aChild = drawChild(level, counter, numTest, aNode);
      childNodes.add(aChild);
      counter++;
    }
    return drawParent(node, level, childNodes);
  }