The Java code migration leverages on the JDT feature from Eclipse as the basis. In Translate Engine, each Java file is parsed as a JDT tree. There are many types of tree nodes such as Package Declaration, Import Declaration, Method Invocation and so on. Each type of node is related with a certain type of Translator.
In the dse.ini migration, XPath technology is used to express the migration rules. A btt.xml template is provided. XPath is used to identify the item in dse.ini and btt.xml. Use the rule XPath(dse.ini) -> XPath(btt.xml) to migrate the configured items from dse.ini to btt.xml.
The XML file is parsed as a DOM tree into runtime. A default Translator is provided to replace the package names in XML tags.
The JSP file migration leverages on the Eclipse WST feature. As the JSP file is being translated, each file content will be parsed as a JSP DOM tree. There are several types of content nodes, such as Java code script, html markup script, and JSP directive. Each node translation is based on the translation rule defined in jspRule.xml.
In each type of the migration, default Translators are provided. If the default Translator meets your migration requirement, you can directly add rules to the default Translator. Otherwise, you can implement your own Translators and write your own rules.
With the highly scalable architecture, you can easily extend the rule-based Migration Tool to fulfil your specific requirements. It is a generic migration toolkit, and it can be used in most application migration cases other than BTT.