|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents a node that is a parent.
Field Summary |
Fields inherited from interface com.smallx.xml.infoset.Item |
ANCESTOR_AXIS, ANCESTOR_OR_SELF_AXIS, ATTRIBUTE, ATTRIBUTE_AXIS, CHARACTERS, CHILD_AXIS, COMMENT, DESCENDANT_AXIS, DESCENDANT_OR_SELF_AXIS, DOCUMENT, DOCUMENT_END, ELEMENT, ELEMENT_END, FOLLOWING_AXIS, FOLLOWING_SIBLING_AXIS, N_TYPES, NAMESPACE, NAMESPACE_AXIS, PARENT_AXIS, PRECEDING_AXIS, PRECEDING_SIBLING_AXIS, PROCESSING_INSTRUCTION, SELF_AXIS |
Method Summary | |
void |
appendChild(Child n)
Appends a child to the parents children list. |
java.net.URI |
getBaseURI()
Returns the base URI of the document. |
Child |
getChildAt(int index)
Returns the child at the specified index. |
java.util.Iterator |
getChildren()
Returns a iteration of the children of the parent. |
java.util.Iterator |
getChildrenByType(int type)
Returns the children by infoset item type |
Document |
getDocument()
This method returns the same as getOrigin().getDocument(). |
int |
getNumberOfChildren()
Returns the number of children. |
boolean |
hasChildren()
Indicates if the parent has children. |
void |
insertChildBefore(int index,
Child n)
Inserts a child at the specified index. |
void |
removeChild(Child n)
Removes a child by node identity. |
void |
removeChildAt(int index)
Removes a child at the specified index. |
void |
setBaseURI(java.net.URI base)
|
void |
swapChild(Child oldChild,
Child newChild)
Swaps a child |
Methods inherited from interface com.smallx.xml.infoset.Child |
compareTo, getFollowingSibling, getFollowingSiblings, getParent, getPrecedingSibling, getPrecedingSiblings |
Methods inherited from interface com.smallx.xml.infoset.Item |
getAxis, getGeneratedId, getInfoset, getOrigin, getType |
Method Detail |
public java.net.URI getBaseURI()
public void setBaseURI(java.net.URI base)
public Document getDocument()
Item
getDocument
in interface Child
public boolean hasChildren()
public java.util.Iterator getChildren()
public int getNumberOfChildren()
public Child getChildAt(int index)
index
- The zero-based index of the child to return.public void removeChild(Child n)
n
- The node to remove.public void removeChildAt(int index)
index
- The zero-based index of the child to remove.public void appendChild(Child n)
n
- The node to appent.public void insertChildBefore(int index, Child n)
index
- A zero-based index of the children count.n
- The node to insert.public void swapChild(Child oldChild, Child newChild)
oldChild
- the child to swapnewChild
- the new child to swap inpublic java.util.Iterator getChildrenByType(int type)
type
- The type to return
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |