Permalink
Browse files

Merge pull request #303 from adamretter/develop

Added javadoc regarding the use of Node#insertBefore and
  • Loading branch information...
2 parents 366763b + 62ae3ba commit 925d0bcd9c1517463b6e52b488a4a1ec4a925b25 @dizzzz dizzzz committed Aug 19, 2014
Showing with 19 additions and 5 deletions.
  1. +19 −5 src/org/exist/dom/NodeImpl.java
@@ -88,11 +88,25 @@ public StoredNode updateChild(Txn transaction, Node oldChild, Node newChild) thr
"not implemented on class " + getClass().getName());
}
- public void insertBefore(Txn transaction, NodeList nodes, Node refChild) throws DOMException {
- throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
- "not implemented on class " + getClass().getName());
- }
-
+ /**
+ * Insert a list of nodes at the position before the reference
+ * child.
+ *
+ * NOTE: You must call insertBefore on the parent node of the node that you
+ * want to insert nodes before.
+ */
+ public void insertBefore(Txn transaction, NodeList nodes, Node refChild) throws DOMException {
+ throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
+ "not implemented on class " + getClass().getName());
+ }
+
+ /**
+ * Insert a list of nodes at the position following the reference
+ * child.
+ *
+ * NOTE: You must call insertAfter on the parent node of the node that you want
+ * to insert nodes after.
+ */
public void insertAfter(Txn transaction, NodeList nodes, Node refChild) throws DOMException {
throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
"insertAfter(Txn transaction, NodeList nodes, Node refChild) " +

0 comments on commit 925d0bc

Please sign in to comment.