org.apache.batik.dom.svg

Class SAXSVGDocumentFactory

public class SAXSVGDocumentFactory extends SAXDocumentFactory implements SVGDocumentFactory

This class contains methods for creating SVGDocument instances from an URI using SAX2.
Field Summary
protected static Stringdtdids
The accepted DTD public IDs.
protected static PropertiesdtdProps
The ResourceBunder for the public and system ids
protected static StringDTDIDS
The dtd public IDs resource bundle class name.
protected static StringHTTP_CHARSET
Constant for HTTP content type header charset field.
static StringKEY_PUBLIC_IDS
Key used for public identifiers
static StringKEY_SKIPPABLE_PUBLIC_IDS
Key used for public identifiers
static StringKEY_SKIP_DTD
Key used for the skippable DTD substitution
static StringKEY_SYSTEM_ID
Key used for system identifiers
static ObjectLOCK
protected static Stringskippable_dtdids
The DTD public IDs we know we can skip.
protected static Stringskip_dtd
The DTD content to use when skipping
Constructor Summary
SAXSVGDocumentFactory(String parser)
Creates a new SVGDocumentFactory object.
SAXSVGDocumentFactory(String parser, boolean dd)
Creates a new SVGDocumentFactory object.
Method Summary
DocumentcreateDocument(String uri)
Creates a SVG Document instance.
DocumentcreateDocument(String uri, InputStream inp)
Creates a SVG Document instance.
DocumentcreateDocument(String uri, Reader r)
Creates a SVG Document instance.
DocumentcreateDocument(String ns, String root, String uri)
Creates a Document instance.
DocumentcreateDocument(String ns, String root, String uri, InputStream is)
Creates a Document instance.
DocumentcreateDocument(String ns, String root, String uri, Reader r)
Creates a Document instance.
SVGDocumentcreateSVGDocument(String uri)
SVGDocumentcreateSVGDocument(String uri, InputStream inp)
Creates a SVG Document instance.
SVGDocumentcreateSVGDocument(String uri, Reader r)
Creates a SVG Document instance.
DOMImplementationgetDOMImplementation(String ver)
InputSourceresolveEntity(String publicId, String systemId)
SAX2: Implements {@link org.xml.sax.EntityResolver#resolveEntity(String,String)}.
voidstartDocument()
SAX: Implements {@link org.xml.sax.ContentHandler#startDocument()}.

Field Detail

dtdids

protected static String dtdids
The accepted DTD public IDs.

dtdProps

protected static Properties dtdProps
The ResourceBunder for the public and system ids

DTDIDS

protected static final String DTDIDS
The dtd public IDs resource bundle class name.

HTTP_CHARSET

protected static final String HTTP_CHARSET
Constant for HTTP content type header charset field.

KEY_PUBLIC_IDS

public static final String KEY_PUBLIC_IDS
Key used for public identifiers

KEY_SKIPPABLE_PUBLIC_IDS

public static final String KEY_SKIPPABLE_PUBLIC_IDS
Key used for public identifiers

KEY_SKIP_DTD

public static final String KEY_SKIP_DTD
Key used for the skippable DTD substitution

KEY_SYSTEM_ID

public static final String KEY_SYSTEM_ID
Key used for system identifiers

LOCK

public static final Object LOCK

skippable_dtdids

protected static String skippable_dtdids
The DTD public IDs we know we can skip.

skip_dtd

protected static String skip_dtd
The DTD content to use when skipping

Constructor Detail

SAXSVGDocumentFactory

public SAXSVGDocumentFactory(String parser)
Creates a new SVGDocumentFactory object.

Parameters: parser The SAX2 parser classname.

SAXSVGDocumentFactory

public SAXSVGDocumentFactory(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

createDocument

public Document createDocument(String uri)
Creates a SVG Document instance. This method supports gzipped sources.

Parameters: uri The document URI.

Throws: IOException if an error occured while reading the document.

createDocument

public Document createDocument(String uri, InputStream inp)
Creates a SVG Document instance.

Parameters: uri The document URI. inp The document input stream.

Throws: IOException if an error occured while reading the document.

createDocument

public Document createDocument(String uri, Reader r)
Creates a SVG Document instance.

Parameters: uri The document URI. r The document reader.

Throws: IOException if an error occured while reading the document.

createDocument

public Document createDocument(String ns, String root, String uri)
Creates a Document instance.

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)
Creates a Document instance.

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

public Document createDocument(String ns, String root, String uri, Reader r)
Creates a Document instance.

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.

createSVGDocument

public SVGDocument createSVGDocument(String uri)

createSVGDocument

public SVGDocument createSVGDocument(String uri, InputStream inp)
Creates a SVG Document instance.

Parameters: uri The document URI. inp The document input stream.

Throws: IOException if an error occured while reading the document.

createSVGDocument

public SVGDocument createSVGDocument(String uri, Reader r)
Creates a SVG Document instance.

Parameters: uri The document URI. r The document reader.

Throws: IOException if an error occured while reading the document.

getDOMImplementation

public DOMImplementation getDOMImplementation(String ver)

resolveEntity

public InputSource resolveEntity(String publicId, String systemId)
SAX2: Implements {@link org.xml.sax.EntityResolver#resolveEntity(String,String)}.

startDocument

public void startDocument()
SAX: Implements {@link org.xml.sax.ContentHandler#startDocument()}.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.