XMT-O Reference Software

xmto2xmta.mapxmtamedia
Class XmtaMediaMapper

java.lang.Object
  |
  +--xmto2xmta.mapxmtamedia.XmtaMediaMapper

public class XmtaMediaMapper
extends java.lang.Object

Class to determine resolve the timing for the XMT-O tree.

History:


Field Summary
private  java.util.Hashtable convertIndexTable_
           
static boolean debug_
          Whether debug information is to be printed to the console.
private  java.util.Vector mpClasses_
           
private  java.lang.String mpClassesPackage_
           
private  java.lang.String[] mpClassNames_
           
private  java.util.Hashtable mpTable_
          Hash table containing the layout mapping classes which correspond to the XMT-O tree elements elements.
private  java.util.Vector treeClasses_
           
private  java.lang.String treeClassesPackage_
          Used to create Lists for class mappings
private  java.lang.String[] treeClassNames_
           
private  ConvertElement treeRoot_
           
private  Xmto2Xmta xmto2xmta_
          Input structures
private  java.util.Hashtable xmtoIdTable_
           
 
Constructor Summary
XmtaMediaMapper(Xmto2Xmta xmto2xmta, java.util.Hashtable xmtoIds, java.util.Hashtable convertIndexes, ConvertElement treeRoot)
          Create the Resolv Model.
 
Method Summary
private  void doMapping()
           
 void fireErrorEvent(int errorLevel, int errorId, java.lang.String message)
           
private  void initializeClassLists()
           
private  void mapClass(ConvertElement element)
           
static void setDebug(boolean debug)
          Enable debugging information to be printed to the console.
private  void visitElements(ConvertElement element)
          Call Validate on the convert element and traverse through the children.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

debug_

public static boolean debug_
Whether debug information is to be printed to the console. default is not have debug information printed (false).

xmto2xmta_

private Xmto2Xmta xmto2xmta_
Input structures

xmtoIdTable_

private java.util.Hashtable xmtoIdTable_

convertIndexTable_

private java.util.Hashtable convertIndexTable_

treeRoot_

private ConvertElement treeRoot_

mpTable_

private java.util.Hashtable mpTable_
Hash table containing the layout mapping classes which correspond to the XMT-O tree elements elements. The prime number 89 was chosen as the hash table initialize size because it was mentioned as a better starting hash size for optimization than the default 101. The layoutTable_ table is composed of (key, data) The key is the XMT-O tree element index. The data is the layout mapping class.

treeClassesPackage_

private java.lang.String treeClassesPackage_
Used to create Lists for class mappings

mpClassesPackage_

private java.lang.String mpClassesPackage_

treeClasses_

private java.util.Vector treeClasses_

mpClasses_

private java.util.Vector mpClasses_

treeClassNames_

private java.lang.String[] treeClassNames_

mpClassNames_

private java.lang.String[] mpClassNames_
Constructor Detail

XmtaMediaMapper

public XmtaMediaMapper(Xmto2Xmta xmto2xmta,
                       java.util.Hashtable xmtoIds,
                       java.util.Hashtable convertIndexes,
                       ConvertElement treeRoot)
Create the Resolv Model. Resolve as many timings as possible.
Parameters:
converter - converter with pointers to the convert tree, the xmto id hash table and the convert tree index hash table.
xmtoIds - table of the convert tree Elements. The hash index is the xmto id attribute. Not all convert tree elements are contained in this table, for example the elements which don't have xmto ids. Also this table may have elemnents removed if an element isn't supported or has an error which can't be converted.
convertIndexes - table of the convert tree Elements. The hash index is the unique index for each convert element (like an id, but not to be confused with the xmto id. This table may have elemnents removed if an element isn't supported or has an error which can't be converted.
treeRoot - root of the convert tree.
Method Detail

doMapping

private void doMapping()

fireErrorEvent

public void fireErrorEvent(int errorLevel,
                           int errorId,
                           java.lang.String message)

initializeClassLists

private void initializeClassLists()

mapClass

private void mapClass(ConvertElement element)

setDebug

public static void setDebug(boolean debug)
Enable debugging information to be printed to the console.
Parameters:
debug - sets debug information is printed

visitElements

private void visitElements(ConvertElement element)
Call Validate on the convert element and traverse through the children.

XMT-O Reference Software