com.xml_project.morganaxproc
Class XProcEngine

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

public class XProcEngine
extends java.lang.Object

This class is the main entry point for using MorganaXProc either from the command line or via api interface.

XProcEngine serves as a holder for the default configuration, which is used, every time a new compiler is generated.

To run a pipeline just do the following steps:


Field Summary
static java.lang.String COPYRIGHT
           
static java.lang.String EXPROC_EXTENSION_STEPS
          The namespace uri to import all implemented steps from exproc.org.
static float[] IMPLEMENTED_XPROC_VERSIONS
          The return value for p:system-property('p:version')
static java.lang.String JavaMime
           
static java.lang.String MORGANA_NAMESPACE
          The namespace uri for nodes in MorganaXProc's namespace
static java.lang.String PRODUCT_NAME
          The return value for p:system-property('p:product-name')
static java.lang.String PRODUCT_VERSION
          The return value for p:system-property('p:product-version')
static boolean PSVI_SUPPORTED
          The return value for p:system-property('p:psvi-supported')
static float TYPED_XPROC_VERSION
           
static java.lang.String VENDOR
          The return value for p:system-property('p:vendor')
static java.lang.String VENDOR_URI
          The return value for p:system-property('p:vendor-uri')
static int XProcCompilerErrorCode
           
static int XProcGeneralErrorCode
           
static int XProcInterfaceErrorCode
           
static java.lang.String XProcMime
           
static int XProcRuntimeErrorCode
           
static java.lang.String XQueryMime
           
static java.lang.String XsltMime
           
 
Method Summary
static nu.xom.Document build(com.xml_project.xom.builders.BuilderPool.SUPPORTED_BUILDERS type, java.io.Reader reader, java.lang.String baseURI)
           
static com.xml_project.xom.builders.BuilderPool getBuilderPool()
           Returns the BuilderPool associated with this XProcEngine.
 XProcConfiguration getConfiguration()
           Returns the configuration currently used by this XProcEngine
static void main(java.lang.String[] args)
          Invokes 's command line processor
static XProcEngine newXProc()
           Creates a new XProcEngine with a default configuration
static XProcEngine newXProc(java.lang.String uri)
           Creates a new XProcEngine with a configuration from the xml document at the uri
static XProcEngine newXProc(XProcConfiguration configuration)
           Creates a new XProcEngine using the given configuration
 XProcCompiler newXProcCompiler()
           Creates a new XProcCompiler using the configuration of the XProcEngine
 XProcCompiler newXProcCompiler(XProcConfiguration configuration)
           Create a new XProcCompiler using the given configuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPED_XPROC_VERSION

public static final float TYPED_XPROC_VERSION
See Also:
Constant Field Values

PRODUCT_NAME

public static final java.lang.String PRODUCT_NAME
The return value for p:system-property('p:product-name')

See Also:
Constant Field Values

PRODUCT_VERSION

public static final java.lang.String PRODUCT_VERSION
The return value for p:system-property('p:product-version')

See Also:
Constant Field Values

VENDOR

public static final java.lang.String VENDOR
The return value for p:system-property('p:vendor')

See Also:
Constant Field Values

VENDOR_URI

public static final java.lang.String VENDOR_URI
The return value for p:system-property('p:vendor-uri')

See Also:
Constant Field Values

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values

IMPLEMENTED_XPROC_VERSIONS

public static final float[] IMPLEMENTED_XPROC_VERSIONS
The return value for p:system-property('p:version')


PSVI_SUPPORTED

public static final boolean PSVI_SUPPORTED
The return value for p:system-property('p:psvi-supported')

See Also:
Constant Field Values

MORGANA_NAMESPACE

public static final java.lang.String MORGANA_NAMESPACE
The namespace uri for nodes in MorganaXProc's namespace

See Also:
Constant Field Values

EXPROC_EXTENSION_STEPS

public static final java.lang.String EXPROC_EXTENSION_STEPS
The namespace uri to import all implemented steps from exproc.org.

See Also:
Constant Field Values

XProcMime

public static final java.lang.String XProcMime
See Also:
Constant Field Values

XQueryMime

public static final java.lang.String XQueryMime
See Also:
Constant Field Values

XsltMime

public static final java.lang.String XsltMime
See Also:
Constant Field Values

JavaMime

public static final java.lang.String JavaMime
See Also:
Constant Field Values

XProcRuntimeErrorCode

public static final int XProcRuntimeErrorCode
See Also:
Constant Field Values

XProcCompilerErrorCode

public static final int XProcCompilerErrorCode
See Also:
Constant Field Values

XProcInterfaceErrorCode

public static final int XProcInterfaceErrorCode
See Also:
Constant Field Values

XProcGeneralErrorCode

public static final int XProcGeneralErrorCode
See Also:
Constant Field Values
Method Detail

newXProc

public static final XProcEngine newXProc()

Creates a new XProcEngine with a default configuration

Returns:
a new XProcEngine

newXProc

public static final XProcEngine newXProc(XProcConfiguration configuration)

Creates a new XProcEngine using the given configuration

Parameters:
configuration - the configuration to use. Ignored if null
Returns:
a new XProcEngine

newXProc

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

Creates a new XProcEngine with a configuration from the xml document at the uri

Parameters:
uri - the absolute uri to the configuration document. Ignored if null
Returns:
a new XProcEngine
Throws:
java.io.IOException - if the uri is misspelled or the resources is not accessible.
XProcSecurityException - if there is an error in configuration's security settings.
java.net.URISyntaxException - if the is a syntax exception with any uri IN the configuration.
XProcInterfaceException

getBuilderPool

public static final com.xml_project.xom.builders.BuilderPool getBuilderPool()

Returns the BuilderPool associated with this XProcEngine.

Returns:
the BuilderPool

build

public static nu.xom.Document build(com.xml_project.xom.builders.BuilderPool.SUPPORTED_BUILDERS type,
                                    java.io.Reader reader,
                                    java.lang.String baseURI)
                             throws nu.xom.ValidityException,
                                    java.io.IOException,
                                    nu.xom.ParsingException
Parameters:
type - the type of builder to use
reader - the reader
baseURI - the baseURI
Returns:
a document
Throws:
nu.xom.ValidityException - if the document is not valid
java.io.IOException - if there is an io error
nu.xom.ParsingException - if the document is not valid

getConfiguration

public XProcConfiguration getConfiguration()

Returns the configuration currently used by this XProcEngine

Returns:
the configuration

newXProcCompiler

public XProcCompiler newXProcCompiler(XProcConfiguration configuration)

Create a new XProcCompiler using the given configuration

Parameters:
configuration - the configuration for the new XProcCompiler
Returns:
a new XProcCompiler

newXProcCompiler

public XProcCompiler newXProcCompiler()

Creates a new XProcCompiler using the configuration of the XProcEngine

Returns:
a new XProcCompiler

main

public static void main(java.lang.String[] args)

Invokes 's command line processor

Parameters:
args - the command line parameters. For a detailed description of command line arguments see documentation.