com.xml_project.morganaxproc
Class XProcConfiguration

java.lang.Object
  extended by com.xml_project.morganaxproc.XProcConfiguration

public class XProcConfiguration
extends java.lang.Object

This class holds the configuration settings used during compilation and running of an XProc pipeline. See the documentation for MorganaXProc for the meaning and the use of the different configuration settings.

To obtain a new XProcConfiguration use

In any case the values of the configuration settings in an XProcConfiguration object are the result of a cascading initialization. First the default settings as described in the documentation are attached to the settings in the XProcConfiguration. Second, XProcConfiguration tries to open a file with the name specified in DEFAULT_CONFIGURATION_FILE from the same location as MorganaXProc.jar. If such a file is found, the configuration settings are overwritten by the values found in the file. Third, if you use the newConfiguration methods with a parameter, the configuration settings are overwritten with the values found in the Element or the document designated by the uri.


Nested Class Summary
static class XProcConfiguration.LogStyle
          The possible values for logging.
 
Field Summary
static java.lang.String DEFAULT_CONFIGURATION_FILE
          The name of the default configuration file used.
static java.lang.String EXTENSION_FOLDER
          The name of the folder with MorganaXProc will look for extensions.
static java.util.HashMap<java.lang.String,java.lang.String> KNOWN_CONNECTORS
          This HashMap hold the java package names for the known connectors for xslt and xquery
 
Method Summary
 void addExtensionLibrary(java.lang.String javaName)
          This method tells MorganaXProc to use some piece of Java code to extend the build-in functionality.
 void addXPathFunctions(FunctionPackage aPackage)
          Adds a user written XPath extension functions from a FunctionPackage to the XPath context.
 boolean appendDebugInfoStream()
          Returns the current value for AppendDebugInfoStream
 XProcConfiguration copy()
           Creates a new XProcConfiguration object which is a verbatim copy of the existing.
 java.util.List<XPathFunction> getAllXPathFunctions()
          Returns a list of all currently known user written XPath extension functions coming either from addXPathFunction or addExtensionLibrary.
 java.net.URI getCompilerInfoStreamURI()
          Returns the CompileInfoStreamURI currently used.
 nu.xom.Document getConfigurationDocument()
           Returns the current configuration (incl. default settings) as document.
 java.lang.String getCurrentLanguage()
          Returns the current language used in XProc as defined for p:system-property('p:language').
 java.net.URI getDebugInfoStreamURI()
          Returns the DebugInfoStreamURI currently used.
static nu.xom.Document getDefaultConfigurationDocument()
           Returns the default (factory) configuration as document.
 float getDefaultXPathVersion()
           Returns the currently used default version of XPath.
 java.net.URI getDependencyMapURI()
          Returns the URI to write dependency map to.
 java.net.URI getDocumentBaseURI()
          Returns the documentBaseURI used.
 com.xml_project.morganaxproc.morganapkg.MorganaPKG getEXPathPackagingSystem()
          Returns the EXPathPackagingSystem associated with this configuration.
 java.lang.String[] getExtensionLibraries()
          Returns the Java class or package names of the extension libraries set for this XProcConfiguration.
 java.lang.String getExtensionWrapper(java.lang.String extension)
          Returns a string with the Java class name of the extension wrapper set for the given extension.
 XProcFilesystem getFileSystem()
          Returns the XProcFileSystem currently used.
 java.lang.Object getFOConnector()
          Return the FOPConnector used in this configuration.
 java.lang.String getHTMLParserClass()
          Returns the Java class name of the HTMLParserClass.
 java.lang.String getLogFileName()
          Returns the LogFileName used.
 java.net.URI getLogPathURI()
          Returns the LogPathURI used or null, if no uri can be found.
 XProcConfiguration.LogStyle getLogStyle()
          Returns the current LogStyle.
 java.io.PrintStream getMessageStream()
          Return the stream for system informations such as copyright notices.
 java.lang.String getMimeWrapper(java.lang.String mime)
          Returns a string with the Java class name of the mime wrapper set for the given mime.
 java.net.URI getPipelineFolderURI()
          Returns the pipelineFolderURI used.
 java.lang.String getPKGRepository()
          Returns the repository to use for EXPath.org's packaging system
 java.net.URI getPortDumperURI()
          Returns the value of the uri used for port dumping.
 XProcSecurityManager getSecurityManager()
          Returns the currently used XProcSecurityManager.
 boolean getSilentMode()
          Returns current setting for silent mode
 boolean getStrictExternalBinding()
          Returns true if strict external binding is used with this configuration, otherwise false.
 java.lang.String getXMLCatalogFiles()
          Returns the catalog files currently used for XML catalog.
 com.xml_project.morganaxproc.xmlcatalog.XMLCatalogInterface getXMLCatalogInterface()
          Returns the current used interface to resolve uris from an XMLCatalog system.
 java.lang.Object getXQueryConnector()
          Returns the XQueryConnector used in this configuration.
 java.lang.Object getXSLTConnector()
          Returns the XSLTConnector used in this configuration.
 FOConnector makeFOPConnection(java.io.PrintWriter infoWriter)
          Returns a new FOPConnector form the settings in this configuration.
 XQueryConnector makeXQueryConnector(java.io.PrintWriter infoWriter)
          Returns a new XQueryConnector from the settings of this configuration.
 XSLTConnector makeXSLTConnector(java.io.PrintWriter infoWriter)
          Returns a new XSLTConnector from the settings in this configuration.
static XProcConfiguration newConfiguration()
           Creates a new XProcConfiguration with the default settings and possibly overwritten by the values found in the default configuration file.
static XProcConfiguration newConfiguration(nu.xom.Element prefs)
           Creates a new XProcConfiguration with the default setting, the settings from the default configuration file (if found) and the settings from the xom element.
static XProcConfiguration newConfiguration(java.lang.String uri)
           Creates a new XProcConfiguration with the default settings, the settings from the default configuration file (if found) and the settings found in the xml document at the specified uri.
static XProcConfiguration newConfiguration(java.lang.String[] cliTokens)
           Creates a new XProcConfiguration with the default settings, the settings from the default configuration file (if found) and the settings in the cliSettings strings.
 void removeExtensionLibrary(java.lang.String javaName)
          Removes a piece of Java previously set with addExtensionLibrary from the list of used extensions.
 void removeXPathFunctions(FunctionPackage aPackage)
          Removes a user written XPath extension function in a FunctionPackage from the XPath context.
 void setCompilerInfoStreamURI(java.net.URI aCompilerStreamURI)
          Sets the CompileInfoStreamURI to be used.
 void setConfiguration(nu.xom.Element prefs)
           Overwrites the setting in the XProcConfiguration with the value found in the prefs element.
 void setConfiguration(java.lang.String uri)
           Overwrites the settings in the XProcConfiguration with the values found in the xml document at the given uri.
 void setConfiguration(java.lang.String[] cliSettings)
           Overwrites the setting in the XProcConfiguration with the values found in the cliSettings strings.
 void setDebugInfoStreamAppend(boolean append)
          Controls whether a new debugInfoStream is appended to an existing stream or a new is created.
 void setDebugInfoStreamURI(java.net.URI debugStream)
          Sets the debugInfoStreamURI to be used.
 void setDefaultXPathVersion(float f)
           Sets the default XPath version used by MorganaXProc.
 void setDependencyMapURI(java.net.URI uri)
          Sets the URI to write dependency map to.
 void setDocumentBaseURI(java.net.URI uri)
          Sets the documentBaseURI to be used.
 void setExtensionWrapper(java.lang.String extension, java.lang.String javaClass)
          Add a ExtensionWrapper for the given extension by the given Java class name.
 void setFileSystem(java.lang.String className)
          Sets the Java class name of the XProcFileSystem to be used.
 void setFileSystem(XProcFilesystem fileSystem)
          Sets the XProcFileSystem to be used.
 void setFOConnector(FOConnector newConnector)
          Sets the FO processor to use with this Configuration.
 void setFOConnector(java.lang.String newConnector)
          Sets the FO processor to use with this Configuration.
 void setHTMLParserClass(java.lang.String parserClass)
          Sets the Java class name of the HTMLParser class to be used.
 void setLogFileName(java.lang.String name)
          Set the LogFileName to be used.
 void setLogPathURI(java.net.URI uri)
          Sets the LogPathURI used.
 void setLogStyle(XProcConfiguration.LogStyle s)
          Sets the logStyle for this configuration.
 void setMessageStream(java.io.PrintStream stream)
          Sets the stream where system informations such as copyright are written to
 void setMimeWrapper(java.lang.String mime, java.lang.String javaClass)
          Adds a MimeWrapper for the given mime by the given Java class name.
 void setPipelineFolderURI(java.net.URI uri)
          Sets the pipelineFolderURI to be used.
 void setPKGRepository(java.lang.String value)
          Sets the path for the repository for EXPath.org's packaging system.
 void setPortDumperURI(java.net.URI uri)
          Sets the uri for the port dumper.
 void setSecurityManager(java.lang.String className)
          Sets the XProcSecurityManager to be used by giving its Java class name.
 void setSecurityManager(XProcSecurityManager newManager)
          Sets the XProcSecurityManager to be used.
 void setSilentMode(boolean mode)
          Switches silent mode (less outputs on console) on or off
 void setStrictExternalBinding(boolean v)
          Sets the value strict external binding
 void setXMLCatalogFiles(java.lang.String files)
          Sets the catalog files to be used for xml catalog (a ";" separated list).
 void setXQueryConnector(java.lang.String newConnector)
          Set the XQuery processor to use with this Configuration.
 void setXQueryConnector(XQueryConnector newConnector)
          Sets the XQueryConnector to use in this configuration.
 void setXSLTConnector(java.lang.String newConnector)
          Set the XSLT processor to use with this Configuration.
 void setXSLTConnector(XSLTConnector newConnector)
          Sets the XSLTConnector to use in this configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CONFIGURATION_FILE

public static final java.lang.String DEFAULT_CONFIGURATION_FILE
The name of the default configuration file used. If a file with this name exists in the same location as MorganaXProc.jar, the configuration settings are overwritten with the values found in this file.

See Also:
Constant Field Values

EXTENSION_FOLDER

public static final java.lang.String EXTENSION_FOLDER
The name of the folder with MorganaXProc will look for extensions. See the documentation for details.

See Also:
Constant Field Values

KNOWN_CONNECTORS

public static final java.util.HashMap<java.lang.String,java.lang.String> KNOWN_CONNECTORS
This HashMap hold the java package names for the known connectors for xslt and xquery

Method Detail

newConfiguration

public static final XProcConfiguration newConfiguration()

Creates a new XProcConfiguration with the default settings and possibly overwritten by the values found in the default configuration file.

Returns:
the created XProcConfiguration

newConfiguration

public static final XProcConfiguration newConfiguration(java.lang.String uri)
                                                 throws java.io.IOException,
                                                        XProcSecurityException,
                                                        java.net.URISyntaxException,
                                                        XProcInterfaceException

Creates a new XProcConfiguration with the default settings, the settings from the default configuration file (if found) and the settings found in the xml document at the specified uri.

Parameters:
uri - the uri of the xml document with the configuration or null to get default settings
Returns:
the created XProcConfiguration
Throws:
java.io.IOException - if there is ANY exception occurred in reading or parsing the configuration document.
XProcSecurityException - if any security setting cannot be obeyed.
java.net.URISyntaxException - if an URISyntaxException occurs with any uri settings IN the configuration
XProcInterfaceException

newConfiguration

public static final XProcConfiguration newConfiguration(java.lang.String[] cliTokens)
                                                 throws java.io.IOException,
                                                        XProcSecurityException,
                                                        XProcInterfaceException

Creates a new XProcConfiguration with the default settings, the settings from the default configuration file (if found) and the settings in the cliSettings strings. Only tokens starting with "-mox:" are taken into account. See documentation for details.

Parameters:
cliTokens - an array with configuration settings. (may be empty or null)
Returns:
the created XProcConfiguration
Throws:
java.io.IOException - if there is ANY exception occurred in reading or parsing the configuration document.
XProcSecurityException - if any security setting cannot be obeyed.
XProcInterfaceException - if any value is not allowed for a given option

newConfiguration

public static final XProcConfiguration newConfiguration(nu.xom.Element prefs)
                                                 throws java.io.IOException,
                                                        XProcSecurityException,
                                                        XProcInterfaceException

Creates a new XProcConfiguration with the default setting, the settings from the default configuration file (if found) and the settings from the xom element.

Parameters:
prefs - a xom element in MorganaXProc's namespace and the local name config
Returns:
the created XProcConfiguration
Throws:
java.io.IOException - if there is ANY exception occurred in reading or parsing the configuration document.
XProcSecurityException - if any security setting cannot be obeyed.
XProcInterfaceException - if any value is not allowed for a given option

copy

public XProcConfiguration copy()

Creates a new XProcConfiguration object which is a verbatim copy of the existing. Any change to either the new or the existing object will NOT affect the other one.

Returns:
a copy of this XProcConfiguration

getDefaultConfigurationDocument

public static final nu.xom.Document getDefaultConfigurationDocument()

Returns the default (factory) configuration as document. See documentation for details.

Returns:
the default configuration

setDefaultXPathVersion

public void setDefaultXPathVersion(float f)

Sets the default XPath version used by MorganaXProc. This is used, when no @xpath-version is found.

Parameters:
f - the version to use. Must be a supported version.

getDefaultXPathVersion

public float getDefaultXPathVersion()

Returns the currently used default version of XPath.

Returns:
the XPath version

getConfigurationDocument

public nu.xom.Document getConfigurationDocument()

Returns the current configuration (incl. default settings) as document.

Returns:
the current settings

setConfiguration

public void setConfiguration(java.lang.String uri)
                      throws java.io.IOException,
                             XProcSecurityException,
                             java.net.URISyntaxException,
                             XProcInterfaceException

Overwrites the settings in the XProcConfiguration with the values found in the xml document at the given uri.

Parameters:
uri - the uri of the document.
Throws:
java.io.IOException - if there is ANY exception occurred in reading or parsing the configuration document.
XProcSecurityException - if any security setting cannot be obeyed.
java.net.URISyntaxException - if there is a syntax exception with any uri used in the configuration.
XProcInterfaceException

setConfiguration

public void setConfiguration(java.lang.String[] cliSettings)
                      throws java.io.IOException,
                             java.net.URISyntaxException,
                             XProcSecurityException,
                             XProcInterfaceException

Overwrites the setting in the XProcConfiguration with the values found in the cliSettings strings. Only tokens starting with "-mox:" are taken into account. See documentation for details.

Parameters:
cliSettings - the settings (or null).
Throws:
java.io.IOException - if there is ANY exception occurred in reading or parsing the configuration document.
java.net.URISyntaxException - if there is a syntax exception with any uri used in the configuration.
XProcSecurityException - if any security setting cannot be obeyed.
XProcInterfaceException - if any value is not allowed for a given option

setConfiguration

public void setConfiguration(nu.xom.Element prefs)
                      throws java.io.IOException,
                             java.net.URISyntaxException,
                             XProcSecurityException,
                             XProcInterfaceException

Overwrites the setting in the XProcConfiguration with the value found in the prefs element.

Parameters:
prefs - an element with the name config in MorganaXProc's namespace.
Throws:
java.io.IOException - if there is ANY exception occurred in reading or parsing the configuration document.
java.net.URISyntaxException - if there is a syntax exception with any uri used in the configuration.
XProcSecurityException - if any security setting cannot be obeyed.
XProcInterfaceException - if any value is not allowed for a given option

addXPathFunctions

public void addXPathFunctions(FunctionPackage aPackage)
                       throws XProcInterfaceException
Adds a user written XPath extension functions from a FunctionPackage to the XPath context. The function will be visible in XProc (processor and step context), p:xquery and p:xslt (not all Connectors).

Parameters:
aPackage - the package to add (may be null).
Throws:
XProcInterfaceException - if any function is in any XProc namespace or functions namespace uri does not conform to package's namespace uri.

removeXPathFunctions

public void removeXPathFunctions(FunctionPackage aPackage)
Removes a user written XPath extension function in a FunctionPackage from the XPath context.

Parameters:
aPackage - the package to remove (may be null).

getAllXPathFunctions

public java.util.List<XPathFunction> getAllXPathFunctions()
                                                   throws java.io.IOException,
                                                          XPathException
Returns a list of all currently known user written XPath extension functions coming either from addXPathFunction or addExtensionLibrary.

Returns:
a list of the currently known user written XPath extension functions.
Throws:
XPathException
java.io.IOException

getXMLCatalogInterface

public com.xml_project.morganaxproc.xmlcatalog.XMLCatalogInterface getXMLCatalogInterface()
Returns the current used interface to resolve uris from an XMLCatalog system.

Returns:
the interface.

getEXPathPackagingSystem

public com.xml_project.morganaxproc.morganapkg.MorganaPKG getEXPathPackagingSystem()
                                                                            throws com.xml_project.morganaxproc.morganapkg.MorganaPKGException,
                                                                                   java.io.IOException,
                                                                                   XProcSecurityException
Returns the EXPathPackagingSystem associated with this configuration.

Returns:
the EXPathPKG or null if none is found.
Throws:
XProcSecurityException
java.io.IOException
com.xml_project.morganaxproc.morganapkg.MorganaPKGException

getExtensionLibraries

public java.lang.String[] getExtensionLibraries()
Returns the Java class or package names of the extension libraries set for this XProcConfiguration.

Returns:
an array with class/packages names. length may be 0, if no extension libraries were added.

makeXQueryConnector

public XQueryConnector makeXQueryConnector(java.io.PrintWriter infoWriter)
                                    throws XQueryConnectorException,
                                           XPathException,
                                           java.io.IOException
Returns a new XQueryConnector from the settings of this configuration. The current file system is used as ModuleURIResolver and all registered XPathFunctions are installed.

Parameters:
infoWriter - the PrintWriter to use or null.
Returns:
a new XQueryConnector
Throws:
XQueryConnectorException
XPathException
java.io.IOException

makeFOPConnection

public FOConnector makeFOPConnection(java.io.PrintWriter infoWriter)
                              throws com.xml_project.morganaxproc.core.XProcRuntimeException
Returns a new FOPConnector form the settings in this configuration.

Parameters:
infoWriter - the PrintWriter to use or null.
Returns:
a new FOPConnector
Throws:
com.xml_project.morganaxproc.core.XProcRuntimeException

makeXSLTConnector

public XSLTConnector makeXSLTConnector(java.io.PrintWriter infoWriter)
                                throws com.xml_project.morganaxproc.core.XProcRuntimeException,
                                       XPathException,
                                       java.io.IOException
Returns a new XSLTConnector from the settings in this configuration. The current file system is used as ImportURIResolver and all registered XPathFunctions are installed.

Parameters:
infoWriter - the PrintWriter to use or null.
Returns:
a new XSLTConnector
Throws:
com.xml_project.morganaxproc.core.XProcRuntimeException
XPathException
java.io.IOException

addExtensionLibrary

public void addExtensionLibrary(java.lang.String javaName)
This method tells MorganaXProc to use some piece of Java code to extend the build-in functionality. This can either be done by giving the name of a Java class which implements StepPackage (as a collection of XProc step implementations) or the name of a Java package name which will be looked up by MorganaXProc for implementations of BuildInStep (for XProc-steps) or for XPathFunction for additional XPath functions. If javaName is null, an empty string or "null" all previously loaded extensions are discarded.

Parameters:
javaName - a Java class name or a Java package name.

removeExtensionLibrary

public void removeExtensionLibrary(java.lang.String javaName)
Removes a piece of Java previously set with addExtensionLibrary from the list of used extensions. Ignored if packageName is null, an empty string or if the javaName was not added to the list.

Parameters:
javaName - a java package name.

setXSLTConnector

public void setXSLTConnector(java.lang.String newConnector)
Set the XSLT processor to use with this Configuration. If the string is a qualified you class name (it contains '.'), the XSLTConnector is set to the class with this name. If it does not contain a '.' the string value is supposed to be an XSLTConnector implementation registered in KNOWN_CONNECTORS. Ignored if newConnector is null, an empty string or "null".

Parameters:
newConnector - a qualified Java class name or the name of a registered connector.

setXSLTConnector

public void setXSLTConnector(XSLTConnector newConnector)
Sets the XSLTConnector to use in this configuration. Ignored if newConnector is null.

Parameters:
newConnector - the new connector to use.

setXQueryConnector

public void setXQueryConnector(java.lang.String newConnector)
Set the XQuery processor to use with this Configuration. If the string is a qualified class name (it contains '.'), the XQueryConnector is set to the class with this name. If it does not contain a '.' the string value is supposed to be an XQueryConnector implementation registered in KNOWN_CONNECTORS. Ignored if newConnector is null, an empty string or "null".

Parameters:
newConnector - a qualified Java class name or the name of a registered connector.

setXQueryConnector

public void setXQueryConnector(XQueryConnector newConnector)
Sets the XQueryConnector to use in this configuration. Ignored if newConnector is null.

Parameters:
newConnector - the new connector to use.

setFOConnector

public void setFOConnector(FOConnector newConnector)
Sets the FO processor to use with this Configuration.

Parameters:
newConnector - the FOConnector to use. Ignored if is null.

setFOConnector

public void setFOConnector(java.lang.String newConnector)
Sets the FO processor to use with this Configuration.

Parameters:
newConnector - qualified class name. Ignored if is "null", an empty string or null.

getCurrentLanguage

public java.lang.String getCurrentLanguage()
Returns the current language used in XProc as defined for p:system-property('p:language'). Currently 'en' is returned.

Returns:
the language currently used by XProc.

getXSLTConnector

public java.lang.Object getXSLTConnector()
Returns the XSLTConnector used in this configuration. Depending on the way the XSLTConnector was set, the result may either be a string with the Java class name or an instance of XSLTConnector.

Returns:
the XSLTConnector used in this configuration.

getXQueryConnector

public java.lang.Object getXQueryConnector()
Returns the XQueryConnector used in this configuration. Depending on the way the XQueryConnector was set, the result may either be a string with the Java class name or an instance of XQueryConnector.

Returns:
the XQueryConnector used in this configuration.

getFOConnector

public java.lang.Object getFOConnector()
Return the FOPConnector used in this configuration. Depending on the way the FOPConnector was set, the result may either be a string with the Java class nme or an instance of FOPConnector.

Returns:
the FOPConnector used in this configuration.

setSecurityManager

public void setSecurityManager(java.lang.String className)
                        throws XProcInterfaceException
Sets the XProcSecurityManager to be used by giving its Java class name. Ignored if className is null

Parameters:
className - the Java class name of a XProcSecurityManager.
Throws:
java.io.IOException - if any exception occures while loading the securityManager.
XProcInterfaceException

getSecurityManager

public XProcSecurityManager getSecurityManager()
Returns the currently used XProcSecurityManager.

Returns:
the securityManager.

setSecurityManager

public void setSecurityManager(XProcSecurityManager newManager)
Sets the XProcSecurityManager to be used. Ignored if newManager is null.

Parameters:
newManager - the XProcSecurityManager to be used.

getSilentMode

public boolean getSilentMode()
Returns current setting for silent mode

Returns:
the setting

setSilentMode

public void setSilentMode(boolean mode)
Switches silent mode (less outputs on console) on or off

Parameters:
mode - the new mode

getStrictExternalBinding

public boolean getStrictExternalBinding()
Returns true if strict external binding is used with this configuration, otherwise false.

Returns:
the setting for strict external binding

setStrictExternalBinding

public void setStrictExternalBinding(boolean v)
Sets the value strict external binding

Parameters:
v - the new value.

setPKGRepository

public void setPKGRepository(java.lang.String value)
Sets the path for the repository for EXPath.org's packaging system. Valid values are "default", "none" or an uri. The XProcSecurityManager associated with this XProcConfiguration is augmented, so read access to the resources in the repository is granted. Please mind that this only holds for repository resources in MorganaXProc. For a pipeline's access to the resources via "public import URI" you have to grant access by adding an appropriate rule to the used XProcSecurityManager.

Parameters:
value -

getPKGRepository

public java.lang.String getPKGRepository()
Returns the repository to use for EXPath.org's packaging system

Returns:
the repository to use

setPortDumperURI

public void setPortDumperURI(java.net.URI uri)
Sets the uri for the port dumper. If null, no port dumping will occur.

Parameters:
uri - a uri or null.

getPortDumperURI

public java.net.URI getPortDumperURI()
Returns the value of the uri used for port dumping.

Returns:
a uri or null, if no port dumping will occur.

getLogStyle

public XProcConfiguration.LogStyle getLogStyle()
Returns the current LogStyle.

Returns:
the LogStyle used.

setLogStyle

public void setLogStyle(XProcConfiguration.LogStyle s)
Sets the logStyle for this configuration.

Parameters:
s - the new LogStyle.

setLogPathURI

public void setLogPathURI(java.net.URI uri)
Sets the LogPathURI used.

Parameters:
uri - the uri to use. If value is "null" the user home folder will be used for port dumping.

getLogPathURI

public java.net.URI getLogPathURI()
Returns the LogPathURI used or null, if no uri can be found.

Returns:
the LogPathURI used.

getLogFileName

public java.lang.String getLogFileName()
Returns the LogFileName used.

Returns:
the LogFileName.

setLogFileName

public void setLogFileName(java.lang.String name)
Set the LogFileName to be used. Is ignored if name is null or an empty string.

Parameters:
name - theLogFileName to be used.

getFileSystem

public XProcFilesystem getFileSystem()
Returns the XProcFileSystem currently used.

Returns:
the XProcFileSystem currently used.

setPipelineFolderURI

public void setPipelineFolderURI(java.net.URI uri)
Sets the pipelineFolderURI to be used.

Parameters:
uri - an uri or null, if no pipelineFolderURI should be used.

getPipelineFolderURI

public java.net.URI getPipelineFolderURI()
Returns the pipelineFolderURI used.

Returns:
an uri or null, if no pipelineFolderURI is used.

setDocumentBaseURI

public void setDocumentBaseURI(java.net.URI uri)
Sets the documentBaseURI to be used.

Parameters:
uri - an uri or null, if no documentBaseURI should be used.

setDependencyMapURI

public void setDependencyMapURI(java.net.URI uri)
Sets the URI to write dependency map to.

Parameters:
uri - the uri or null, if no dependency map should be created.

getDocumentBaseURI

public java.net.URI getDocumentBaseURI()
Returns the documentBaseURI used.

Returns:
an uri or null, if no documentBaseURI is used.

setDebugInfoStreamAppend

public void setDebugInfoStreamAppend(boolean append)
Controls whether a new debugInfoStream is appended to an existing stream or a new is created.

Parameters:
append - true, if a new stream should be appended to the existing stream.

setDebugInfoStreamURI

public void setDebugInfoStreamURI(java.net.URI debugStream)
Sets the debugInfoStreamURI to be used.

Parameters:
debugStream - an uri or null, if no debugInfoStream should be used.

setXMLCatalogFiles

public void setXMLCatalogFiles(java.lang.String files)
Sets the catalog files to be used for xml catalog (a ";" separated list).

Parameters:
files - the catalog files to be used or "", if no catalog should be used.

setCompilerInfoStreamURI

public void setCompilerInfoStreamURI(java.net.URI aCompilerStreamURI)
Sets the CompileInfoStreamURI to be used.

Parameters:
aCompilerStreamURI - an uri or null, if no compilerInfoStream should be used.

getDebugInfoStreamURI

public java.net.URI getDebugInfoStreamURI()
Returns the DebugInfoStreamURI currently used.

Returns:
the uri or null, if no DebugInfoStream is used.

appendDebugInfoStream

public boolean appendDebugInfoStream()
Returns the current value for AppendDebugInfoStream

Returns:
the current value for AppendDebugInfoStream

getXMLCatalogFiles

public java.lang.String getXMLCatalogFiles()
Returns the catalog files currently used for XML catalog.

Returns:
a string with a ";" separated list of catalog files or null.

getCompilerInfoStreamURI

public java.net.URI getCompilerInfoStreamURI()
Returns the CompileInfoStreamURI currently used.

Returns:
the uri or null, if no CompilerInfoStream is used.

getDependencyMapURI

public java.net.URI getDependencyMapURI()
Returns the URI to write dependency map to.

Returns:
the uri or null, if no dependency map should be created.

setFileSystem

public void setFileSystem(XProcFilesystem fileSystem)
Sets the XProcFileSystem to be used. Ignored if null.

Parameters:
fileSystem - the XProcFileSystem to be used.

setFileSystem

public void setFileSystem(java.lang.String className)
                   throws java.io.IOException
Sets the Java class name of the XProcFileSystem to be used. Ignored if null or an empty string.

Parameters:
className - the class name of the XProcFileSystem to be used.
Throws:
java.io.IOException - if any error occured while loading the class with the given name.

setHTMLParserClass

public void setHTMLParserClass(java.lang.String parserClass)
Sets the Java class name of the HTMLParser class to be used.

Parameters:
parserClass - a Java class name or null, if no parser should be used.

setMimeWrapper

public void setMimeWrapper(java.lang.String mime,
                           java.lang.String javaClass)
Adds a MimeWrapper for the given mime by the given Java class name. Ignored if mime is null or an empty string or if javaClass is null or an empty string. Any existing association between this mime and a java class is overwritten. If javaClass.equals("null"), any existing wrapper for this mime is removed. If mime.equals("null") and javaClass.equals("null") all previously set MimeWrappers are discarded.

Parameters:
mime - a string with a mime.
javaClass - a string with a Java class name.

getMimeWrapper

public java.lang.String getMimeWrapper(java.lang.String mime)
Returns a string with the Java class name of the mime wrapper set for the given mime.

Parameters:
mime - the mime for which the MimeWrapper should be returned.
Returns:
a Java class name or null, if no wrapper is set for this mime.

setExtensionWrapper

public void setExtensionWrapper(java.lang.String extension,
                                java.lang.String javaClass)
Add a ExtensionWrapper for the given extension by the given Java class name. Ignored if extension is null or an empty string or if javaClass is null or an empty string. Any existing associating between this extension and a java class is overwritten. If javaClass.equals("null"), any existing wrapper for this extension is removed. If extension.equals("null") and javaClass.equals("null") all previously set MimeWrappers are discarded.

Parameters:
extension - a string with an extension.
javaClass - a string with a Java class name.

getHTMLParserClass

public java.lang.String getHTMLParserClass()
Returns the Java class name of the HTMLParserClass.

Returns:
a Java class name or null, if no HTMLParserClass is used.

getExtensionWrapper

public java.lang.String getExtensionWrapper(java.lang.String extension)
Returns a string with the Java class name of the extension wrapper set for the given extension.

Parameters:
extension - the extension for which the ExtensionWrapper should be returned.
Returns:
a Java class name or null, if no wrapper is set for this extension.

getMessageStream

public java.io.PrintStream getMessageStream()
Return the stream for system informations such as copyright notices.

Returns:
the stream

setMessageStream

public void setMessageStream(java.io.PrintStream stream)
Sets the stream where system informations such as copyright are written to

Parameters:
stream - the stream (null is ignored!)