|
jaxg 0.1dev | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xml.graphics.XGProcessorFactory
public abstract class XGProcessorFactory
An XGProcessorFactory can be used to instantiate new XGProcessor or
XGProcessorHandler instances.
| Constructor Summary | |
|---|---|
protected |
XGProcessorFactory()
|
| Method Summary | |
|---|---|
abstract java.lang.Object |
getAttribute(java.lang.String name)
Allows the user to retrieve specific attributes on the underlying implementation. |
abstract boolean |
getFeature(java.lang.String name)
Look up the value of a feature. |
static XGProcessorFactory |
newInstance()
Obtain a new instance of a XGProcessorFactory. |
static XGProcessorFactory |
newInstance(java.io.File packageFile)
Obtain an XGProcessorFactory by specifying a
JAXG deployment package. |
static XGProcessorFactory |
newInstance(java.lang.String packageFile)
Obtain an XGProcessorFactory by specifying a
JAXG deployment package. |
static XGProcessorFactory |
newInstance(java.net.URL packageFile)
Obtain an XGProcessorFactory by specifying an XML file
describing a JAXG deployment package that contains all the necessary
libraries. |
abstract XGProcessor |
newXGProcessor()
Creates a new XGProcessor instance. |
abstract XGProcessorHandler |
newXGProcessorHandler()
Create a new XGProcessorHandler instance. |
abstract void |
setAttribute(java.lang.String name,
java.lang.Object value)
Allows the user to set specific attributes on the underlying implementation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected XGProcessorFactory()
| Method Detail |
|---|
public abstract XGProcessor newXGProcessor()
throws XGException
XGException - if the XGProcessor cannot be instantiated
public abstract XGProcessorHandler newXGProcessorHandler()
throws XGException
XGException - if the XGProcessor cannot be instantiatedpublic abstract boolean getFeature(java.lang.String name)
Look up the value of a feature.
The feature name is any absolute URI.
name - The feature name, which is an absolute URI.
public abstract void setAttribute(java.lang.String name,
java.lang.Object value)
throws java.lang.IllegalArgumentException
name - The name of the attribute.value - The value of the attribute.
java.lang.IllegalArgumentException - thrown if the underlying
implementation doesn't recognize the attribute.
public abstract java.lang.Object getAttribute(java.lang.String name)
throws java.lang.IllegalArgumentException
name - The name of the attribute.
java.lang.IllegalArgumentException - thrown if the underlying
implementation doesn't recognize the attribute.public static XGProcessorFactory newInstance()
XGProcessorFactory.
This static method creates a new factory instance
This method uses the following ordered lookup procedure to determine
the XGProcessorFactory implementation class to
load:
org.xml.graphics.XGProcessorFactory system
property.
java.util.Properties
format and contains the fully qualified name of the
implementation class with the key being the system property defined
above.
META-INF/services/org.xml.graphics.XGProcessorFactory
in jars available to the runtime.
XGProcessorFactory instance.
XGProcessorFactory it can use the factory to configure
and obtain XGProcessor instances.
public static XGProcessorFactory newInstance(java.net.URL packageFile)
throws java.io.IOException
Obtain an XGProcessorFactory by specifying an XML file
describing a JAXG deployment package that contains all the necessary
libraries. The XGProcessorFactoryProxy is used to create a
ClassLoader for this package. Like this you can dynamically load and
use different JAXG processor implementations in the same VM.
This is what the package format looks like:
<package main-class="[classname of the factory implementation]"> <jar>[URL to a JAR file]</jar> <jar>...</jar> </package>
An example:
<package main-class="org.maerki.jaxg.fop.branch.FopBranchXGProcessorFactory"> <jar>lib/jaxg-ref-impl.jar</jar> <jar>lib/fop.jar</jar> <jar>lib/batik.jar</jar> <jar>lib/avalon-framework-4.2.0.jar</jar> </package>
Relative paths are allowed. The URL of the package file will serve as base URL. To use an implementation deployed on a webserver you would do this:
String location = "http://localhost/fowebservice/fop-branch/package.xml" XGProcessorFactory factory = XGProcessorFactoryProxy.newInstance(location); XGProcessor fop = factory.newXGProcessor(); [..]
packageFile - the deployment package file to use
java.io.IOException - if an error occurs while loading the package file
public static XGProcessorFactory newInstance(java.io.File packageFile)
throws java.io.IOException
Obtain an XGProcessorFactory by specifying a
JAXG deployment package.
packageFile - the deployment package file to use
java.io.FileNotFoundException - if an error occurs while loading the package file
java.io.IOExceptionnewInstance(java.net.URL)
public static XGProcessorFactory newInstance(java.lang.String packageFile)
throws java.io.IOException
Obtain an XGProcessorFactory by specifying a
JAXG deployment package.
packageFile - the deployment package file to use (URL string)
java.io.FileNotFoundException - if an error occurs while loading the package file
java.io.IOExceptionnewInstance(java.net.URL)
|
jaxg 0.1dev | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||