public class JDynTool
extends java.lang.Object
1) Command line invocation
See main(String[])
usage.
2) Programmatic invocation
Typical instructions sequence in your Java code:
run(String, String, Hashtable, boolean)
method,run(InputStream, String, Hashtable, boolean)
method.run(String, Hashtable, boolean)
method,
which will reuse the same template (previously loaded).JDynamiTe.toString()
method on the JDynamiTe returned object to get the parsing result
(i.e. the populated output document).
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
INPUT_TEMPLATE_PATH_VAR_TAG
Special variable tag, {__INPUT_TEMPLATE__}, that you can use in your
template, and which is automatically populated with the JDynamiTe input file path string.
|
Constructor and Description |
---|
JDynTool()
Creates a JDynTool object and its associated JDynamiTe object.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args) |
JDynamiTe |
run(java.io.InputStream inputStreamTemplateFile,
java.lang.String defaultRootXMLInputDoc,
java.util.Hashtable<java.lang.String,java.lang.String> keyValuesList,
boolean verbose)
Reads, analyses and processes the input template file and then produces
the output result.
|
JDynamiTe |
run(java.lang.String defaultRootXMLInputDoc,
java.util.Hashtable<java.lang.String,java.lang.String> keyValuesList,
boolean verbose)
Processes the input template file and then produces the output result.
|
JDynamiTe |
run(java.lang.String inputTemplateFile,
java.lang.String defaultRootXMLInputDoc,
java.util.Hashtable<java.lang.String,java.lang.String> keyValuesList,
boolean verbose)
Reads, analyses and processes the input template file and then produces
the output result.
|
public static final java.lang.String INPUT_TEMPLATE_PATH_VAR_TAG
public JDynTool()
run(String, String, Hashtable, boolean)
method.public JDynamiTe run(java.lang.String inputTemplateFile, java.lang.String defaultRootXMLInputDoc, java.util.Hashtable<java.lang.String,java.lang.String> keyValuesList, boolean verbose)
JDynamiTe.setVariable(String, String)
method for each key-value
pair.JDynamiTe.parseXMLDynElem()
method.inputTemplateFile
- Input template file path. This path will be used to call the
JDynamiTe.setInput(String)
method.defaultRootXMLInputDoc
- Default URI for first level XML dynamic block(s) which do not
have an URI in their definition in template file. This
optional parameter can be null.keyValuesList
- List of key-value pairs used to set values to the JDynamiTe
variables contained in the input template. Each key-value pair
will be passed to the
JDynamiTe.setVariable(String, String)
method.verbose
- If true, print on stderr output some information messages
during document processing.JDynamiTe.toString()
method on this returned
object to get the parsing result (i.e. the populated output
document).JDynamiTe.setInput(String)
,
JDynamiTe.setVariable(String, String)
public JDynamiTe run(java.io.InputStream inputStreamTemplateFile, java.lang.String defaultRootXMLInputDoc, java.util.Hashtable<java.lang.String,java.lang.String> keyValuesList, boolean verbose)
JDynamiTe.setVariable(String, String)
method for each key-value
pair.JDynamiTe.parseXMLDynElem()
method.inputStreamTemplateFile
- InputStream attached to the input template. This value will be used to call the
JDynamiTe.setInput(InputStream)
method.defaultRootXMLInputDoc
- Default URI for first level XML dynamic block(s) which do not
have an URI in their definition in template file. This
optional parameter can be null.keyValuesList
- List of key-value pairs used to set values to the JDynamiTe
variables contained in the input template. Each key-value pair
will be passed to the
JDynamiTe.setVariable(String, String)
method.verbose
- If true, print on stderr output some information messages
during document processing.JDynamiTe.toString()
method on this returned
object to get the parsing result (i.e. the populated output
document).JDynamiTe.setInput(String)
,
JDynamiTe.setVariable(String, String)
public JDynamiTe run(java.lang.String defaultRootXMLInputDoc, java.util.Hashtable<java.lang.String,java.lang.String> keyValuesList, boolean verbose)
run(String, String, Hashtable, boolean)
method, or run(InputStream, String, Hashtable, boolean)
method.run(String, String, Hashtable, boolean)
method, except that
there is no call to the JDynamiTe.setInput(String)
or
JDynamiTe.setInput(InputStream)
method.defaultRootXMLInputDoc
- Default URI for first level XML dynamic block(s) which do not
have an URI in their definition in template file. This
optional parameter can be null.keyValuesList
- keyValuesList List of key-value pairs used to set values to
the JDynamiTe variables contained in the input template. Each
key-value pair will be passed to the
JDynamiTe.setVariable(String, String)
method.verbose
- If true, print on stderr output some information messages
during document processing.run(String, String, Hashtable, boolean)
method.JDynamiTe.toString()
method on this returned
object to get the parsing result (i.e. the populated output
document).public static void main(java.lang.String[] args)
args
- Parameters for Command line invocation.
Usage:
JDynTool --template jdyn-template-file [--definition] [--keys] [--verbose] [--XMLdefaultRootDoc URI] [-D <key>=<value> ...]
--template jdyn-file
-t jdyn-file
Specify JDynamiTe input template file.
--definition
-d
Output on stderr the JDynamiTe input template file structure definition (as interpreted by JDynamiTe).
--keys
-k
Output on stderr the list of JDynamiTe Variable tags (keys) found in the JDynamiTe input template file.
--verbose
-v
Output on stderr some information messages during document processing.
--XMLdefaultRootDoc URI-path
-X URI-path
Default URI/path for first level XML dynamic blocks which do not have an URI-path in their definition in template file.
-D <key>=<value> ...
List of key-value pairs used to set values to the JDynamiTe variables contained in the input template}