summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelder2006-03-16 10:19:04 (EST)
committerpelder2006-03-16 10:19:04 (EST)
commitde39cdc66b3c785c5756398973abc8014b42edfc (patch)
tree41f1967ab1508fa86dd85592881a52195fd2ab4e
parent0d883910a16b7cb69561d7b18bf30f3cc686d5eb (diff)
downloadorg.eclipse.jet-de39cdc66b3c785c5756398973abc8014b42edfc.zip
org.eclipse.jet-de39cdc66b3c785c5756398973abc8014b42edfc.tar.gz
org.eclipse.jet-de39cdc66b3c785c5756398973abc8014b42edfc.tar.bz2
Improve java doc
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/xpath/inspector/IElementInspector.java47
-rw-r--r--plugins/org.eclipse.jet/src/org/eclipse/jet/xpath/inspector/INodeInspectorExtension1.java4
2 files changed, 37 insertions, 14 deletions
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/xpath/inspector/IElementInspector.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/xpath/inspector/IElementInspector.java
index e780fa0..a8c5b65 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/xpath/inspector/IElementInspector.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/xpath/inspector/IElementInspector.java
@@ -29,10 +29,10 @@ public interface IElementInspector extends INodeInspector
/**
* Return all the attributes for the given contextNode. The implementer
* may assume the getNodeKind(contextNode) is NodeKind.ELEMENT.
- * @param contextNode an ELEMENT node
+ * @param node an ELEMENT node
* @return an array of attributes. Return an empty array if there are not matches.
*/
- Object[] getAttributes(Object contextNode);
+ Object[] getAttributes(Object node);
/**
* Return the named attribute for the given contextNode. The implementer
@@ -45,48 +45,60 @@ public interface IElementInspector extends INodeInspector
* is a name.</li>
* </bl>
* This method will not be called if the XPath nameTest includes a wild-card character (*).
- * @param contextNode the ELEMENT to search
+ * @param node the ELEMENT to search
* @param nameTestExpandedName the expanded name of the attribute to find
* @return the attribute, or <code>null</code> if not found.
*/
- Object getNamedAttribute(Object contextNode, ExpandedName nameTestExpandedName);
+ Object getNamedAttribute(Object node, ExpandedName nameTestExpandedName);
/**
* Create the named attribute on the context node (which is an ELEMENT) and set its
* value to the passed value.
- * @param contextNode
+ * <p>
+ * This method is optional. If not implemented, inspectors should throw {@link UnsupportedOperationException}.
+ * <p>
+ * @param node
* @param attributeName
* @param value
* @return <code>true</code> if the attribute could create the attribute, <code>false</code> otherwise.
*/
- boolean createAttribute(Object contextNode, String attributeName, String value);
+ boolean createAttribute(Object node, String attributeName, String value);
/**
* Create a new Element under context Node
- * @param contextNode a the ELEMENT under which the new element will be created
+ * @param node a the ELEMENT under which the new element will be created
* @param elementName the expanded name for the new element.
* @param addBeforeThisSibling a child of <code>contextNode</code> or <code>null</code>.
* If non-null, then the new element is inserted immediately before this element.
* If <code>null</code>, the new element will be added at the end of the appropriate collection
* of element children.
+ * <p>
+ * This method is optional. If not implemented, inspectors should throw {@link UnsupportedOperationException}.
+ * <p>
* @return the new element, or <code>null</code> if the element could not be created.
* @throws SimpleElementRequiresValueException
* @throws InvalidChildException
*/
- Object addElement(Object contextNode, ExpandedName elementName, Object addBeforeThisSibling) throws SimpleElementRequiresValueException,
+ Object addElement(Object node, ExpandedName elementName, Object addBeforeThisSibling) throws SimpleElementRequiresValueException,
InvalidChildException;
/**
- * Remove the specified element from its containing model
- * @param contextNode the ELEMENT which is to be removed.
+ * Remove the specified element from its containing model.
+ * <p>
+ * This method is optional. If not implemented, inspectors should throw {@link UnsupportedOperationException}.
+ * <p>
+ * @param node the ELEMENT which is to be removed.
*/
- void removeElement(Object contextNode);
+ void removeElement(Object node);
/**
* Make a copy of <code>srcElement</code> under <code>tgtParent</code> with the specified name.
* <p>
* The implementation should check that <code>tgtParent</code> and <code>srcElement</code>
* are in the compatible meta-models.
+ * <p>
+ * This method is optional. If not implemented, inspectors should throw {@link UnsupportedOperationException}.
+ * <p>
* @param tgtParent
* @param srcElement
* @param name
@@ -99,6 +111,9 @@ public interface IElementInspector extends INodeInspector
/**
* Create a new text (simple) element under <code>parentElement</code> with the specified
* name and content.
+ * <p>
+ * This method is optional. If not implemented, inspectors should throw {@link UnsupportedOperationException}.
+ * <p>
* @param parentElement
* @param name
* @param bodyContent
@@ -108,5 +123,13 @@ public interface IElementInspector extends INodeInspector
*/
Object addTextElement(Object parentElement, String name, String bodyContent, boolean asCData) throws AddElementException;
- void removeAttribute(Object element, String name);
+ /**
+ * Remove the named attribute from the node that represents an element.
+ * <p>
+ * This method is optional. If not implemented, inspectors should throw {@link UnsupportedOperationException}.
+ * <p>
+ * @param node
+ * @param name
+ */
+ void removeAttribute(Object node, String name);
}
diff --git a/plugins/org.eclipse.jet/src/org/eclipse/jet/xpath/inspector/INodeInspectorExtension1.java b/plugins/org.eclipse.jet/src/org/eclipse/jet/xpath/inspector/INodeInspectorExtension1.java
index 33b85fe..a761b79 100644
--- a/plugins/org.eclipse.jet/src/org/eclipse/jet/xpath/inspector/INodeInspectorExtension1.java
+++ b/plugins/org.eclipse.jet/src/org/eclipse/jet/xpath/inspector/INodeInspectorExtension1.java
@@ -36,10 +36,10 @@ public interface INodeInspectorExtension1
* is a name.</li>
* </bl>
* This method will not be called if the XPath nameTest includes a wild-card character (*).
- * @param contextNode the ELEMENT or ROOT to search
+ * @param node the ELEMENT or ROOT to search
* @param nameTestExpandedName the expanded name of the element to find.
* @return the child element or <code>null</code> if not found.
*/
- Object[] getNamedChildren(Object contextNode, ExpandedName nameTestExpandedName);
+ Object[] getNamedChildren(Object node, ExpandedName nameTestExpandedName);
}