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 SAXDocumentFactory
SAXDocumentFactory.PreInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static StringThe accepted DTD public IDs.protected static final StringThe dtd public IDs resource bundle class name.protected static PropertiesThe ResourceBunder for the public and system idsprotected static final StringConstant for HTTP content type header charset field.static final StringKey used for public identifiersstatic final StringKey used for the skippable DTD substitutionstatic final StringKey used for public identifiersstatic final StringKey used for system identifiersstatic final Objectprotected static StringThe DTD content to use when skippingprotected static StringThe DTD public IDs we know we can skip.Fields inherited from class 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.SVGDocumentcreateSVGDocument(String uri) Creates a SVG Document instance.org.w3c.dom.svg.SVGDocumentcreateSVGDocument(String uri, InputStream inp) Creates a SVG Document instance.org.w3c.dom.svg.SVGDocumentcreateSVGDocument(String uri, Reader r) Creates a SVG Document instance.resolveEntity(String publicId, String systemId) SAX2: ImplementsEntityResolver.resolveEntity(String,String).voidSAX: ImplementsContentHandler.startDocument().Methods inherited from class SAXDocumentFactory
appendStringData, characters, comment, createDocument, createDocument, createDocument, endCDATA, endDTD, endElement, endEntity, error, fatalError, getDocumentDescriptor, ignorableWhitespace, isValidating, processingInstruction, setDocumentLocator, setErrorHandler, setValidating, startCDATA, startDTD, startElement, startEntity, warningMethods inherited from class DefaultHandler
endDocument, endPrefixMapping, notationDecl, skippedEntity, startPrefixMapping, unparsedEntityDeclMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ContentHandler
declarationMethods inherited from interface DocumentFactory
createDocument, getDocumentDescriptor, isValidating, setValidating
-
Field Details
-
LOCK
-
KEY_PUBLIC_IDS
-
KEY_SKIPPABLE_PUBLIC_IDS
-
KEY_SKIP_DTD
-
KEY_SYSTEM_ID
-
DTDIDS
-
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:SVGDocumentFactoryCreates a SVG Document instance.- Specified by:
createSVGDocumentin 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:
createSVGDocumentin 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:
createSVGDocumentin 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:
createDocumentin classSAXDocumentFactory- Parameters:
uri- The document URI.- Throws:
IOException- if an error occured while reading the document.
-
createDocument
Creates a SVG Document instance.- Overrides:
createDocumentin 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:
createDocumentin 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:
createDocumentin interfaceDocumentFactory- Overrides:
createDocumentin 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:
createDocumentin interfaceDocumentFactory- Overrides:
createDocumentin 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:
createDocumentin interfaceDocumentFactory- Overrides:
createDocumentin 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:
getDOMImplementationin classSAXDocumentFactory
-
startDocument
SAX: ImplementsContentHandler.startDocument().- Specified by:
startDocumentin interfaceContentHandler- Overrides:
startDocumentin classSAXDocumentFactory- Throws:
SAXException
-
resolveEntity
SAX2: ImplementsEntityResolver.resolveEntity(String,String).- Specified by:
resolveEntityin interfaceEntityResolver- Overrides:
resolveEntityin classDefaultHandler- Throws:
SAXException
-