/** * 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()); } } }