org.apache.batik.dom.svg
Class SVGDocumentFactory

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--org.apache.batik.dom.util.DocumentFactory
              |
              +--org.apache.batik.dom.svg.SVGDocumentFactory
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler, LexicalHandler

public class SVGDocumentFactory
extends DocumentFactory

This class contains methods for creating SVGDocument instances from an URI using SAX2.


Field Summary
protected static java.lang.String DTDS
          The dtd URIs resource bundle class name.
protected static java.lang.String uris
          The accepted DTD URIs.
 
Fields inherited from class org.apache.batik.dom.util.DocumentFactory
currentNode, document, documentElementParsed, implementation, inCDATA, inDTD, namespaces, parserClassName
 
Constructor Summary
SVGDocumentFactory(java.lang.String parser)
          Creates a new SVGDocumentFactory object.
 
Method Summary
 SVGOMDocument createDocument(java.lang.String uri, InputSource is)
          Creates a SVGOMDocument instance.
 InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
          SAX2: Implements EntityResolver.resolveEntity(String,String).
 
Methods inherited from class org.apache.batik.dom.util.DocumentFactory
characters, comment, createDocument, endCDATA, endDTD, endElement, endEntity, processingInstruction, startCDATA, startDocument, startDTD, startElement, startEntity
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DTDS

protected static final java.lang.String DTDS
The dtd URIs resource bundle class name.

uris

protected static java.lang.String uris
The accepted DTD URIs.
Constructor Detail

SVGDocumentFactory

public SVGDocumentFactory(java.lang.String parser)
Creates a new SVGDocumentFactory object.
Parameters:
parser - The SAX2 parser classname.
Method Detail

createDocument

public SVGOMDocument createDocument(java.lang.String uri,
                                    InputSource is)
                             throws DOMException,
                                    SAXException,
                                    java.lang.InterruptedException
Creates a SVGOMDocument instance.
Parameters:
uri - The document URI.
is - The document input source.
Throws:
DOMException - if an error occured when building the document.
SAXException - if an error occured when reading the document.
java.lang.InterruptedException - if the I/O thread is interrupted

resolveEntity

public InputSource resolveEntity(java.lang.String publicId,
                                 java.lang.String systemId)
                          throws SAXException
SAX2: Implements EntityResolver.resolveEntity(String,String).
Overrides:
resolveEntity in class DefaultHandler
Following copied from class: org.xml.sax.helpers.DefaultHandler
Parameters:
publicId - The public identifer, or null if none is available.
systemId - The system identifier provided in the XML document.
Returns:
The new input source, or null to require the default behaviour.
Throws:
SAXException - Any SAX exception, possibly wrapping another exception.
See Also:
EntityResolver.resolveEntity(java.lang.String, java.lang.String)


Copyright © 2000 Apache Software Foundation. All Rights Reserved.