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,org.xml.sax.ContentHandler,org.xml.sax.DTDHandler,org.xml.sax.EntityResolver,org.xml.sax.ErrorHandler,org.xml.sax.ext.LexicalHandler
public class SAXSVGDocumentFactory extends SAXDocumentFactory implements SVGDocumentFactory
This class contains methods for creating SVGDocument instances from an URI using SAX2.- Version:
- $Id: SAXSVGDocumentFactory.java 1803524 2017-07-31 12:12:37Z ssteiner $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.batik.dom.util.SAXDocumentFactory
SAXDocumentFactory.PreInfo
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringdtdidsThe accepted DTD public IDs.protected static java.lang.StringDTDIDSThe dtd public IDs resource bundle class name.protected static java.util.PropertiesdtdPropsThe ResourceBunder for the public and system idsprotected static java.lang.StringHTTP_CHARSETConstant for HTTP content type header charset field.static java.lang.StringKEY_PUBLIC_IDSKey used for public identifiersstatic java.lang.StringKEY_SKIP_DTDKey used for the skippable DTD substitutionstatic java.lang.StringKEY_SKIPPABLE_PUBLIC_IDSKey used for public identifiersstatic java.lang.StringKEY_SYSTEM_IDKey used for system identifiersstatic java.lang.ObjectLOCKprotected static java.lang.Stringskip_dtdThe DTD content to use when skippingprotected static java.lang.Stringskippable_dtdidsThe 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
Constructors Constructor Description SAXSVGDocumentFactory(java.lang.String parser)Creates a new SVGDocumentFactory object.SAXSVGDocumentFactory(java.lang.String parser, boolean dd)Creates a new SVGDocumentFactory object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.DocumentcreateDocument(java.lang.String uri)Creates a SVG Document instance.org.w3c.dom.DocumentcreateDocument(java.lang.String uri, java.io.InputStream inp)Creates a SVG Document instance.org.w3c.dom.DocumentcreateDocument(java.lang.String uri, java.io.Reader r)Creates a SVG Document instance.org.w3c.dom.DocumentcreateDocument(java.lang.String ns, java.lang.String root, java.lang.String uri)Creates a Document instance.org.w3c.dom.DocumentcreateDocument(java.lang.String ns, java.lang.String root, java.lang.String uri, java.io.InputStream is)Creates a Document instance.org.w3c.dom.DocumentcreateDocument(java.lang.String ns, java.lang.String root, java.lang.String uri, java.io.Reader r)Creates a Document instance.org.w3c.dom.svg.SVGDocumentcreateSVGDocument(java.lang.String uri)Creates a SVG Document instance.org.w3c.dom.svg.SVGDocumentcreateSVGDocument(java.lang.String uri, java.io.InputStream inp)Creates a SVG Document instance.org.w3c.dom.svg.SVGDocumentcreateSVGDocument(java.lang.String uri, java.io.Reader r)Creates a SVG Document instance.org.w3c.dom.DOMImplementationgetDOMImplementation(java.lang.String ver)org.xml.sax.InputSourceresolveEntity(java.lang.String publicId, java.lang.String systemId)SAX2: ImplementsEntityResolver.resolveEntity(String,String).voidstartDocument()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.apache.batik.dom.util.DocumentFactory
createDocument, getDocumentDescriptor, isValidating, setValidating
-
-
-
-
Field Detail
-
LOCK
public static final java.lang.Object LOCK
-
KEY_PUBLIC_IDS
public static final java.lang.String KEY_PUBLIC_IDS
Key used for public identifiers- See Also:
- Constant Field Values
-
KEY_SKIPPABLE_PUBLIC_IDS
public static final java.lang.String KEY_SKIPPABLE_PUBLIC_IDS
Key used for public identifiers- See Also:
- Constant Field Values
-
KEY_SKIP_DTD
public static final java.lang.String KEY_SKIP_DTD
Key used for the skippable DTD substitution- See Also:
- Constant Field Values
-
KEY_SYSTEM_ID
public static final java.lang.String KEY_SYSTEM_ID
Key used for system identifiers- See Also:
- Constant Field Values
-
DTDIDS
protected static final java.lang.String DTDIDS
The dtd public IDs resource bundle class name.- See Also:
- Constant Field Values
-
HTTP_CHARSET
protected static final java.lang.String HTTP_CHARSET
Constant for HTTP content type header charset field.- See Also:
- Constant Field Values
-
dtdids
protected static java.lang.String dtdids
The accepted DTD public IDs.
-
skippable_dtdids
protected static java.lang.String skippable_dtdids
The DTD public IDs we know we can skip.
-
skip_dtd
protected static java.lang.String skip_dtd
The DTD content to use when skipping
-
dtdProps
protected static java.util.Properties dtdProps
The ResourceBunder for the public and system ids
-
-
Constructor Detail
-
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.
-
-
Method Detail
-
createSVGDocument
public org.w3c.dom.svg.SVGDocument createSVGDocument(java.lang.String uri) throws java.io.IOExceptionDescription copied from interface:SVGDocumentFactoryCreates a SVG Document instance.- Specified by:
createSVGDocumentin interfaceSVGDocumentFactory- Parameters:
uri- The document URI.- Throws:
java.io.IOException- if an error occured while reading the document.
-
createSVGDocument
public org.w3c.dom.svg.SVGDocument createSVGDocument(java.lang.String uri, java.io.InputStream inp) throws java.io.IOExceptionCreates a SVG Document instance.- Specified by:
createSVGDocumentin interfaceSVGDocumentFactory- Parameters:
uri- The document URI.inp- The document input stream.- Throws:
java.io.IOException- if an error occured while reading the document.
-
createSVGDocument
public org.w3c.dom.svg.SVGDocument createSVGDocument(java.lang.String uri, java.io.Reader r) throws java.io.IOExceptionCreates a SVG Document instance.- Specified by:
createSVGDocumentin interfaceSVGDocumentFactory- Parameters:
uri- The document URI.r- The document reader.- Throws:
java.io.IOException- if an error occured while reading the document.
-
createDocument
public org.w3c.dom.Document createDocument(java.lang.String uri) throws java.io.IOExceptionCreates a SVG Document instance. This method supports gzipped sources.- Overrides:
createDocumentin classSAXDocumentFactory- Parameters:
uri- The document URI.- Throws:
java.io.IOException- if an error occured while reading the document.
-
createDocument
public org.w3c.dom.Document createDocument(java.lang.String uri, java.io.InputStream inp) throws java.io.IOExceptionCreates a SVG Document instance.- Overrides:
createDocumentin classSAXDocumentFactory- Parameters:
uri- The document URI.inp- The document input stream.- Throws:
java.io.IOException- if an error occured while reading the document.
-
createDocument
public org.w3c.dom.Document createDocument(java.lang.String uri, java.io.Reader r) throws java.io.IOExceptionCreates a SVG Document instance.- Overrides:
createDocumentin classSAXDocumentFactory- Parameters:
uri- The document URI.r- The document reader.- Throws:
java.io.IOException- if an error occured while reading the document.
-
createDocument
public org.w3c.dom.Document createDocument(java.lang.String ns, java.lang.String root, java.lang.String uri) throws java.io.IOExceptionCreates 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:
java.io.IOException- if an error occured while reading the document.
-
createDocument
public org.w3c.dom.Document createDocument(java.lang.String ns, java.lang.String root, java.lang.String uri, java.io.InputStream is) throws java.io.IOExceptionCreates 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:
java.io.IOException- if an error occured while reading the document.
-
createDocument
public org.w3c.dom.Document createDocument(java.lang.String ns, java.lang.String root, java.lang.String uri, java.io.Reader r) throws java.io.IOExceptionCreates 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:
java.io.IOException- if an error occured while reading the document.
-
getDOMImplementation
public org.w3c.dom.DOMImplementation getDOMImplementation(java.lang.String ver)
- Overrides:
getDOMImplementationin classSAXDocumentFactory
-
startDocument
public void startDocument() throws org.xml.sax.SAXExceptionSAX: ImplementsContentHandler.startDocument().- Specified by:
startDocumentin interfaceorg.xml.sax.ContentHandler- Overrides:
startDocumentin classSAXDocumentFactory- Throws:
org.xml.sax.SAXException
-
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws org.xml.sax.SAXExceptionSAX2: ImplementsEntityResolver.resolveEntity(String,String).- Specified by:
resolveEntityin interfaceorg.xml.sax.EntityResolver- Overrides:
resolveEntityin classorg.xml.sax.helpers.DefaultHandler- Throws:
org.xml.sax.SAXException
-
-