HyperDOM
HyperDOM™ is the term used to describe our integration of hyperbolic tree technology and the XML DOM. Hyperbolic tree technology has been acknowledged by user interface researchers as the state of the art technology for visualizing large data hierarchies. HyperDOM extends the reach of hyperbolic tree technology to the XML world. In addition to visualizing static XML documents, our HyperDOM Browser tool supports the interactive evaluation of XPath and XQuery statements with result visualization. Here is a screen capture of the HyperDOM Browser:
HyperDOM Browser Features
The HyperDOM tool supports the following major functions:
1.XML node visualization.
2.Node Insight support for XML analytics.
3.XPath and XQuery statement evaluation.
4.Java language API and Java Bean Shell scripting support.
5.Remote XML-RPC API support.
6.Node serialization.
7.XPath generation.
8.Pluggable hyperbolic tree implementations.
Node Visualization
Whether you are working with a remote URL referencing an XML document, an XML file on your local disk, or SOAP messages going over the network; the HyperDOM provides superior data visualization capabilities.
There are several ways to load your document into the HyperDOM:
1.To view the sample XML document in the HyperDOM, select the “HyperDOM Visualization” menu from the Utilities menu as seen here:
2.Drag and drop a file from the file system onto the HyperDOM.
3.Drag and drop a URL from the address bar of FireFox, Safari, or Internet Explorer onto the HyperDOM.
4.Drag and drop XML content, perhaps from a text editor, onto the HyperDOM.
5.Visualize a URL from the URL History window as seen here:
6.Type and highlight a URL in the Interactive Workspace of the “Eval” tab and select either the “Browse URL in New HyperDOM” or “Browse URL in This HyperDOM” menu items from the popup menu as seen here:
7.Select the “HyperBrowse” menu item from the popup menu for any element or document node in DOM Browser tool as seen here:
8.Select the “HyperBrowse” menu item from the popup menu of the XML text editor as seen here:
9.Select the “Visualize MIME in HyperDOM” button on the SOAP With Attachments Editor (SWA) as seen here:
10.Select the “HyperBrowse All” button on the HTTP Monitor tool as seen here:
11.Invoke the XML-RPC API from an external program as seen here with this .NET client:
12.Invoke the Java API from your Java language program.
13.Type an XPath expression in the Interactive Workspace of the “Eval” tab, highlight it and select the menu item “Evaluate as XPath” from the popup menu as seen here:
The XPath statement will be applied to the content of HyperDOM.
The HyperDOM will automatically render the node results of an XPath statement. If the result is not a node or list of nodes, for example a double, then the result will be displayed in the Interactive Workspace. Nonetheless, a new document will be rendered in the HyperDOM. You can restore the HyperDOM view as needed by invoking the “Restore Previous Node” menu item from the popup menu as seen here:
14.Type a Java Bean Shell script in the Interactive Workspace of the “Eval” tab, highlight it and select the menu item “Evaluate” from the popup menu as seen here:
Node Insight for XML Analytics
Node Insight is available via the popup menu for the following:
1.The entire document by right-clicking in an empty area of the HyperDOM and selecting “Node Insight…” as seen here:
2.A specific node by right-clicking on an element node in the HyperDOM and selecting “Node Report” as seen here:
XPath and XQuery Statement Evaluation in the HyperDOM Browser
The HyperDOM Browser allows you to interactively evaluate just about any XML query language statement or program and inspect the results, irrespective of XML vendor. The ability to invoke queries and visualize the results in the HyperDOM is provided through the Interactive Workspace. The Interactive Workspace provides two techniques for querying XML content:
1.Native XPath support based on the Jaxen XPath engine. Just type your XPath statement, highlight it, and select the menu item “Evaluate Selection As XPath Statement” from the workspace popup menu as seen here:
2.Programmatic support using the XPath, XSLT, XQuery, etc. engines of your choice. Since the Interactive Workspace uses Java Bean Shell for Java language evaluation, you can use any vendor query implementation. We have tested the Jaxen and Xalan XPath implementations as well as the XQuery implementations from Saxonia, IBM, and DataDirect. DataDirect users will see a sample in the file ALTMobile/bsh/xqj.bsh. Just type your Java program snippet, highlight it, and select the menu item “Evaluate Selection” from the workspace popup menu as seen here:
Visualizing Results in the HyperDOM
Regardless of how you execute the query in the Interactive Workspace —through the native Jaxen XPath engine or programmatically through your choice of Java libraries or external programs—your query results can be visualized in the HyperDOM. The HyperDOM Browser treats XPath results as well as the results of any Java Bean Shell code snippet in the following six ways:
1.If the result is a DOM node such as a Document, Element, Text, or Attribute node the HyperDOM will automatically render the resultant node usually by importing it into a new document and displaying it. The Interactive Workspace will display the result according to normal Java output semantics. The Interactive Workspace defines a special variable named “hyperNode” which will contain a reference to this result node.
You can drag and drop the special “hyperNode” variable—in other words, the text “hyperNode”-- or any other explicitly defined variable containing an XML node from the Interactive Workspace onto a DOM Browser or HyperDOM and its contents will be displayed.
2.If the result is an instance of a java.util.ArrayList containing DOM nodes, which the default behavior when using Jaxen programmatically, the HyperDOM will automatically render the resultant nodes by importing it into a new document and displaying it. The Interactive Workspace will display the result according to normal Java output semantics.
3.If the result is a DOM NodeList, the HyperDOM will automatically render the resultant nodes by importing it into a new document and displaying it. The Interactive Workspace will display the result according to normal Java output semantics.
4.If the result is a DOM NamedNodeMap, the HyperDOM will automatically render the resultant nodes by importing it into a new document and displaying it. The Interactive Workspace will display the result according to normal Java output semantics.
5.If the result is a string containing serialized XML content, perhaps obtained through JDBC or XQJ, then you should manually invoke the HyperDOM visualization API to see the results. The Interactive Workspace will display the result according to normal Java output semantics.
6.If the result is a MIME string containing a SOAP With Attachments document (SAAJ), then you should manually invoke the HyperDOM visualization API to see the results.
7.If the result is a scalar value or any other Java language object, the Interactive Workspace will display the result according to normal Java output semantics.
All of the visualization tools use the Apache Xerces DOM.
HyperDOM Java API
The HyperDOM provides a Java language API that may be used by applications and Java Bean Shell scripts to visualize XML content as well as control the HyperDOM. As the HyperDOM technology allows for pluggable widget implementations, the class XMLBrowser with the namespace com.altmobile.platform.util.browser.xml acts as a proxy to the actual widget. The following is the HyperDOM-related method signatures provided by the XMLBrowser. This is the minimal functionality that all widgets should implement:
1.static public void hyperVisualizeURL (String urlString)
2.static public void hyperVisualizeNode (Node aNode)
3.static public void hyperVisualizeSerializedXML (String xmlString)
4.static public void hyperVisualizeSerializedXML (
String xmlString,
boolean useActiveBrowser)
5.static public Node getActiveHyperDOMNode()
The internal tools usually access the extended capabilities of our internal widget class com.altmobile.platform.ui.hyperdom.dom.HyperDOMBrowser through these APIs:
1.static public void visualizeURL (String urlString)
2.static public void visualizeSerializedXML (String serializedXMLString)
3.static public void visualizeNode (Node aNode)
4.static public void visualizeNode (NodeList aNodeList)
5.static public void visualizeNode (List elementList)
6.static public void visualizeURLInActiveHyperDOMBrowser (String urlString)
7.static public void visualizeSerializedXMLInActiveHyperDOMBrowser (
String serializedXMLString)
8.static public void visualizeNodeInActiveHyperDOMBrowser (Node aNode)
9.static public void visualizeNodeInActiveHyperDOMBrowser (NodeList aNodeList)
10.static public void visualizeNodeInActiveHyperDOMBrowser (
NamedNodeMap aNamedNodeMap)
11.static public void visualizeNodeInActiveHyperDOMBrowser (List elementList)
12.static public Node getActiveHyperDOMNode()
13.static public Node getSelectedHyperDOMNode()
14.static public boolean centerNode (String xpathString)
15.static public boolean centerNode (Node aNode)
The HyperDOM APIs as well as the DOMBrowser APIs are very useful when debugging your Java language applications enabling you to visualize your XML content.
In addition to the visualization APIs, other major APIs include the code generation APIs, the Node Insight APIs for XML analytics, the Stable DOM APIs for HTML parsing, and the Pull Parser Component and Regex Element Finder APIs for high performance XML parsing.
HyperDOM Remote API
The HyperDOM provides an XML-RPC API that may be used by external applications and scripts to visualize XML content as well as control the HyperDOM. The XML-RPC server is automatically started at launch and runs on port 31000.
The webSdk.xml configuration file defines the <sdk-xmlrpc> element which has an auto-start and default port number for the XML-RC server.
You can also manually start and stop the XML-RPC server through the XML-RPC menu item found on the menu bar as seen here:
The following method signature list relates to the HyperDOM XML-RPC support:
1.String hyperVisualizeURL (String urlString)
2.String hyperVisualizeURLUsingPullParser(
String urlString,
Vector elementsVector)
3.String hyperVisualizeAndSerializeURLUsingPullParser (
String urlString,
Vector elementsVector,
String absoluteFilePathString)
4.String hyperVisualizeSOAPWithAttachmentsFile (
String absolutePathString)
5.String centerHyperDOMNode (String xpathString)
Methods 2-4 of the above list provide similar functionality to the user actions available in the Pull Parse Tool.
The method centerHyperDOMNode (String a_xpathString) allows external programs to control the foreground HyperDOM display. Remote control of the HyperDOM was originally developed for real-time network XML systems such as those found in data centers but has also been used for synchronized reports and presentations.
Client programs using the XML-RPC APIs can be found in the ALTMobile/macos/rpc directory and are implemented using Applescript. A simple .NET client demo is also available in the ALTMobile/dotNet directory.
Node Serialization
The HyperDOM Browser allows you to perform the following serialization capabilities:
1.Serialize a specific element by selecting the “Serialize This HyperDOM Node” menu item from an element’s popup as seen here:
2.Serialize the active document by selecting the “Serialize Active HyperDOM Document” menu item from the HyperDOM popup as seen here:
In both cases, the serialized output will be visible in the “Log” tab as seen here:
XPath Generation
The HyperDOM Browser allows you to generate the XPath statement for any element by selecting the “Generate XPath” menu item from any element’s popup menu as seen here:
This capability is often needed since the HyperDOM Browser tool will usually add elements as a visualization aid.
More comprehensive XPath generation is available in the DOM Browser tool.
Pluggable Hyperbolic Tree Implementations
The HyperDOM technology provides the ability to dynamically load alternative visualization widgets. The choice of HyperDOM widgets is determined by the <hyperdom-browser> element found in webSdk.xml configuration file.
The bogus NullHyperDOM class is initially defined to ensure license and patent compliance.
We currently provide support for two hyperbolic tree widget implementations:
1.Star Tree by Inxight, the Xerox-Parc spin-off. This implementation provides the fastest rendering speed and can collapse child nodes. We have also added rudimentary editing capabilities. Valid licensees of this widget should specify “com.altmobile.platform.ui.hyperdom.HyperDOMBrowser” in the webSdk.xml file and also include the stj.jar in the ALTMobile/lib directory and the license information in the file ALTMobile/bsh/inxight.bsh.
Licensees of our version 4 product can still use this implementation.
2.Our widget implementation which provides more features. Valid licensees of this widget should specify “com.altmobile.platform.ui.hyperdom.dom.HyperDOMBrowser” in the webSdk.xml file.