| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_181) on Fri Sep 14 11:37:23 BST 2018 --> |
| <title>Overview (XML Document Model (XDM))</title> |
| <meta name="date" content="2018-09-14"> |
| <link rel="stylesheet" type="text/css" href="javadoc.css" title="Style"> |
| <script type="text/javascript" src="script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="Overview (XML Document Model (XDM))"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li class="navBarCell1Rev">Overview</li> |
| <li>Package</li> |
| <li>Class</li> |
| <li>Use</li> |
| <li><a href="overview-tree.html">Tree</a></li> |
| <li><a href="deprecated-list.html">Deprecated</a></li> |
| <li><a href="index-files/index-1.html">Index</a></li> |
| <li><a href="help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage">org.netbeans.modules.xml.xdm/1 1.36.1 1</div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev</li> |
| <li>Next</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="index.html?overview-summary.html" target="_top">Frames</a></li> |
| <li><a href="overview-summary.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <div class="header"> |
| <h1 class="title">XML Document Model (XDM)<br/><span style='font-style:normal; font-size:medium; font-weight:normal; background-color:#ddcc80;'><a href='http://wiki.netbeans.org/API_Stability#Devel' target='_blank'>Under Development</a></span></h1> |
| </div> |
| <div class="header"> |
| <p>See: <a href="#overview.description">Description</a></p> |
| </div> |
| <div class="contentContainer"> |
| <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="XML Document Model (XDM) table, listing packages, and an explanation"> |
| <caption><span>XML Document Model (XDM)</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Package</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tbody> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="org/netbeans/modules/xml/xdm/package-summary.html">org.netbeans.modules.xml.xdm</a></td> |
| <td class="colLast"> |
| <div class="block">APIs for obtaining an XDM document and mutating the XDM tree.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="org/netbeans/modules/xml/xdm/diff/package-summary.html">org.netbeans.modules.xml.xdm.diff</a></td> |
| <td class="colLast"> |
| <div class="block">XML diff capabilities.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="org/netbeans/modules/xml/xdm/nodes/package-summary.html">org.netbeans.modules.xml.xdm.nodes</a></td> |
| <td class="colLast"> |
| <div class="block">XDM-based implementation of DOM interfaces.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="org/netbeans/modules/xml/xdm/visitor/package-summary.html">org.netbeans.modules.xml.xdm.visitor</a></td> |
| <td class="colLast"> |
| <div class="block">Visitors for operations over the XDM such as generating XPath |
| expressions, calculating document position and finding elements by position.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="org/netbeans/modules/xml/xdm/xam/package-summary.html">org.netbeans.modules.xml.xdm.xam</a></td> |
| <td class="colLast"> |
| <div class="block">XAM model and component abstractions based on XDM tree.</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="contentContainer"><a name="overview.description"> |
| <!-- --> |
| </a> |
| <div class="block"><p> |
| |
| <p> |
| XDMXDM (XML Document Model) provides a XAM based full fidelity XML model which |
| implements the org.w3c.dom interfaces. The intention is not to provide an |
| an alternate implementation of the dom interfaces but only to reuse part of |
| the api where it makes sense and more importantly provide a foundation on |
| which to provide a model basis for graphical multi way editors. |
| </p> |
| This module was developed to support the following requirements: |
| <ul> |
| |
| <li>Full document fidelity. This allows the original document to be |
| preserved and only changes the actual sections of the document which |
| were mutated (i.e. the transformation is lossless).</li> |
| |
| <li>Support for undo/redo in a memory efficient way</li> |
| |
| <li>Support for diff to allow changes to be detected in |
| the underlying source</li> |
| |
| <li>Visitor support</li> |
| |
| </ul> |
| |
| </p> |
| <h3>What is New (see <a href="apichanges.html">all changes</a>)?</h3> |
| <ul> |
| |
| |
| <!--Search for dates that are later or equal to 1997-09-01 in |
| .--> |
| </ul> |
| <h3>Use Cases</h3> |
| <answer id="arch-usecases"> |
| |
| <p> |
| The typical client of XDM would be a tool author supporting an XML language |
| who wants to provide a custom client API. A concrete example of this is the XML |
| Schema model. The XML Schema model starts by subclassing AbstractXDMModel and |
| providing the component updater, which is called in conjunction with sync |
| to mutate the model according to changes in the underlying source. |
| |
| <h5>WSDL model</h5> |
| The WSDL model is based on the XDM model and relies on the XDM capabilities |
| to provide the infrastructure necessary for providing a XAM based model. |
| |
| <h5>Schema model</h5> |
| The Schema model is based on the XDM model and relies on the XDM capabilities |
| to provide the infrastructure necessary for providing a XAM based model. |
| |
| <h5>BPEL model</h5> |
| The BPEL model is based on the XDM model and relies on the XDM capabilities |
| to provide the infrastructure necessary for providing a XAM based model. |
| |
| |
| The XDM model can be used in standalone mode. |
| <code> |
| <br> |
| <br> |
| BaseDocument sd = ...; |
| <br> |
| Lookup lookup = Lookups.singleton(sd); |
| <br> |
| // create an editable ModelSource with base document |
| <br> |
| // in the lookup (this is required) |
| <br> |
| ModelSource ms = new ModelSource(lookup, true); |
| <br> |
| // create an XDMModel |
| <br> |
| XDMModel model = new XDMModel(ms); |
| <br> |
| // sync the XDM model with the underlying source |
| <br> |
| model.sync(); |
| <br> |
| // create customer element, same as dom |
| <br> |
| Element customer = model.getDocument().createElement("customer"); |
| <br> |
| // add to the model as 0th child of employee element, not shown |
| <br> |
| model.add(employee,customer,0); |
| <br> |
| |
| </code> |
| |
| </p> |
| |
| </answer> |
| <h3>Exported Interfaces</h3> |
| |
| This table lists all of the module exported APIs |
| with |
| defined stability classifications. It is generated |
| based on answers to questions about the architecture |
| of the module. <a href="architecture-summary.html">Read them all</a>... |
| |
| |
| <a name="group-java"> |
| <h5>Group of java interfaces</h5> |
| </a> |
| <table cellpadding="1" cellspacing="0" border="0" class="tablebg" width="100%"> |
| <tr> |
| <td> |
| <table border="0" cellpadding="3" cellspacing="1" width="100%"> |
| <tr class="tablersh"> |
| <td align="CENTER" width="25%"><span class="titlectable">Interface Name</span></td><td align="CENTER" width="10%"><span class="titlectable">In/Out</span></td><td align="CENTER" width="10%"><span class="titlectable">Stability</span></td><td align="CENTER"><span class="titlectable">Specified in What Document?</span></td> |
| </tr> |
| <tr class="tabler"> |
| <td>XDM</td><td>Exported</td><td><a href="http://wiki.netbeans.org/API_Stability#Devel">Under Development</a></td><td><a name="java-XDM"> |
| <p></p>XDM (XML Document Model)<p></p> |
| </a></td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| <p></p> |
| <h3>Implementation Details</h3> |
| <h5>Where are the sources for the module?</h5> |
| |
| <p> |
| <p> |
| The sources for the module are in the |
| <a href="http://hg.netbeans.org/" shape="rect">NetBeans Mercurial repositories</a>. |
| </p> |
| </p> |
| |
| <h5>What do other modules need to do to declare a dependency on this one, in addition to or instead of a plain module dependency?</h5> |
| |
| <defaultanswer generate="here"></defaultanswer> |
| |
| <p> |
| Read more about the implementation in the <a href="architecture-summary.html">answers to |
| architecture questions</a>. |
| </p></div> |
| </div> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li class="navBarCell1Rev">Overview</li> |
| <li>Package</li> |
| <li>Class</li> |
| <li>Use</li> |
| <li><a href="overview-tree.html">Tree</a></li> |
| <li><a href="deprecated-list.html">Deprecated</a></li> |
| <li><a href="index-files/index-1.html">Index</a></li> |
| <li><a href="help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage">org.netbeans.modules.xml.xdm/1 1.36.1 1</div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev</li> |
| <li>Next</li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="index.html?overview-summary.html" target="_top">Frames</a></li> |
| <li><a href="overview-summary.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small><span class="footnote">Built on September 14 2018. | Copyright © 2017-2018 Apache Software Foundation. All Rights Reserved.</span></small></p> |
| </body> |
| </html> |