| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DocumentModel
Read-only version of the document model. You may query topology information of the node hierarchy from this model. Individual nodes may however be shared across document models.
It is important to note that each accessor method in the document model assumes that the node that is passed in as a parameter belongs to this model (e.g. it has either be returned by a query on this model or it has been generated via the document controller). Implementations are not required to check if this contract is satisfied. The retult of an operations and subsequent operations that has been invoked with an invalid node is undefined.
The document model implementation does not need to be thread safe. It is in the responsibility of the caller to ensure that the object is not accessed synchroneously.
The document model should be disposed by calling the dispose()
method if it is no longer in use. It is up to the client of this API to decide
when this is the case, the implementation does not keep track of pending
references.
Method Summary | |
---|---|
org.xml.sax.Attributes | getAttributes(Node node)
Return a collection of attributes for a given node. |
java.util.List<Node> | getChildren(Node node)
Returns an immutable list of children for the node. |
Node | getParent(Node node)
Returns the parent for a given node. |
Node | getRoot()
Returns the root node of the document. |
boolean | hasAttributes(Node node)
Performs a quick check if a given node contains attributes. |
boolean | hasChildren(Node node)
Performs a quick check if a given node contains children. |
Methods inherited from interface com.ibm.portal.Disposable |
---|
dispose |
Method Detail |
---|
org.xml.sax.Attributes getAttributes(Node node)
Node getRoot()
Node getParent(Node node)
java.util.List<Node> getChildren(Node node)
boolean hasChildren(Node node)
boolean hasAttributes(Node node)
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |