public class GauloisPipe extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
GAULOIS_DEBUG_DIR_PROPERTY
The property name to specify the debug output directory
|
static String |
INSTANCE_DEFAULT_NAME |
| Constructor and Description |
|---|
GauloisPipe(SaxonConfigurationFactory configurationFactory)
Constructs a new GauloisPipe.
|
GauloisPipe(SaxonConfigurationFactory configurationFactory,
List<String> inputs,
String outputDirectory,
List<String> templatePaths,
int nbThreads,
String instanceName)
The constructor with detail config.
|
| Modifier and Type | Method and Description |
|---|---|
protected URIResolver |
buildUriResolver(URIResolver defaultUriResolver)
Build the uri resolver.
|
void |
doPostCloseService(ExecutionContext context) |
void |
execute(Pipe pipe,
ParametrableFile input,
net.sf.saxon.s9api.MessageListener listener)
Execute the pipe for the specified input stream to the specified
serializer.
|
int |
getDocumentCacheSize()
Returns ...
|
List<Exception> |
getErrors() |
String |
getInstanceName() |
URIResolver |
getUriResolver() |
int |
getXsltCacheSize()
Returns...
|
void |
launch()
Launch the pipe.
|
static void |
main(String[] args)
Main entry point of saxon xslt pipe.
|
Config |
parseCommandLine(String[] args) |
void |
setConfig(Config config) |
void |
setInstanceName(String instanceName) |
void |
setMessageListenerclass(Class messageListenerclass)
Set the MessageListener class to use.
|
public static final String INSTANCE_DEFAULT_NAME
public static final transient String GAULOIS_DEBUG_DIR_PROPERTY
public GauloisPipe(SaxonConfigurationFactory configurationFactory)
configurationFactory - The configuration factory to usepublic GauloisPipe(SaxonConfigurationFactory configurationFactory, List<String> inputs, String outputDirectory, List<String> templatePaths, int nbThreads, String instanceName) throws InvalidSyntaxException
configurationFactory - The Saxon's Configuration factory to useinputs - the input filesoutputDirectory - the output directorytemplatePaths - the template pathsnbThreads - the nbThreadsinstanceName - The instance name to use in the logsInvalidSyntaxException - If config's syntax is incorrectpublic void launch()
throws InvalidSyntaxException,
FileNotFoundException,
net.sf.saxon.s9api.SaxonApiException,
URISyntaxException,
IOException
InvalidSyntaxException - If config's syntax is incorrectFileNotFoundException - If a file is not found...net.sf.saxon.s9api.SaxonApiException - If a SaxonApi problem occursURISyntaxException - Because MVN forces to have comments...IOExceptionpublic int getDocumentCacheSize()
public int getXsltCacheSize()
public void execute(Pipe pipe, ParametrableFile input, net.sf.saxon.s9api.MessageListener listener) throws net.sf.saxon.s9api.SaxonApiException, MalformedURLException, InvalidSyntaxException, URISyntaxException, FileNotFoundException, IOException
pipe - the pipe to runinput - the specified input streamlistener - the message listener to usenet.sf.saxon.s9api.SaxonApiException - when a problem occursMalformedURLException - When an URL is not correctly formedInvalidSyntaxException - When config file is invalidURISyntaxException - When URI is invalidFileNotFoundException - And when the file can not be found !IOExceptionprotected URIResolver buildUriResolver(URIResolver defaultUriResolver)
defaultUriResolver - Default Saxon's URIResolverpublic void doPostCloseService(ExecutionContext context)
public static void main(String[] args)
If --config option is given, it must be in first position, and all other options may be ignored. It is impossible to overwrite a config-file.xml option via command-line option, but it is possible to add XSL, input files and parameters
It is possible to define a pipe parameter for a single input file or a single XSL : just add parenthesis after the file/xsl URI, with comma-separated list of parameter=value
Command samples :
Files whom size is over multi-thread limit (default is 10Mb) are processed first, on a single-thread waiting queue. Then, files whom size is under limit are processed on the multi-threaded waiting queue.
Using config file gives much more control on Saxon-pipe on things taht can't be set via command-line :
args - the argumentspublic void setMessageListenerclass(Class messageListenerclass)
launch() call.messageListenerclass - The class of the listener to usepublic Config parseCommandLine(String[] args) throws InvalidSyntaxException
InvalidSyntaxExceptionpublic URIResolver getUriResolver()
public void setInstanceName(String instanceName)
public void setConfig(Config config)
public String getInstanceName()
Copyright © 2017. All rights reserved.