|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
DocumentAdapter for All DOM Document versions. This interface provides a common, version safe access to the DOM document. This interface contains a small number of methods that must be implemented for any DOM version which this application will support.
This should be considered an internal interface and is subject to change.
Method Summary | |
org.w3c.dom.Document |
getDocument()
Returns the Document/adaptee of this DocumentAdapter |
org.w3c.dom.Element |
getElementById(java.lang.String elementId)
Returns the Element for the given mapped identifier else null if not found. |
java.util.Hashtable |
getIdentifierMap()
Returns a Hashtable of id's and their cooresponding Elements for this document. |
void |
importContents(DocumentAdapter sourceAdapter,
java.lang.String sourceId,
java.lang.String destId)
Import the contents from the given sourceAdapter at the sourceId and replace the contents of the destId in this DocumentAdapter. |
void |
removeAttribute(java.lang.String elementId,
java.lang.String attribute)
Removes the given attribute from the element identified by the given id Does nothing if the id is not found. |
void |
setAttributeText(java.lang.String elementId,
java.lang.String attribute,
java.lang.String value)
Stores given value as a text attribute of the element identified by the given id Does nothing if the id is not found. |
void |
setElementText(java.lang.String elementId,
java.lang.String value)
Sets the Text of the Element indicated by the given id to the given value. |
void |
write(java.io.OutputStream stream)
Write the document to the given OutputStream. |
void |
write(java.io.Writer writer)
Write the document to the given Writer. |
Method Detail |
public void write(java.io.OutputStream stream)
stream
- to render the document topublic void write(java.io.Writer writer)
writer
- to render the document topublic void setElementText(java.lang.String elementId, java.lang.String value)
public void setAttributeText(java.lang.String elementId, java.lang.String attribute, java.lang.String value)
public void removeAttribute(java.lang.String elementId, java.lang.String attribute)
public org.w3c.dom.Element getElementById(java.lang.String elementId)
public org.w3c.dom.Document getDocument()
public void importContents(DocumentAdapter sourceAdapter, java.lang.String sourceId, java.lang.String destId) throws DocumentAdapterException
sourceAdapter
- the source DocumentAdapter for the importsourceId
- the parent element to import contents fromdestId
- the parent element to import the contents to
java.lang.IllegalArgumentException
- if any arguments are null
DocumentAdapterException
- if sourceId or destId is invalidpublic java.util.Hashtable getIdentifierMap()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |