Package org.dom4j.io

Class DocumentSource

  • All Implemented Interfaces:
    javax.xml.transform.Source

    public class DocumentSource
    extends javax.xml.transform.sax.SAXSource
    DocumentSource implements a JAXP SAXSourcefor a Document.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Document getDocument()
      DOCUMENT ME!
      org.xml.sax.XMLReader getXMLReader()
      DOCUMENT ME!
      void setDocument(Document document)
      Sets the document used as the JAXP SAXSource
      void setInputSource(org.xml.sax.InputSource inputSource)
      This method is not supported as this source is always a Document instance.
      void setXMLReader(org.xml.sax.XMLReader reader)
      Sets the XMLReader used for the JAXP SAXSource.
      • Methods inherited from class javax.xml.transform.sax.SAXSource

        getInputSource, getSystemId, isEmpty, 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 SAXSourcefor the given Node.
        Parameters:
        node - DOCUMENT ME!
      • DocumentSource

        public DocumentSource(Document document)
        Creates a JAXP SAXSourcefor the given Document.
        Parameters:
        document - DOCUMENT ME!
    • Method Detail

      • getDocument

        public Document getDocument()
        DOCUMENT ME!
        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
        Parameters:
        document - DOCUMENT ME!
      • getXMLReader

        public org.xml.sax.XMLReader getXMLReader()
        DOCUMENT ME!
        Overrides:
        getXMLReader in class javax.xml.transform.sax.SAXSource
        Returns:
        the XMLReader to be used for the JAXP SAXSource.
      • setInputSource

        public void setInputSource(org.xml.sax.InputSource inputSource)
                            throws java.lang.UnsupportedOperationException
        This method is not supported as this source is always a Document instance.
        Overrides:
        setInputSource in class javax.xml.transform.sax.SAXSource
        Parameters:
        inputSource - DOCUMENT ME!
        Throws:
        java.lang.UnsupportedOperationException - as this method is unsupported
      • setXMLReader

        public void setXMLReader(org.xml.sax.XMLReader reader)
                          throws java.lang.UnsupportedOperationException
        Sets the XMLReader used for the JAXP SAXSource.
        Overrides:
        setXMLReader in class javax.xml.transform.sax.SAXSource
        Parameters:
        reader - DOCUMENT ME!
        Throws:
        java.lang.UnsupportedOperationException - DOCUMENT ME!