Package org.apache.batik.anim.dom
Class SAXSVGDocumentFactory
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.apache.batik.dom.util.SAXDocumentFactory
org.apache.batik.anim.dom.SAXSVGDocumentFactory
- All Implemented Interfaces:
SVGDocumentFactory
,DocumentFactory
,ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
,LexicalHandler
This class contains methods for creating SVGDocument instances
from an URI using SAX2.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.batik.dom.util.SAXDocumentFactory
SAXDocumentFactory.PreInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static String
The accepted DTD public IDs.protected static final String
The dtd public IDs resource bundle class name.protected static Properties
The ResourceBunder for the public and system idsprotected static final String
Constant for HTTP content type header charset field.static final String
Key used for public identifiersstatic final String
Key used for the skippable DTD substitutionstatic final String
Key used for public identifiersstatic final String
Key used for system identifiersstatic final Object
protected static String
The DTD content to use when skippingprotected static String
The DTD public IDs we know we can skip.Fields inherited from class org.apache.batik.dom.util.SAXDocumentFactory
createDocumentDescriptor, currentNode, doctype, document, documentDescriptor, errorHandler, implementation, inCDATA, inDTD, inProlog, isStandalone, isValidating, locator, namespaces, parser, parserClassName, preInfo, stringBuffer, stringContent, xmlVersion
-
Constructor Summary
ConstructorsConstructorDescriptionSAXSVGDocumentFactory
(String parser) Creates a new SVGDocumentFactory object.SAXSVGDocumentFactory
(String parser, boolean dd) Creates a new SVGDocumentFactory object. -
Method Summary
Modifier and TypeMethodDescriptioncreateDocument
(String uri) Creates a SVG Document instance.createDocument
(String uri, InputStream inp) Creates a SVG Document instance.createDocument
(String uri, Reader r) Creates a SVG Document instance.createDocument
(String ns, String root, String uri) Creates a Document instance.createDocument
(String ns, String root, String uri, InputStream is) Creates a Document instance.createDocument
(String ns, String root, String uri, Reader r) Creates a Document instance.org.w3c.dom.svg.SVGDocument
createSVGDocument
(String uri) Creates a SVG Document instance.org.w3c.dom.svg.SVGDocument
createSVGDocument
(String uri, InputStream inp) Creates a SVG Document instance.org.w3c.dom.svg.SVGDocument
createSVGDocument
(String uri, Reader r) Creates a SVG Document instance.resolveEntity
(String publicId, String systemId) SAX2: ImplementsEntityResolver.resolveEntity(String,String)
.void
SAX: ImplementsContentHandler.startDocument()
.Methods inherited from class org.apache.batik.dom.util.SAXDocumentFactory
appendStringData, characters, comment, createDocument, createDocument, createDocument, endCDATA, endDTD, endElement, endEntity, error, fatalError, getDocumentDescriptor, ignorableWhitespace, isValidating, processingInstruction, setDocumentLocator, setErrorHandler, setValidating, startCDATA, startDTD, startElement, startEntity, warning
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, notationDecl, skippedEntity, startPrefixMapping, unparsedEntityDecl
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
Methods inherited from interface org.apache.batik.dom.util.DocumentFactory
createDocument, getDocumentDescriptor, isValidating, setValidating
-
Field Details
-
LOCK
-
KEY_PUBLIC_IDS
Key used for public identifiers- See Also:
-
KEY_SKIPPABLE_PUBLIC_IDS
Key used for public identifiers- See Also:
-
KEY_SKIP_DTD
Key used for the skippable DTD substitution- See Also:
-
KEY_SYSTEM_ID
Key used for system identifiers- See Also:
-
DTDIDS
The dtd public IDs resource bundle class name.- See Also:
-
HTTP_CHARSET
Constant for HTTP content type header charset field.- See Also:
-
dtdids
The accepted DTD public IDs. -
skippable_dtdids
The DTD public IDs we know we can skip. -
skip_dtd
The DTD content to use when skipping -
dtdProps
The ResourceBunder for the public and system ids
-
-
Constructor Details
-
SAXSVGDocumentFactory
Creates a new SVGDocumentFactory object.- Parameters:
parser
- The SAX2 parser classname.
-
SAXSVGDocumentFactory
Creates a new SVGDocumentFactory object.- Parameters:
parser
- The SAX2 parser classname.dd
- Whether a document descriptor must be generated.
-
-
Method Details
-
createSVGDocument
Description copied from interface:SVGDocumentFactory
Creates a SVG Document instance.- Specified by:
createSVGDocument
in interfaceSVGDocumentFactory
- Parameters:
uri
- The document URI.- Throws:
IOException
- if an error occured while reading the document.
-
createSVGDocument
public org.w3c.dom.svg.SVGDocument createSVGDocument(String uri, InputStream inp) throws IOException Creates a SVG Document instance.- Specified by:
createSVGDocument
in interfaceSVGDocumentFactory
- Parameters:
uri
- The document URI.inp
- The document input stream.- Throws:
IOException
- if an error occured while reading the document.
-
createSVGDocument
Creates a SVG Document instance.- Specified by:
createSVGDocument
in interfaceSVGDocumentFactory
- Parameters:
uri
- The document URI.r
- The document reader.- Throws:
IOException
- if an error occured while reading the document.
-
createDocument
Creates a SVG Document instance. This method supports gzipped sources.- Overrides:
createDocument
in classSAXDocumentFactory
- Parameters:
uri
- The document URI.- Throws:
IOException
- if an error occured while reading the document.
-
createDocument
Creates a SVG Document instance.- Overrides:
createDocument
in classSAXDocumentFactory
- Parameters:
uri
- The document URI.inp
- The document input stream.- Throws:
IOException
- if an error occured while reading the document.
-
createDocument
Creates a SVG Document instance.- Overrides:
createDocument
in classSAXDocumentFactory
- Parameters:
uri
- The document URI.r
- The document reader.- Throws:
IOException
- if an error occured while reading the document.
-
createDocument
Creates a Document instance.- Specified by:
createDocument
in interfaceDocumentFactory
- Overrides:
createDocument
in classSAXDocumentFactory
- 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:
IOException
- if an error occured while reading the document.
-
createDocument
public Document createDocument(String ns, String root, String uri, InputStream is) throws IOException Creates a Document instance.- Specified by:
createDocument
in interfaceDocumentFactory
- Overrides:
createDocument
in classSAXDocumentFactory
- 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:
IOException
- if an error occured while reading the document.
-
createDocument
Creates a Document instance.- Specified by:
createDocument
in interfaceDocumentFactory
- Overrides:
createDocument
in classSAXDocumentFactory
- 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:
IOException
- if an error occured while reading the document.
-
getDOMImplementation
- Overrides:
getDOMImplementation
in classSAXDocumentFactory
-
startDocument
SAX: ImplementsContentHandler.startDocument()
.- Specified by:
startDocument
in interfaceContentHandler
- Overrides:
startDocument
in classSAXDocumentFactory
- Throws:
SAXException
-
resolveEntity
SAX2: ImplementsEntityResolver.resolveEntity(String,String)
.- Specified by:
resolveEntity
in interfaceEntityResolver
- Overrides:
resolveEntity
in classDefaultHandler
- Throws:
SAXException
-