SourceForge.net Logo
aXSL API 0.2

org.axsl.graphic
Interface GraphicServer


public interface GraphicServer

Interface for creating Graphic objects.


Method Summary
 Graphic makeGraphic(java.lang.String href, java.net.URL[] baseURLs, boolean cachingThisGraphic)
          Factory method to find or create a Graphic instance.
 org.w3c.dom.svg.SVGDocument makeSvgDocument()
          Factory method to create a new, empty DOM implementation for an SVG document.
 SvgGraphic makeSvgGraphic(org.w3c.dom.svg.SVGDocument svgDocument)
          Factory method to find or create an SvgGraphic instance from an already-parsed SVGDocument.
 void writeSvgDocument(org.w3c.dom.svg.SVGDocument svgDocument, java.io.OutputStream outputStream)
          Writes an SVG document to an output stream, perhaps with pretty-printing.
 

Method Detail

makeGraphic

Graphic makeGraphic(java.lang.String href,
                    java.net.URL[] baseURLs,
                    boolean cachingThisGraphic)
                    throws GraphicException
Factory method to find or create a Graphic instance.

Parameters:
href - The graphic URL as a String. Note that this String should not be enclosed in "url()", but should be just a valid URI reference as defined in RFC2396.
baseURLs - An array of URLs containing, in order, the base locations that should be tried when resolving an href that indicates a relative path. Element 0 will be tried first, then element 1, etc.
cachingThisGraphic - Set to true if a pointer to this instance should be kept for later reuse. Set to false if you don't want to spend the memory for this. (Note: This is done in the makeGraphic method so that this decision can conceivably be made separately for each graphic.)
Returns:
The Graphic instance.
Throws:
GraphicException - For errors during construction.

makeSvgGraphic

SvgGraphic makeSvgGraphic(org.w3c.dom.svg.SVGDocument svgDocument)
                          throws GraphicException
Factory method to find or create an SvgGraphic instance from an already-parsed SVGDocument.

Parameters:
svgDocument - The (DOM) SVG Document from which an SVGGraphic should be constructed.
Returns:
The newly-created SvgGraphic instance.
Throws:
GraphicException - For errors during construction.

makeSvgDocument

org.w3c.dom.svg.SVGDocument makeSvgDocument()
                                            throws GraphicException
Factory method to create a new, empty DOM implementation for an SVG document.

Returns:
The newly created DOM implementation for an SVG document.
Throws:
GraphicException - For errors during SVGDocument creation.

writeSvgDocument

void writeSvgDocument(org.w3c.dom.svg.SVGDocument svgDocument,
                      java.io.OutputStream outputStream)
                      throws java.io.IOException
Writes an SVG document to an output stream, perhaps with pretty-printing.

Parameters:
svgDocument - The SVG Document to be written.
outputStream - The output stream to which the document should be written.
Throws:
java.io.IOException - For errors while writing the document to the stream.

SourceForge.net Logo
aXSL API 0.2

This documentation was created August 8 2007 by The aXSL Group and may be freely copied. See license for details.