XMT-O Reference Software

xmto2xmta.tree
Class ConvertElement

java.lang.Object
  |
  +--xmto2xmta.tree.TreeElement
        |
        +--xmto2xmta.tree.ConvertElement
Direct Known Subclasses:
StructureElement, TimingElement, XmediaChildrenElement

public abstract class ConvertElement
extends TreeElement

Class which describes the various operations for converting from elements from XMT-O to XMT-A

History:


Field Summary
private  java.util.Hashtable convertIndexTable_
           
private static boolean debug_
          Whether debug information is to be printed to the console.
private  java.lang.Integer index_
          the unique index identifier for this element.
private  org.w3c.dom.Document xmtaDoc_
           
private  java.util.Hashtable xmtaIds_
           
private  java.util.Vector xmtaParNodes_
           
private  java.util.Vector xmtaParOds_
           
private  java.util.Vector xmtaParRoutes_
           
private  Xmto2Xmta xmto2Xmta_
           
private  java.util.ResourceBundle xmto2XmtaRes_
           
private  java.lang.String xmtoAttrId_
           
private  org.w3c.dom.Element xmtoElement_
           
private  java.util.Hashtable xmtoIds_
           
 
Fields inherited from class xmto2xmta.tree.TreeElement
children, parent_
 
Constructor Summary
ConvertElement(org.w3c.dom.Element xmtoElement, java.util.Hashtable xmtoIds, java.util.Hashtable xmtaIds, java.util.Hashtable convertIndexTable, org.w3c.dom.Document xmtaDoc, Xmto2Xmta xmto2Xmta)
          constructor.
 
Method Summary
 void addToParNode(org.w3c.dom.Node node)
          Add the node to the Par that contains the BIFS tree node changes.
 void addToParOd(org.w3c.dom.Node node)
          Add the node to the Par that contains the OD changes.
 void addToParRoutes(org.w3c.dom.Node node)
          Add the node to the Par that contains the Routes changes.
 boolean createChildren()
          Determine whether or not children of this DOMParser element should be parsed and create children ConvertElments or not.
 void fireErrorEvent(int errorLevel, int errorId, java.lang.String message)
           
 void fireErrorEvent(int errorLevel, int errorId, java.lang.String message, org.w3c.dom.Element xmtoElement)
           
 void fireErrorEvent(int errorLevel, int errorId, java.lang.String message, org.w3c.dom.Element xmtoElement, java.lang.String xmtoAttribute)
           
 java.util.Hashtable getConvertIndexTable()
           
 java.lang.Integer getIndex()
           
 org.w3c.dom.Document getXmtaDoc()
           
 java.util.Hashtable getXmtaIds()
           
 Xmto2Xmta getXmto2Xmta()
           
 java.lang.String getXmtoAttrId()
           
 org.w3c.dom.Element getXmtoElement()
           
 java.util.Hashtable getXmtoIds()
           
protected  boolean handleValidateSyntax(java.lang.String attributeName, java.lang.String attributeValue)
          Validate the syntax of the element.
 boolean insertIntoXmtaTree()
           
 void remove()
          This method removes the element from the tree.
static void setDebug(boolean debug)
          Enable debugging information to be printed to the console.
 boolean validateSyntax()
          Validate the syntax of the element.
 
Methods inherited from class xmto2xmta.tree.TreeElement
addChild, getChildren, getParent, removeChild, setParent, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

debug_

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

xmtoAttrId_

private java.lang.String xmtoAttrId_

index_

private java.lang.Integer index_
the unique index identifier for this element.

xmtoElement_

private org.w3c.dom.Element xmtoElement_

xmtoIds_

private java.util.Hashtable xmtoIds_

xmtaIds_

private java.util.Hashtable xmtaIds_

convertIndexTable_

private java.util.Hashtable convertIndexTable_

xmtaDoc_

private org.w3c.dom.Document xmtaDoc_

xmto2Xmta_

private Xmto2Xmta xmto2Xmta_

xmtaParNodes_

private java.util.Vector xmtaParNodes_

xmtaParOds_

private java.util.Vector xmtaParOds_

xmtaParRoutes_

private java.util.Vector xmtaParRoutes_

xmto2XmtaRes_

private java.util.ResourceBundle xmto2XmtaRes_
Constructor Detail

ConvertElement

public ConvertElement(org.w3c.dom.Element xmtoElement,
                      java.util.Hashtable xmtoIds,
                      java.util.Hashtable xmtaIds,
                      java.util.Hashtable convertIndexTable,
                      org.w3c.dom.Document xmtaDoc,
                      Xmto2Xmta xmto2Xmta)
constructor.
Parameters:
xmtoElement - XMT-O element for conversion.
xmtoIds - hashtable to contain XMT-O Conversion elements with the key of their XMT-O id.
xmtaIds - hashtable to contain XMT-A elements with the key of their XMT-A id.
xmtaDoc - DOM Document for the new XMT-A elements.
xmto2Xmta - Converter, used for firing error events.
Method Detail

addToParNode

public void addToParNode(org.w3c.dom.Node node)
Add the node to the Par that contains the BIFS tree node changes.

addToParOd

public void addToParOd(org.w3c.dom.Node node)
Add the node to the Par that contains the OD changes.

addToParRoutes

public void addToParRoutes(org.w3c.dom.Node node)
Add the node to the Par that contains the Routes changes.

createChildren

public boolean createChildren()
Determine whether or not children of this DOMParser element should be parsed and create children ConvertElments or not. Probably the only place this method is used to return false is in the xmtaMedia element where children of the object are specific to XMT-A and not XMT-O.

fireErrorEvent

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

fireErrorEvent

public void fireErrorEvent(int errorLevel,
                           int errorId,
                           java.lang.String message,
                           org.w3c.dom.Element xmtoElement)

fireErrorEvent

public void fireErrorEvent(int errorLevel,
                           int errorId,
                           java.lang.String message,
                           org.w3c.dom.Element xmtoElement,
                           java.lang.String xmtoAttribute)

getConvertIndexTable

public java.util.Hashtable getConvertIndexTable()
Returns:
xmtoIds hashtable to contain XMT-O Conversion elements with the key of their XMT-O id.

getIndex

public java.lang.Integer getIndex()
Returns:
the unique index identifier for this element.

getXmtaDoc

public org.w3c.dom.Document getXmtaDoc()
Returns:
xmtaDoc DOM Document for the new XMT-A elements.

getXmtaIds

public java.util.Hashtable getXmtaIds()
Returns:
xmtaIds hashtable to contain XMT-A elements with the key of their XMT-A id.

getXmto2Xmta

public Xmto2Xmta getXmto2Xmta()
Returns:
the converter, used for firing error events.

getXmtoAttrId

public java.lang.String getXmtoAttrId()
Returns:
XMT-O id attribute.

getXmtoElement

public org.w3c.dom.Element getXmtoElement()
Returns:
xmtoElement XMT-O element for conversion.

getXmtoIds

public java.util.Hashtable getXmtoIds()
Returns:
xmtoIds hashtable to contain XMT-O Conversion elements with the key of their XMT-O id.

handleValidateSyntax

protected boolean handleValidateSyntax(java.lang.String attributeName,
                                       java.lang.String attributeValue)
Validate the syntax of the element. This is to catch all syntax errors which the schema can not check for, and thus the DOM parser doesn't find any problems.

insertIntoXmtaTree

public boolean insertIntoXmtaTree()

remove

public void remove()
This method removes the element from the tree. In addition to removing the element from the tree it also removes the children and removes the element from the id and index tables.

setDebug

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

validateSyntax

public boolean validateSyntax()
Validate the syntax of the element. This is to catch all syntax errors which the schema can not check for, and thus the DOM parser doesn't find any problems.

XMT-O Reference Software