com.xml_project.morganaxproc
Class XProcEngine

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

public class XProcEngine
extends 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 String COPYRIGHT
           
static 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 String JavaMime
           
static String MORGANA_NAMESPACE
          The namespace uri for nodes in MorganaXProc's namespace
static String PRODUCT_NAME
          The return value for p:system-property('p:product-name')
static 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 String VENDOR
          The return value for p:system-property('p:vendor')
static String VENDOR_URI
          The return value for p:system-property('p:vendor-uri')
static String XProcMime
           
static String XQueryMime
           
static String XsltMime
           
 
Method Summary
static nu.xom.Document build(com.xml_project.morganaxproc.xom.BuilderPool.SUPPORTED_BUILDERS type, Reader reader, String baseURI)
           
static com.xml_project.morganaxproc.xom.BuilderPool getBuilderPool()
           Returns the BuilderPool associated with this XProcEngine.
 XProcConfiguration getConfiguration()
           Returns the configuration currently used by this XProcEngine
static void main(String[] args)
          Invokes 's command line processor
static XProcEngine newXProc()
           Creates a new XProcEngine with a default configuration
static XProcEngine newXProc(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 String PRODUCT_NAME
The return value for p:system-property('p:product-name')

See Also:
Constant Field Values

PRODUCT_VERSION

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

See Also:
Constant Field Values

VENDOR

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

See Also:
Constant Field Values

VENDOR_URI

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

See Also:
Constant Field Values

COPYRIGHT

public static final 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 String MORGANA_NAMESPACE
The namespace uri for nodes in MorganaXProc's namespace

See Also:
Constant Field Values

EXPROC_EXTENSION_STEPS

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

See Also:
Constant Field Values

XProcMime

public static final String XProcMime
See Also:
Constant Field Values

XQueryMime

public static final String XQueryMime
See Also:
Constant Field Values

XsltMime

public static final String XsltMime
See Also:
Constant Field Values

JavaMime

public static final String JavaMime
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(String uri)
                                  throws IOException,
                                         XProcSecurityException,
                                         URISyntaxException

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:
IOException - if the uri is misspelled or the resources is not accessible.
XProcSecurityException - if there is an error in configuration's security settings.
URISyntaxException - if the is a syntax exception with any uri IN the configuration.

getBuilderPool

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

Returns the BuilderPool associated with this XProcEngine.

Returns:
the BuilderPool

build

public static nu.xom.Document build(com.xml_project.morganaxproc.xom.BuilderPool.SUPPORTED_BUILDERS type,
                                    Reader reader,
                                    String baseURI)
                             throws nu.xom.ValidityException,
                                    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
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(String[] args)

Invokes 's command line processor

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