org.apache.batik.dom.svg
Class SAXSVGDocumentFactory
java.lang.Object
|
+--org.xml.sax.helpers.DefaultHandler
|
+--org.apache.batik.dom.util.SAXDocumentFactory
|
+--org.apache.batik.dom.svg.SAXSVGDocumentFactory
- All Implemented Interfaces:
- ContentHandler, DocumentFactory, DTDHandler, EntityResolver, ErrorHandler, LexicalHandler, SVGDocumentFactory
- public class SAXSVGDocumentFactory
- extends SAXDocumentFactory
- implements SVGDocumentFactory
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.SAXDocumentFactory |
createDocumentDescriptor, currentNode, document, documentDescriptor, documentElementParsed, implementation, inCDATA, inDTD, locator, namespaces, parserClassName |
Method Summary |
SVGOMDocument |
createDocument(java.lang.String uri)
Creates a SVGOMDocument instance.
This method supports gzipped sources. |
SVGOMDocument |
createDocument(java.lang.String uri,
java.io.InputStream inp)
Creates a SVGOMDocument instance. |
SVGOMDocument |
createDocument(java.lang.String uri,
java.io.Reader r)
Creates a SVGOMDocument instance. |
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. |
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.SAXDocumentFactory |
characters, comment, createDocument, endCDATA, endDTD, endElement, endEntity, getDocumentDescriptor, processingInstruction, setDocumentLocator, startCDATA, startDocument, startDTD, startElement, startEntity |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
SAXSVGDocumentFactory
public SAXSVGDocumentFactory(java.lang.String parser)
- Creates a new SVGDocumentFactory object.
- Parameters:
parser
- The SAX2 parser classname.
SAXSVGDocumentFactory
public SAXSVGDocumentFactory(java.lang.String parser,
boolean dd)
- Creates a new SVGDocumentFactory object.
- Parameters:
parser
- The SAX2 parser classname.dd
- Whether a document descriptor must be generated.
createDocument
public SVGOMDocument createDocument(java.lang.String uri)
throws java.io.IOException
- Creates a SVGOMDocument instance.
This method supports gzipped sources.
- Specified by:
createDocument
in interface SVGDocumentFactory
- Parameters:
uri
- The document URI.- Throws:
java.io.IOException
- if an error occured while reading the document.
createDocument
public SVGOMDocument createDocument(java.lang.String uri,
java.io.InputStream inp)
throws java.io.IOException
- Creates a SVGOMDocument instance.
- Specified by:
createDocument
in interface SVGDocumentFactory
- Parameters:
uri
- The document URI.is
- The document input stream.- Throws:
java.io.IOException
- if an error occured while reading the document.
createDocument
public SVGOMDocument createDocument(java.lang.String uri,
java.io.Reader r)
throws java.io.IOException
- Creates a SVGOMDocument instance.
- Specified by:
createDocument
in interface SVGDocumentFactory
- Parameters:
uri
- The document URI.r
- The document reader.- 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)
throws java.io.IOException
- Creates a Document instance.
- Specified by:
createDocument
in interface DocumentFactory
- Overrides:
createDocument
in class SAXDocumentFactory
- 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.
- Specified by:
createDocument
in interface DocumentFactory
- Overrides:
createDocument
in class SAXDocumentFactory
- 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.
- Specified by:
createDocument
in interface DocumentFactory
- Overrides:
createDocument
in class SAXDocumentFactory
- 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.
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 © 2001 Apache Software Foundation. All Rights Reserved.