org.apache.batik.dom.util
Interface DocumentFactory

All Known Subinterfaces:
SVGDocumentFactory
All Known Implementing Classes:
SAXDocumentFactory

public interface DocumentFactory

This interface represents an object which can build a Document.


Method Summary
 Document createDocument(java.lang.String ns, java.lang.String root, java.lang.String uri)
          Creates a Document instance.
 Document createDocument(java.lang.String ns, java.lang.String root, java.lang.String uri, java.io.InputStream is)
          Creates a Document instance.
 Document createDocument(java.lang.String ns, java.lang.String root, java.lang.String uri, java.io.Reader r)
          Creates a Document instance.
 DocumentDescriptor getDocumentDescriptor()
          Returns the document descriptor associated with the latest created document.
 

Method Detail

createDocument

public Document createDocument(java.lang.String ns,
                               java.lang.String root,
                               java.lang.String uri)
                        throws java.io.IOException
Creates a Document instance.
Parameters:
ns - The namespace URI of the root element of the document.
root - The name of the root element of the document.
uri - The document URI.
Throws:
java.io.IOException - if an error occured while reading the document.

createDocument

public Document createDocument(java.lang.String ns,
                               java.lang.String root,
                               java.lang.String uri,
                               java.io.InputStream is)
                        throws java.io.IOException
Creates a Document instance.
Parameters:
ns - The namespace URI of the root element of the document.
root - The name of the root element of the document.
uri - The document URI.
is - The document input stream.
Throws:
java.io.IOException - if an error occured while reading the document.

createDocument

public Document createDocument(java.lang.String ns,
                               java.lang.String root,
                               java.lang.String uri,
                               java.io.Reader r)
                        throws java.io.IOException
Creates a Document instance.
Parameters:
ns - The namespace URI of the root element of the document.
root - The name of the root element of the document.
uri - The document URI.
r - The document reader.
Throws:
java.io.IOException - if an error occured while reading the document.

getDocumentDescriptor

public DocumentDescriptor getDocumentDescriptor()
Returns the document descriptor associated with the latest created document.
Returns:
null if no document or descriptor was previously generated.


Copyright © 2001 Apache Software Foundation. All Rights Reserved.