Inheritance diagram for org::jdom::Document:
Public Member Functions | |
Document () | |
Document (Element rootElement, DocType docType, String baseURI) | |
Document (Element rootElement, DocType docType) | |
Document (Element rootElement) | |
Document (List content) | |
int | getContentSize () |
int | indexOf (Content child) |
boolean | hasRootElement () |
Element | getRootElement () |
Document | setRootElement (Element rootElement) |
Element | detachRootElement () |
DocType | getDocType () |
Document | setDocType (DocType docType) |
Document | addContent (Content child) |
Document | addContent (Collection c) |
Document | addContent (int index, Content child) |
Document | addContent (int index, Collection c) |
List | cloneContent () |
Content | getContent (int index) |
List | getContent () |
List | getContent (Filter filter) |
List | removeContent () |
List | removeContent (Filter filter) |
Document | setContent (Collection newContent) |
final void | setBaseURI (String uri) |
final String | getBaseURI () |
Document | setContent (int index, Content child) |
Document | setContent (int index, Collection collection) |
boolean | removeContent (Content child) |
Content | removeContent (int index) |
Document | setContent (Content child) |
String | toString () |
final boolean | equals (Object ob) |
final int | hashCode () |
Object | clone () |
Iterator | getDescendants () |
Iterator | getDescendants (Filter filter) |
Parent | getParent () |
Document | getDocument () |
void | setProperty (String id, Object value) |
Object | getProperty (String id) |
Protected Attributes | |
String | baseURI = null |
Package Attributes | |
ContentList | content = new ContentList(this) |
Jason Hunter
Jools Enticknap
Bradley S. Huffman
|
Creates a new empty document. A document must have a root element, so this document will not be well-formed and accessor methods will throw an IllegalStateException if this document is accessed before a root element is added. This method is most useful for build tools. |
|
This will create a new
|
|
This will create a new
|
|
This will create a new
|
|
This will create a new
|
|
Inserts the content in a collection into the content list at the given index. In event of an exception the original content will be unchanged and the objects in the supplied collection will be unaltered.
|
|
Inserts the child into the content list at the given index.
|
|
Appends all children in the given collection to the end of the content list. In event of an exception during add the original content will be unchanged and the objects in the supplied collection will be unaltered.
|
|
Appends the child to the end of the content list.
|
|
This will return a deep clone of this
Implements org::jdom::Parent. |
|
Returns a list containing detached clones of this parent's content list.
Implements org::jdom::Parent. |
|
Detach the root
|
|
This tests for equality of this
|
|
Returns the URI from which this document was loaded, or null if this is not known.
|
|
Return a filtered view of this Sequential traversal through the List is best done with a Iterator since the underlying implement of List.size() may require walking the entire list.
Implements org::jdom::Parent. |
|
This will return all content for the Sequential traversal through the List is best done with a Iterator since the underlying implement of List.size() may require walking the entire list.
Implements org::jdom::Parent. |
|
Returns the child at the given index.
Implements org::jdom::Parent. |
|
Returns the number of children in this parent's content list. Children may be any Content type.
Implements org::jdom::Parent. |
|
Returns an iterator that walks over all descendants in document order applying the Filter to return only elements that match the filter rule. With filters you can match only Elements, only Comments, Elements or Comments, only Elements with a given name and/or prefix, and so on.
Implements org::jdom::Parent. |
|
Returns an iterator that walks over all descendants in document order.
Implements org::jdom::Parent. |
|
This will return the
|
|
Implements org::jdom::Parent. |
|
Return this parent's parent, or null if this parent is currently not attached to another parent. This is the same method as in Content but also added to Parent to allow more easy up-the-tree walking.
Implements org::jdom::Parent. |
|
Returns the object associated with this document under the given "id" string, or null if there is no binding or if the binding explicitly stored a null value.
|
|
This will return the root
|
|
This returns the hash code for this
|
|
This will return
|
|
Returns the index of the supplied child in the content list, or -1 if not a child of this parent.
Implements org::jdom::Parent. |
|
Removes and returns the child at the given index, or returns null if there's no such child.
Implements org::jdom::Parent. |
|
Removes a single child node from the content list.
Implements org::jdom::Parent. |
|
Remove all child content from this parent matching the supplied filter.
Implements org::jdom::Parent. |
|
Removes all child content from this parent.
Implements org::jdom::Parent. |
|
Sets the effective URI from which this document was loaded, and against which relative URLs in this document will be resolved.
|
|
Set this document's content to be the supplied child. If the supplied child is legal content for a Document and before it is added, all content in the current content list will be cleared and all current children will have their parentage set to null. This has the effect that any active list (previously obtained with a call to one of the getContent methods will also change to reflect the new content. In addition, all content in the supplied collection will have their parentage set to this Document. If the user wants to continue working with a "live" list of this Document's child, then a call to setContent should be followed by a call to one of the getContent methods to obtain a "live" version of the children. Passing a null child clears the existing content. In event of an exception the original content will be unchanged and the supplied child will be unaltered.
|
|
Replace the child at the given index whith the supplied collection. In event of an exception the original content will be unchanged and the content in the supplied collection will be unaltered.
|
|
This sets the content of the When all objects in the supplied List are legal and before the new content is added, all objects in the old content will have their parentage set to null (no parent) and the old content list will be cleared. This has the effect that any active list (previously obtained with a call to getContent) will also change to reflect the new content. In addition, all objects in the supplied List will have their parentage set to this document, but the List itself will not be "live" and further removals and additions will have no effect on this document content. If the user wants to continue working with a "live" list, then a call to setContent should be followed by a call to getContent to obtain a "live" version of the content. Passing a null or empty List clears the existing content. In event of an exception the original content will be unchanged and the objects in the supplied content will be unaltered.
|
|
This will set the
|
|
Assigns an arbitrary object to be associated with this document under the given "id" string. Null values are permitted. Strings beginning with "http://www.jdom.org/ are reserved for JDOM use.
|
|
This sets the root
|
|
This returns a
|
|
See http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/core.html#baseURIs-Considerations |
|
This document's content including comments, PIs, a possible DocType, and a root element. Subclassers have to track content using their own mechanism. |