Home / tools / 4.1.1
Name Modified Size Downloads / Week Status
Parent folder
Totals: 4 Items   6.7 MB 6
dnb-conversion-env-4.1.1-xmab2utf8.jar 2013-02-15 448.6 kB 22 weekly downloads
dnb-conversion-env-4.1.1-mabxml2mab.jar 2013-02-15 3.1 MB 11 weekly downloads
dnb-conversion-env-4.1.1-mab2mabxml.jar 2013-02-15 3.1 MB 22 weekly downloads
README.txt 2013-02-15 2.7 kB 11 weekly downloads
Welcome to conversion tools of German National Library (Deutsche Nationalbibliothek). This Java Code Library offers two ways of using the implemented conversion mechanisms: 1. Command line tools (meant to be) 2. Generated Sources 3. Using the provided conversion context 1. Command Line There are three command line tools to choose from. - XMab2Utf8 - Mabxml2Mab - Mab2Mabxml To invoke any of these you have to type the following command (the part in brackets needs to be replaced appropriate): java -jar [jar file] -help This will print an overview of the mandatory/possible parameters to start any conversion. To start a conversion simple type this: java -jar [jar file] -i [input file] -o [output file] 2. Generated Sources To code against the sources generated by xmlbeans you first need to run the maven goal generate-sources. XmlBeans does generate source files and additional class files which have to be packaged with the project. If you chose eclipse as your IDE and the generated sources are not on the classpath run Maven -> Update Project Configuration from the projects context menu. 3. Conversion Context The conversion context can be found in de.dNb.conversion.context package. This is a facility to obtain a converter by passing appropriate parameters. The conversion context returns a converter specific to the passed parameters. The parameters that define a conversion pattern are: - input format - input encoding - output format - output encoding A converter can be placed in the conversion context by specifying these four parameters and can be retrieved by querying the conversion context and specifying this information again. The basic classes are in the package de.dNb.conversion and de.dNb.conversion.context. A converter is declared by the interface de.dNb.conversion.Converter. An abstract implementation derived from that interface has to be used by any implementing converter. Further there are two specialized child classes to server basic purposes: 1. CharstreamConverter 2. PipedConverter The first one is used to handle character streams. And the second wires two converters together by passing the output of the first as input to the second. The class hierarchy is this: - Converter | - GenericConverter | - CharstreamConverter - PipedConverter Any Converter implementation should be derived from GenericConverter (or CharstreamConverter if needed). The conversion context is currently initialized by an xml based configuration file. The according schema can be found under src/main/xsd/context.
Source: README.txt, updated 2013-02-15