org.netbeans.modules.xml.xam.dom
Interface DocumentModel<C extends DocumentComponent<C>>

All Superinterfaces:
Model<C>, Referenceable
All Known Implementing Classes:
AbstractDocumentModel, BpelModelImpl, WSDLModel, WSDLModelImpl

public interface DocumentModel<C extends DocumentComponent<C>>
extends Model<C>

Interface describing an abstract model. The model is based on a document representation that represents the persistent form.

Author:
Chris Webster, Nam Nguyen, Rico Cruz

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.netbeans.modules.xml.xam.Model
Model.State
 
Field Summary
 
Fields inherited from interface org.netbeans.modules.xml.xam.Model
STATE_PROPERTY
 
Method Summary
 boolean areSameNodes(org.w3c.dom.Node n1, org.w3c.dom.Node n2)
           
 C createComponent(C parent, org.w3c.dom.Element element)
          Create component to be added as child of given component.
 DocumentComponent findComponent(int position)
          Find component given a position into the Swing document.
 org.w3c.dom.Document getDocument()
           
 C getRootComponent()
          Returns model root component.
 java.lang.String getXPathExpression(DocumentComponent component)
          Return XPath expression for the given component.
 
Methods inherited from interface org.netbeans.modules.xml.xam.Model
addChildComponent, addComponentListener, addPropertyChangeListener, addUndoableEditListener, addUndoableRefactorListener, endTransaction, getModelSource, getState, inSync, isIntransaction, removeChildComponent, removeComponentListener, removePropertyChangeListener, removeUndoableEditListener, removeUndoableRefactorListener, startTransaction, sync
 

Method Detail

getDocument

org.w3c.dom.Document getDocument()
Returns:
the DOM Document node.

getRootComponent

C getRootComponent()
Returns model root component.


areSameNodes

boolean areSameNodes(org.w3c.dom.Node n1,
                     org.w3c.dom.Node n2)
Returns:
true if two DOM nodes have same identity.

getXPathExpression

java.lang.String getXPathExpression(DocumentComponent component)
Return XPath expression for the given component.


createComponent

C createComponent(C parent,
                  org.w3c.dom.Element element)
Create component to be added as child of given component.


findComponent

DocumentComponent findComponent(int position)
Find component given a position into the Swing document.

Returns:
component if found.