Java Doc for XDMModel.java in  » IDE-Netbeans » xml » org » netbeans » modules » xml » xdm » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » xml » org.netbeans.modules.xml.xdm 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.netbeans.modules.xml.xdm.XDMModel

XDMModel
public class XDMModel (Code)

Inner Class :public enum Status

Field Summary
final public static  StringDEFAULT_INDENT
    
final public static  StringPROP_ADDED
    
final public static  StringPROP_DELETED
    
final public static  StringPROP_MODIFIED
    

Constructor Summary
public  XDMModel(ModelSource ms)
    

Method Summary
public synchronized  List<Node>add(Node parent, Node node, int offset)
     This api adds given node to given parent at given index. The added node will be part of childnodes of the parent, and its index will be the given index.
public synchronized  voidaddPropertyChangeListener(PropertyChangeListener pcl)
     This api adds a property change listener.
public synchronized  voidaddUndoableEditListener(UndoableEditListener l)
     This api adds an undoable edit listener.
public synchronized  List<Node>append(Node parent, Node node)
     This api adds given node to given parent at the end. The added node will be part of childnodes of the parent, and it will be the last node.
Parameters:
  parent - The parent node to which the node is to be appended.
Parameters:
  node - The node which is to be appended.
public synchronized  List<Node>delete(Node n)
     This api deletes given node from a tree.
Parameters:
  node - The node to be deleted.
public synchronized  voidflush()
     This api flushes the changes made to the model to the underlying document.
public synchronized  DocumentgetCurrentDocument()
     This api returns the current document in the model, regardless of the state.
public synchronized  StringgetCurrentDocumentText()
    
public synchronized  DocumentgetDocument()
     This api returns the latest stable document in the model.
public  ElementIdentitygetElementIdentity()
    
public  StringgetIndentation()
    
public  intgetNextNodeId()
     This api keeps track of the nodes created in this model.
public  Map<QName, List<QName>>getQNameValuedAttributes()
    
public synchronized  StatusgetStatus()
     This returns the statuc of the model.
public synchronized  List<Node>insertBefore(Node parent, Node node, Node refChild)
     This api adds given node to given parent before given ref node. The inserted node will be part of childnodes of the parent, and will appear before ref node.
Parameters:
  parent - The parent node to which the node is to be added.
Parameters:
  node - The node which is to be added.
Parameters:
  refChild - The ref node (child) of parent node,before which the node is to be added.
public  voidmergeDiff(List<Difference> diffs)
    
public synchronized  List<Node>modify(Node oldValue, Node newValue)
     This api replaces given old node with given new node. The old node passed must be in tree, the new node must not be in tree, and new node must be clone of old node.
Parameters:
  oldValue - The old node to be replaced.
Parameters:
  newValue - The new node.
public synchronized  voidprepareSync()
    
public synchronized  List<Node>remove(Node parent, Node child)
     This api deletes given node from a given parent node.
Parameters:
  parent - The parent node from which the node is to be deleted.
Parameters:
  child - The node to be deleted.
public synchronized  List<Node>removeAttribute(Element element, String name)
     This api removes an attribute given name and value of a given element node.
Parameters:
  element - The element of which the attribute to be removed.
Parameters:
  name - The name of the attribute to be removed.
public synchronized  List<Node>removeChildNodes(Node parent, Collection<Node> toRemove)
     This api deletes given node from a given parent node.
Parameters:
  parent - The parent node from which the node is to be deleted.
Parameters:
  toRemove - collection of node to be deleted.
public synchronized  voidremovePropertyChangeListener(PropertyChangeListener pcl)
     This api removes a property change listener.
public synchronized  voidremoveUndoableEditListener(UndoableEditListener l)
     This api removes an undoable edit listener.
public synchronized  List<Node>reorder(Node parent, Node n, int index)
     This api changes index of the given node.
Parameters:
  nodes - The nodes to be moved.
Parameters:
  indexes - the new indexes of the nodes.
public synchronized  List<Node>reorderChildren(Node parent, int[] permutation)
     This api changes indexes of the given node children.
Parameters:
  nodes - The nodes to be moved.
Parameters:
  indexes - the new indexes of the nodes.
public synchronized  List<Node>replaceChild(Node parent, Node child, Node newChild)
    
synchronized  voidresetDocument(Document newDoc)
     Reset document to provided known version and cause events to be fired.
public synchronized  List<Node>setAttribute(Element element, String name, String value)
     This api sets an attribute given name and value of a given element node. If an attribute with given name already present in element, it will only set the value.
public synchronized  voidsetDocument(Document newDoc)
    
public  voidsetElementIdentity(ElementIdentity eID)
    
public  voidsetIndentation(String indent)
    
public  voidsetPretty(boolean print)
    
public  voidsetQNameValuedAttributes(Map<QName, List<QName>> attrsByElement)
     Set/get mapping of QName-valued attributes by element. Key of the mapping is QName of the element. Value of the mapping is list QName's of the attributes. If the mapping is set, it will be used to identify the attribute values affected by namespace prefix refactoring during namespace consolidation.
public synchronized  List<Node>setTextValue(Node node, String value)
    
public synchronized  List<Node>setXmlFragmentText(Element node, String value)
    
public synchronized  voidsync()
     This api syncs the model with the underlying swing document. If its the first time sync is called, swing document is parsed and model is initialized.

Field Detail
DEFAULT_INDENT
final public static String DEFAULT_INDENT(Code)



PROP_ADDED
final public static String PROP_ADDED(Code)
Indicates node added



PROP_DELETED
final public static String PROP_DELETED(Code)
Indicates node deleted



PROP_MODIFIED
final public static String PROP_MODIFIED(Code)
Indicates node modified




Constructor Detail
XDMModel
public XDMModel(ModelSource ms)(Code)

Parameters:
  ms - requires an instance of org.netbeans.editor.BaseDocument to beavailable in the lookup;




Method Detail
add
public synchronized List<Node> add(Node parent, Node node, int offset)(Code)
This api adds given node to given parent at given index. The added node will be part of childnodes of the parent, and its index will be the given index. If the given index is out of the parents childnodes range, the node will be appended.
Parameters:
  parent - The parent node to which the node is to be added.
Parameters:
  node - The node which is to be added.
Parameters:
  offset - The index at which the node is to be added. The parent node resulted by addition of this node



addPropertyChangeListener
public synchronized void addPropertyChangeListener(PropertyChangeListener pcl)(Code)
This api adds a property change listener.
Parameters:
  pcl - The property change listener to be added.



addUndoableEditListener
public synchronized void addUndoableEditListener(UndoableEditListener l)(Code)
This api adds an undoable edit listener.
Parameters:
  l - The undoable edit listener to be added.



append
public synchronized List<Node> append(Node parent, Node node)(Code)
This api adds given node to given parent at the end. The added node will be part of childnodes of the parent, and it will be the last node.
Parameters:
  parent - The parent node to which the node is to be appended.
Parameters:
  node - The node which is to be appended. The parent node resulted by addition of this node



delete
public synchronized List<Node> delete(Node n)(Code)
This api deletes given node from a tree.
Parameters:
  node - The node to be deleted. The parent node resulted by deletion of this node.



flush
public synchronized void flush()(Code)
This api flushes the changes made to the model to the underlying document.



getCurrentDocument
public synchronized Document getCurrentDocument()(Code)
This api returns the current document in the model, regardless of the state. The latest stable document in the model.



getCurrentDocumentText
public synchronized String getCurrentDocumentText()(Code)



getDocument
public synchronized Document getDocument()(Code)
This api returns the latest stable document in the model. The latest stable document in the model.



getElementIdentity
public ElementIdentity getElementIdentity()(Code)



getIndentation
public String getIndentation()(Code)



getNextNodeId
public int getNextNodeId()(Code)
This api keeps track of the nodes created in this model. the id of the next node to be created.



getQNameValuedAttributes
public Map<QName, List<QName>> getQNameValuedAttributes()(Code)



getStatus
public synchronized Status getStatus()(Code)
This returns the statuc of the model. the status.
See Also:   XDMModel.Status



insertBefore
public synchronized List<Node> insertBefore(Node parent, Node node, Node refChild)(Code)
This api adds given node to given parent before given ref node. The inserted node will be part of childnodes of the parent, and will appear before ref node.
Parameters:
  parent - The parent node to which the node is to be added.
Parameters:
  node - The node which is to be added.
Parameters:
  refChild - The ref node (child) of parent node,before which the node is to be added. The parent node resulted by inserion of this node.



mergeDiff
public void mergeDiff(List<Difference> diffs)(Code)



modify
public synchronized List<Node> modify(Node oldValue, Node newValue)(Code)
This api replaces given old node with given new node. The old node passed must be in tree, the new node must not be in tree, and new node must be clone of old node.
Parameters:
  oldValue - The old node to be replaced.
Parameters:
  newValue - The new node. The new parent



prepareSync
public synchronized void prepareSync()(Code)



remove
public synchronized List<Node> remove(Node parent, Node child)(Code)
This api deletes given node from a given parent node.
Parameters:
  parent - The parent node from which the node is to be deleted.
Parameters:
  child - The node to be deleted. The parent node resulted by deletion of this node.



removeAttribute
public synchronized List<Node> removeAttribute(Element element, String name)(Code)
This api removes an attribute given name and value of a given element node.
Parameters:
  element - The element of which the attribute to be removed.
Parameters:
  name - The name of the attribute to be removed. The element resulted by removed of attribute.



removeChildNodes
public synchronized List<Node> removeChildNodes(Node parent, Collection<Node> toRemove)(Code)
This api deletes given node from a given parent node.
Parameters:
  parent - The parent node from which the node is to be deleted.
Parameters:
  toRemove - collection of node to be deleted. The parent node resulted by deletion of this node.



removePropertyChangeListener
public synchronized void removePropertyChangeListener(PropertyChangeListener pcl)(Code)
This api removes a property change listener.
Parameters:
  pcl - The property change listener to be removed.



removeUndoableEditListener
public synchronized void removeUndoableEditListener(UndoableEditListener l)(Code)
This api removes an undoable edit listener.
Parameters:
  l - The undoable edit listener to be removed.



reorder
public synchronized List<Node> reorder(Node parent, Node n, int index)(Code)
This api changes index of the given node.
Parameters:
  nodes - The nodes to be moved.
Parameters:
  indexes - the new indexes of the nodes. The parent node resulted by deletion of this node.



reorderChildren
public synchronized List<Node> reorderChildren(Node parent, int[] permutation)(Code)
This api changes indexes of the given node children.
Parameters:
  nodes - The nodes to be moved.
Parameters:
  indexes - the new indexes of the nodes. The parent node resulted by deletion of this node.



replaceChild
public synchronized List<Node> replaceChild(Node parent, Node child, Node newChild)(Code)



resetDocument
synchronized void resetDocument(Document newDoc)(Code)
Reset document to provided known version and cause events to be fired. Note caller are responsible to handle exception and decide which version to keep after exception and do proper cleanup.



setAttribute
public synchronized List<Node> setAttribute(Element element, String name, String value)(Code)
This api sets an attribute given name and value of a given element node. If an attribute with given name already present in element, it will only set the value. Otherwise a new attribute node, with given name and value, will be appended to the attibute list of the element node.
Parameters:
  element - The element of which the attribute to be set.
Parameters:
  name - The name of the attribute to be set.
Parameters:
  value - The value of the attribute to be set. The element resulted by setting of attribute.



setDocument
public synchronized void setDocument(Document newDoc)(Code)



setElementIdentity
public void setElementIdentity(ElementIdentity eID)(Code)



setIndentation
public void setIndentation(String indent)(Code)



setPretty
public void setPretty(boolean print)(Code)



setQNameValuedAttributes
public void setQNameValuedAttributes(Map<QName, List<QName>> attrsByElement)(Code)
Set/get mapping of QName-valued attributes by element. Key of the mapping is QName of the element. Value of the mapping is list QName's of the attributes. If the mapping is set, it will be used to identify the attribute values affected by namespace prefix refactoring during namespace consolidation. If not set, namespace consolidation would skip prefix rename refactoring case.



setTextValue
public synchronized List<Node> setTextValue(Node node, String value)(Code)



setXmlFragmentText
public synchronized List<Node> setXmlFragmentText(Element node, String value) throws IOException(Code)



sync
public synchronized void sync() throws IOException(Code)
This api syncs the model with the underlying swing document. If its the first time sync is called, swing document is parsed and model is initialized. Otherwise the changes made to swing document are applied to the model using DiffMerger.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.