org.netbeans.modules.xml.xdm.xam
Class XDMAccess
java.lang.Object
org.netbeans.modules.xml.xam.ModelAccess
org.netbeans.modules.xml.xam.dom.DocumentModelAccess
org.netbeans.modules.xml.xdm.xam.XDMAccess
public class XDMAccess
- extends DocumentModelAccess
|
Method Summary |
void |
addMergeEventHandler(PropertyChangeListener l)
|
void |
addQNameValuedAttributes(Map<QName,List<QName>> attributesMap)
|
void |
addUndoableEditListener(UndoableEditListener listener)
|
void |
appendChild(Node node,
Node newChild,
DocumentModelAccess.NodeUpdater updater)
|
boolean |
areSameNodes(Node node1,
Node node2)
|
Element |
duplicate(Element element)
|
Node |
findNode(Document root,
String xpath)
|
List<Node> |
findNodes(Document root,
String xpath)
|
int |
findPosition(Node node)
|
void |
finishUndoRedo()
|
void |
flush()
|
Map<QName,String> |
getAttributeMap(Element element)
|
Element |
getContainingElement(int position)
|
String |
getCurrentDocumentText()
|
Document |
getDocumentRoot()
|
ElementIdentity |
getElementIdentity()
|
int |
getElementIndexOf(Node parent,
Element child)
|
String |
getIndentation()
|
AbstractDocumentModel |
getModel()
|
Node |
getNewEventNode(PropertyChangeEvent event)
|
Node |
getNewEventParentNode(PropertyChangeEvent event)
|
Node |
getOldEventNode(PropertyChangeEvent event)
|
Node |
getOldEventParentNode(PropertyChangeEvent event)
|
List<Element> |
getPathFromRoot(Document root,
Element node)
|
XDMModel |
getReferenceModel()
|
XDMModel |
getXDMModel()
|
String |
getXmlFragment(Element element)
|
String |
getXPath(Document root,
Element node)
|
void |
insertBefore(Node node,
Node newChild,
Node refChild,
DocumentModelAccess.NodeUpdater updater)
|
void |
prepareForUndoRedo()
|
void |
prepareSync()
|
void |
removeAttribute(Element element,
String name,
DocumentModelAccess.NodeUpdater updater)
|
void |
removeChild(Node node,
Node child,
DocumentModelAccess.NodeUpdater updater)
|
void |
removeChildren(Node node,
Collection<Node> children,
DocumentModelAccess.NodeUpdater updater)
|
void |
removeMergeEventHandler(PropertyChangeListener l)
|
void |
removeUndoableEditListener(UndoableEditListener listener)
|
void |
reorderChildren(Element element,
int[] permutation,
DocumentModelAccess.NodeUpdater updater)
|
void |
replaceChild(Node node,
Node child,
Node newChild,
DocumentModelAccess.NodeUpdater updater)
|
void |
setAttribute(Element element,
String name,
String value,
DocumentModelAccess.NodeUpdater updater)
|
void |
setIndentation(String indentation)
|
void |
setPrefix(Element element,
String prefix)
|
void |
setText(Element element,
String val,
DocumentModelAccess.NodeUpdater updater)
Replace children content with single text node having string value. |
void |
setXmlFragment(Element element,
String val,
DocumentModelAccess.NodeUpdater updater)
Replace element children with result from parsing of given xml fragment text. |
Model.State |
sync()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XDMAccess
public XDMAccess(AbstractDocumentModel model)
getDocumentRoot
public Document getDocumentRoot()
- Specified by:
getDocumentRoot in class DocumentModelAccess
removeUndoableEditListener
public void removeUndoableEditListener(UndoableEditListener listener)
- Specified by:
removeUndoableEditListener in class ModelAccess
addUndoableEditListener
public void addUndoableEditListener(UndoableEditListener listener)
- Specified by:
addUndoableEditListener in class ModelAccess
getModel
public AbstractDocumentModel getModel()
- Overrides:
getModel in class DocumentModelAccess
getReferenceModel
public XDMModel getReferenceModel()
flush
public void flush()
- Specified by:
flush in class ModelAccess
prepareForUndoRedo
public void prepareForUndoRedo()
- Specified by:
prepareForUndoRedo in class ModelAccess
finishUndoRedo
public void finishUndoRedo()
- Specified by:
finishUndoRedo in class ModelAccess
prepareSync
public void prepareSync()
- Overrides:
prepareSync in class ModelAccess
sync
public Model.State sync()
throws IOException
- Specified by:
sync in class ModelAccess
- Throws:
IOException
areSameNodes
public boolean areSameNodes(Node node1,
Node node2)
- Specified by:
areSameNodes in class DocumentModelAccess
getElementIndexOf
public int getElementIndexOf(Node parent,
Element child)
- Specified by:
getElementIndexOf in class DocumentModelAccess
setAttribute
public void setAttribute(Element element,
String name,
String value,
DocumentModelAccess.NodeUpdater updater)
- Specified by:
setAttribute in class DocumentModelAccess
removeAttribute
public void removeAttribute(Element element,
String name,
DocumentModelAccess.NodeUpdater updater)
- Specified by:
removeAttribute in class DocumentModelAccess
appendChild
public void appendChild(Node node,
Node newChild,
DocumentModelAccess.NodeUpdater updater)
- Specified by:
appendChild in class DocumentModelAccess
insertBefore
public void insertBefore(Node node,
Node newChild,
Node refChild,
DocumentModelAccess.NodeUpdater updater)
- Specified by:
insertBefore in class DocumentModelAccess
removeChild
public void removeChild(Node node,
Node child,
DocumentModelAccess.NodeUpdater updater)
- Specified by:
removeChild in class DocumentModelAccess
removeChildren
public void removeChildren(Node node,
Collection<Node> children,
DocumentModelAccess.NodeUpdater updater)
- Overrides:
removeChildren in class DocumentModelAccess
replaceChild
public void replaceChild(Node node,
Node child,
Node newChild,
DocumentModelAccess.NodeUpdater updater)
- Specified by:
replaceChild in class DocumentModelAccess
setText
public void setText(Element element,
String val,
DocumentModelAccess.NodeUpdater updater)
- Replace children content with single text node having string value.
- Specified by:
setText in class DocumentModelAccess
getXmlFragment
public String getXmlFragment(Element element)
- Specified by:
getXmlFragment in class DocumentModelAccess
setXmlFragment
public void setXmlFragment(Element element,
String val,
DocumentModelAccess.NodeUpdater updater)
throws IOException
- Replace element children with result from parsing of given xml fragment text.
- Specified by:
setXmlFragment in class DocumentModelAccess
- Throws:
IOException
setPrefix
public void setPrefix(Element element,
String prefix)
- Specified by:
setPrefix in class DocumentModelAccess
findPosition
public int findPosition(Node node)
- Specified by:
findPosition in class DocumentModelAccess
getContainingElement
public Element getContainingElement(int position)
- Specified by:
getContainingElement in class DocumentModelAccess
duplicate
public Element duplicate(Element element)
- Specified by:
duplicate in class DocumentModelAccess
getAttributeMap
public Map<QName,String> getAttributeMap(Element element)
- Specified by:
getAttributeMap in class DocumentModelAccess
getPathFromRoot
public List<Element> getPathFromRoot(Document root,
Element node)
- Specified by:
getPathFromRoot in class DocumentModelAccess
getXPath
public String getXPath(Document root,
Element node)
- Specified by:
getXPath in class DocumentModelAccess
findNode
public Node findNode(Document root,
String xpath)
- Specified by:
findNode in class DocumentModelAccess
findNodes
public List<Node> findNodes(Document root,
String xpath)
- Specified by:
findNodes in class DocumentModelAccess
getXDMModel
public XDMModel getXDMModel()
getElementIdentity
public ElementIdentity getElementIdentity()
- Specified by:
getElementIdentity in class DocumentModelAccess
addMergeEventHandler
public void addMergeEventHandler(PropertyChangeListener l)
- Specified by:
addMergeEventHandler in class DocumentModelAccess
removeMergeEventHandler
public void removeMergeEventHandler(PropertyChangeListener l)
- Specified by:
removeMergeEventHandler in class DocumentModelAccess
getOldEventParentNode
public Node getOldEventParentNode(PropertyChangeEvent event)
- Specified by:
getOldEventParentNode in class DocumentModelAccess
getOldEventNode
public Node getOldEventNode(PropertyChangeEvent event)
- Specified by:
getOldEventNode in class DocumentModelAccess
getNewEventParentNode
public Node getNewEventParentNode(PropertyChangeEvent event)
- Specified by:
getNewEventParentNode in class DocumentModelAccess
getNewEventNode
public Node getNewEventNode(PropertyChangeEvent event)
- Specified by:
getNewEventNode in class DocumentModelAccess
getIndentation
public String getIndentation()
setIndentation
public void setIndentation(String indentation)
reorderChildren
public void reorderChildren(Element element,
int[] permutation,
DocumentModelAccess.NodeUpdater updater)
- Overrides:
reorderChildren in class DocumentModelAccess
getCurrentDocumentText
public String getCurrentDocumentText()
- Overrides:
getCurrentDocumentText in class DocumentModelAccess
addQNameValuedAttributes
public void addQNameValuedAttributes(Map<QName,List<QName>> attributesMap)
- Overrides:
addQNameValuedAttributes in class DocumentModelAccess