org.dom4j.io
Class DocumentSource

java.lang.Object
  extended byjavax.xml.transform.sax.SAXSource
      extended byorg.dom4j.io.DocumentSource
All Implemented Interfaces:
javax.xml.transform.Source

public class DocumentSource
extends javax.xml.transform.sax.SAXSource

DocumentSource implements a JAXP SAXSource for a Document.

Version:
$Revision: 1.8 $
Author:
James Strachan

Field Summary
static java.lang.String DOM4J_FEATURE
          If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument then the Transformer natively supports dom4j.
 
Fields inherited from class javax.xml.transform.sax.SAXSource
FEATURE
 
Constructor Summary
DocumentSource(Document document)
          Creates a JAXP SAXSource for the given Document.
DocumentSource(Node node)
          Creates a JAXP SAXSource for the given Node.
 
Method Summary
 Document getDocument()
           
 XMLReader getXMLReader()
           
 void setDocument(Document document)
          Sets the document used as the JAXP SAXSource
 void setInputSource(InputSource inputSource)
          This method is not supported as this source is always a Document instance.
 void setXMLReader(XMLReader reader)
          Sets the XMLReader used for the JAXP SAXSource.
 
Methods inherited from class javax.xml.transform.sax.SAXSource
getInputSource, getSystemId, setSystemId, sourceToInputSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOM4J_FEATURE

public static final java.lang.String DOM4J_FEATURE
If TransformerFactory.getFeature(java.lang.String) returns true when passed this value as an argument then the Transformer natively supports dom4j.

See Also:
Constant Field Values
Constructor Detail

DocumentSource

public DocumentSource(Node node)
Creates a JAXP SAXSource for the given Node.


DocumentSource

public DocumentSource(Document document)
Creates a JAXP SAXSource for the given Document.

Method Detail

getDocument

public Document getDocument()
Returns:
the document which is being used as the JAXP SAXSource

setDocument

public void setDocument(Document document)
Sets the document used as the JAXP SAXSource


getXMLReader

public XMLReader getXMLReader()
Returns:
the XMLReader to be used for the JAXP SAXSource.

setInputSource

public void setInputSource(InputSource inputSource)
                    throws java.lang.UnsupportedOperationException
This method is not supported as this source is always a Document instance.

Throws:
java.lang.UnsupportedOperationException - as this method is unsupported

setXMLReader

public void setXMLReader(XMLReader reader)
                  throws java.lang.UnsupportedOperationException
Sets the XMLReader used for the JAXP SAXSource.

Throws:
java.lang.UnsupportedOperationException


Copyright © 2004 MetaStuff Ltd. All Rights Reserved. Hosted by

SourceForge Logo