XMT-O Reference Software

xmto2xmta.tree
Class TimingElement

java.lang.Object
  |
  +--xmto2xmta.tree.TreeElement
        |
        +--xmto2xmta.tree.ConvertElement
              |
              +--xmto2xmta.tree.TimingElement
Direct Known Subclasses:
AnimationBaseElement, AugmentationElement, GroupElement, MediaElement, TimeContainerElement, use, xmtaMedia

public abstract class TimingElement
extends ConvertElement

Class to group together the various type of timing elements.

History:


Field Summary
private static boolean debug_
          Whether debug information is to be printed to the console.
private  java.util.ResourceBundle timingElementRes_
           
private  java.util.ResourceBundle xmto2XmtaRes_
           
private  TimingAttribute xmtoAttrBegin_
           
private  TimingAttribute xmtoAttrDur_
           
private  TimingAttribute xmtoAttrEnd_
           
private  java.lang.String xmtoAttrEndsync_
           
private  java.lang.String xmtoAttrFill_
           
private  java.lang.String xmtoAttrFillDefault_
           
private  TimingAttribute xmtoAttrMax_
           
private  TimingAttribute xmtoAttrMin_
           
private  java.lang.String xmtoAttrRepeatCount_
           
private  TimingAttribute xmtoAttrRepeatDur_
           
private  java.lang.String xmtoAttrRestart_
           
private  java.lang.String xmtoAttrRestartDefault_
           
 
Fields inherited from class xmto2xmta.tree.ConvertElement
convertIndexTable_, index_, xmtaDoc_, xmtaIds_, xmtaParNodes_, xmtaParOds_, xmtaParRoutes_, xmto2Xmta_, xmtoAttrId_, xmtoElement_, xmtoIds_
 
Fields inherited from class xmto2xmta.tree.TreeElement
children, parent_
 
Constructor Summary
TimingElement(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
 TimingAttribute getXmtoAttrBegin()
           
 TimingAttribute getXmtoAttrDur()
           
 TimingAttribute getXmtoAttrEnd()
           
 java.lang.String getXmtoAttrEndsync()
           
 java.lang.String getXmtoAttrFill()
           
 java.lang.String getXmtoAttrFillDefault()
           
 TimingAttribute getXmtoAttrMax()
           
 TimingAttribute getXmtoAttrMin()
           
 java.lang.String getXmtoAttrRepeatCount()
           
 TimingAttribute getXmtoAttrRepeatDur()
           
 java.lang.String getXmtoAttrRepeatRestart()
           
 java.lang.String getXmtoAttrRepeatRestartDefault()
           
protected  boolean handleValidateSyntax(java.lang.String attributeName, java.lang.String attributeValue)
          Handle the attribute by checking its syntax.
static void setDebug(boolean debug)
          Enable debugging information to be printed to the console.
private  boolean validateDefsObjectTimingSyntax()
          Validate the syntack of the defs object found in the desf tree.
 boolean validateSyntax()
          Validate the syntax of the element.
 
Methods inherited from class xmto2xmta.tree.ConvertElement
addToParNode, addToParOd, addToParRoutes, createChildren, fireErrorEvent, fireErrorEvent, fireErrorEvent, getConvertIndexTable, getIndex, getXmtaDoc, getXmtaIds, getXmto2Xmta, getXmtoAttrId, getXmtoElement, getXmtoIds, insertIntoXmtaTree, remove
 
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).

xmtoAttrBegin_

private TimingAttribute xmtoAttrBegin_

xmtoAttrDur_

private TimingAttribute xmtoAttrDur_

xmtoAttrEnd_

private TimingAttribute xmtoAttrEnd_

xmtoAttrMin_

private TimingAttribute xmtoAttrMin_

xmtoAttrMax_

private TimingAttribute xmtoAttrMax_

xmtoAttrRepeatDur_

private TimingAttribute xmtoAttrRepeatDur_

xmtoAttrFill_

private java.lang.String xmtoAttrFill_

xmtoAttrFillDefault_

private java.lang.String xmtoAttrFillDefault_

xmtoAttrRestart_

private java.lang.String xmtoAttrRestart_

xmtoAttrRestartDefault_

private java.lang.String xmtoAttrRestartDefault_

xmtoAttrEndsync_

private java.lang.String xmtoAttrEndsync_

xmtoAttrRepeatCount_

private java.lang.String xmtoAttrRepeatCount_

timingElementRes_

private java.util.ResourceBundle timingElementRes_

xmto2XmtaRes_

private java.util.ResourceBundle xmto2XmtaRes_
Constructor Detail

TimingElement

public TimingElement(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

getXmtoAttrBegin

public TimingAttribute getXmtoAttrBegin()

getXmtoAttrDur

public TimingAttribute getXmtoAttrDur()

getXmtoAttrEnd

public TimingAttribute getXmtoAttrEnd()

getXmtoAttrEndsync

public java.lang.String getXmtoAttrEndsync()

getXmtoAttrFill

public java.lang.String getXmtoAttrFill()

getXmtoAttrFillDefault

public java.lang.String getXmtoAttrFillDefault()

getXmtoAttrMax

public TimingAttribute getXmtoAttrMax()

getXmtoAttrMin

public TimingAttribute getXmtoAttrMin()

getXmtoAttrRepeatCount

public java.lang.String getXmtoAttrRepeatCount()

getXmtoAttrRepeatDur

public TimingAttribute getXmtoAttrRepeatDur()

getXmtoAttrRepeatRestart

public java.lang.String getXmtoAttrRepeatRestart()

getXmtoAttrRepeatRestartDefault

public java.lang.String getXmtoAttrRepeatRestartDefault()

handleValidateSyntax

protected boolean handleValidateSyntax(java.lang.String attributeName,
                                       java.lang.String attributeValue)
Handle the attribute by checking its syntax. This is to catch all syntax errors which the schema can not check for, and thus the DOM parser doesn't find any problems. Call the parent handler to see if it can handle the attribute or not.
Overrides:
handleValidateSyntax in class ConvertElement
Parameters:
attributeName - node name of attribute.
attributeValue - node value of attribute.
Returns:
whether this attribute is handled or not.

setDebug

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

validateDefsObjectTimingSyntax

private boolean validateDefsObjectTimingSyntax()
Validate the syntack of the defs object found in the desf tree. Defs object can't have timing attributes. If so then this is an error, remove them and give a message to the user.

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. Mainly check the begin, dur and end values to see they are valid timing attributes. If this is a problem then remove this node from the tree.
Overrides:
validateSyntax in class ConvertElement

XMT-O Reference Software