Project JXTA

net.jxta.impl.document
Class DOMXMLDocument

java.lang.Object
  extended by net.jxta.impl.document.TextElementCommon
      extended by net.jxta.impl.document.XMLElementCommon
          extended by net.jxta.impl.document.DOMXMLElement
              extended by net.jxta.impl.document.DOMXMLDocument
All Implemented Interfaces:
Attributable, Document, Element, StructuredDocument, StructuredTextDocument, TextDocument, TextElement, XMLDocument, XMLElement, TextDocumentCommon, XMLDocumentCommon

public class DOMXMLDocument
extends DOMXMLElement
implements XMLDocumentCommon

This class is an implementation of the StructuredDocument interface using DOM

See Also:
W3C Document Object Model (DOM), DOM Java Language Binding, Java API for XML Processing (JAXP), org.w3c.dom

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.jxta.impl.document.TextDocumentCommon
TextDocumentCommon.Utils
 
Field Summary
static StructuredDocumentFactory.TextInstantiator INSTANTIATOR
           
 
Fields inherited from class net.jxta.impl.document.DOMXMLElement
domNode, root
 
Method Summary
 Element createElement(Object key)
          
 Element createElement(Object key, Object val)
          
 TextElement createElement(String name)
          
 TextElement createElement(String name, String value)
          
protected  Node getAssocNode()
          Returns the DOM Node associated with this StructuredDocument element.
 String getFileExtension()
          
 MimeMediaType getMimeType()
          
 Reader getReader()
          
 InputStream getStream()
          
 void sendToStream(OutputStream stream)
          
 void sendToWriter(Writer writer)
          
 String toString()
          
 
Methods inherited from class net.jxta.impl.document.DOMXMLElement
addAttribute, addAttribute, appendChild, equals, getAttribute, getAttributes, getChildren, getChildren, getName, getParent, getRoot, getTextValue
 
Methods inherited from class net.jxta.impl.document.TextElementCommon
appendChild, getChildren, getKey, getValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.jxta.document.Element
appendChild, getChildren, getChildren, getKey, getParent, getRoot, getValue
 
Methods inherited from interface net.jxta.document.TextElement
appendChild, getChildren, getName, getTextValue
 
Methods inherited from interface net.jxta.document.Element
appendChild, getChildren, getChildren, getKey, getParent, getRoot, getValue
 
Methods inherited from interface net.jxta.document.TextElement
appendChild, getChildren, getName, getTextValue
 
Methods inherited from interface net.jxta.document.Element
appendChild, getChildren, getChildren, getKey, getParent, getRoot, getValue
 
Methods inherited from interface net.jxta.document.Attributable
addAttribute, addAttribute, getAttribute, getAttributes
 
Methods inherited from interface net.jxta.document.Element
appendChild, getChildren, getChildren, getKey, getParent, getRoot, getValue
 
Methods inherited from interface net.jxta.document.TextElement
appendChild, getChildren, getName, getTextValue
 
Methods inherited from interface net.jxta.document.Element
appendChild, getChildren, getChildren, getKey, getParent, getRoot, getValue
 

Field Detail

INSTANTIATOR

public static final StructuredDocumentFactory.TextInstantiator INSTANTIATOR
Method Detail

toString

public String toString()

Specified by:
toString in interface TextDocument
Overrides:
toString in class Object

getMimeType

public MimeMediaType getMimeType()

Specified by:
getMimeType in interface Document

getFileExtension

public String getFileExtension()

Specified by:
getFileExtension in interface Document

getStream

public InputStream getStream()
                      throws IOException

Specified by:
getStream in interface Document
Throws:
IOException

sendToStream

public void sendToStream(OutputStream stream)
                  throws IOException

Specified by:
sendToStream in interface Document
Throws:
IOException

getReader

public Reader getReader()

Specified by:
getReader in interface TextDocument

sendToWriter

public void sendToWriter(Writer writer)
                  throws IOException

Specified by:
sendToWriter in interface TextDocument
Throws:
IOException

createElement

public Element createElement(Object key)

Specified by:
createElement in interface StructuredDocument

createElement

public Element createElement(Object key,
                             Object val)

Specified by:
createElement in interface StructuredDocument

createElement

public TextElement createElement(String name)

Specified by:
createElement in interface StructuredTextDocument

createElement

public TextElement createElement(String name,
                                 String value)

Specified by:
createElement in interface StructuredTextDocument

getAssocNode

protected Node getAssocNode()
Description copied from class: DOMXMLElement
Returns the DOM Node associated with this StructuredDocument element.

Overrides:
getAssocNode in class DOMXMLElement
Returns:
Node The DOM Node associated with this StructuredDocument element.

JXTA J2SE