Class Tasks

java.lang.Object
eu.bandm.tools.d2d2.base.Tasks

public class Tasks extends Object
Collection of static methods which realize the different d2d conversion tasks. These are the currently supported PIPELINES (implemented mostly here and in partly in Main):
 textfile ---> udom ----------------> sax ----> xml textfile         (1)
                                           \
                                             -> tdom                 (2)

 textfile ---> udom --sax--[xslt]---> sax --> textfile (xml/no-xml)  (3) 
                             ^              \
                             |                -> tdom                (4)
                             \________________________________
                                                              \
                                                       -->Txsl Code (=own implementation,
                                                     /              ( formerly: JAXP translet
 modulereg ---> xslt-d2d-source                     / 
                xslt-d2d-source--------> udom --> sax --> xml xslt source (5)
                   \         (text2xml parser)            
                    \        (  in xslt mode )                           
                     \----------------------------------> d2d xslt source (5)

 (MODULE.{ddf,umod,dtd, etc.}
    \
     V
    modulereg ------------------------------------------> MODULE.dtd       (6)
          \ 
           \ -------------------------------------------> FILENAME.ddf     (7)
            \ 
             \ -------------------> d2d_documentation_[MODULE]_user_[LANG] (8) 
              \ 
               \ ---------------------------------------> FILENAME.html    (9)
                \ 
                 \ -------------------------------------> FILENAME.xml     (10)

 
 MODULE.dtd --------------------------------------------> MODULE.ddf       (11)
 
Legend:

(1) Main use case: produce an XML output file from a d2d input text file in "one-to-one" discipline.
Initiated from commandline by "Main --task text2xml".
Initiated programmatically by calling #text2xml(MessageReceiver, ModuleRegistry, Text2Udom.ErrorStrategy, File, String, ContentHandler, File)

(2) Main use case: produce a TDOM model from a d2d text in "one-to-one" discipline.
Initiated programmatically by calling (File, ModuleRegistry, Class, TypedDTD, MessageReceiver, Text2Udom.ErrorStrategy, int)

(3) and (4): Derived use case: produce output file (xml/non-xml) or tdom model by first translating a d2d text file to xml, as in (1), and then applying xslt transformations into specified target formats. Not longer implemented here, use Batch instead.

(5) Auxiliary use case: write out the xslt transformation for a given module and a given target format.
Initiated from commandline by "Main --task ddf2xslt"; implemented in ddf2xslt(eu.bandm.tools.message.MessageReceiver<eu.bandm.tools.message.SimpleMessage<eu.bandm.tools.util.xml.XMLDocumentIdentifier>>, int, eu.bandm.tools.d2d2.base.ModuleRegistry, java.lang.String, java.lang.String, java.lang.String, java.lang.String, eu.bandm.tools.d2d2.base.Text2Udom.ErrorStrategy, java.lang.String, int). (6) Auxiliary use case: translate the ddf definition of a given module into a DTD.
Initiated from commandline by "Main --task ddf2dtd"; implemented in Def2Dtd.convert(MessageReceiver, Module, XMLDocumentIdentifier, boolean, String).

(7) Auxiliary use case: pretty-print the ddf definition of a given module.
Initiated from commandline by "Main --task ddf2format"; implemented by the format rules in the umod definition.

(8) Auxiliary use case: generate HTML formatted user documentation for a given module in a given state (raw or instantiated) in a given human language.
Initiated from commandline by "Main --task ddf2doc"; implemented in Def2Doc3.

(9) Auxiliary use case: translate the ddf definition of a given module into a html formular with labels and input fields.
Initiated from commandline by "Main --task ddf2htmlform"; (currently not supported, old implementation in OLD ../../d2d/base/Def2HtmlForm.)

(10) Auxiliary use case: write out a given module in umod tsoap xml format.
Initiated from commandline by "Main --task ddf2tsoap";

(11) Auxiliary use case: write out the ddf equivalent of a dtd
Initiated from commandline by "Main --task dtd2ddf";
Implemented in Dtd2Def, which is also called by Modulereg, when a dtd is used as ddf. But the use case is slightly different from (7), since more errors must be signalled explicitly and more diagnosis is required.