XMT-O Reference Software

xmto2xmta.tree
Class MediaElement

java.lang.Object
  |
  +--xmto2xmta.tree.TreeElement
        |
        +--xmto2xmta.tree.ConvertElement
              |
              +--xmto2xmta.tree.TimingElement
                    |
                    +--xmto2xmta.tree.MediaElement
All Implemented Interfaces:
ParContainable, Sensorable
Direct Known Subclasses:
ExternalElement, InternalElement

public abstract class MediaElement
extends TimingElement
implements Sensorable, ParContainable

Class to group together the various type of media elements.

History:


Field Summary
private static boolean classesLoaded_
           
private static boolean debug_
          Whether debug information is to be printed to the console.
private  boolean enableTouchSensor_
           
private static java.lang.Class groupClass_
           
private static java.lang.Class headClass_
           
private  java.util.Hashtable xmtaConditionalDeleteIds_
           
private  java.util.Hashtable xmtaConditionalDeleteTimerIds_
           
private  java.util.Hashtable xmtaConditionalInsertIds_
           
private  java.util.Hashtable xmtaConditionalInsertTimerIds_
           
private  java.util.Hashtable xmtaGroupIds_
           
private  java.util.Hashtable xmtaSwitchIds_
           
private  java.util.Hashtable xmtaTimeSensorBeginOffsetIds_
           
private  java.util.Hashtable xmtaTimeSensorEndOffsetIds_
           
private  java.util.Hashtable xmtaTouchSensorIds_
           
private  java.util.Hashtable xmtaTransform2dIds_
           
private  java.util.Hashtable xmtaValuatorIds_
           
private  java.util.ResourceBundle xmto2XmtaRes_
           
private  java.lang.String xmtoAttrRegion_
           
 
Fields inherited from class xmto2xmta.tree.TimingElement
timingElementRes_, xmtoAttrBegin_, xmtoAttrDur_, xmtoAttrEnd_, xmtoAttrEndsync_, xmtoAttrFill_, xmtoAttrFillDefault_, xmtoAttrMax_, xmtoAttrMin_, xmtoAttrRepeatCount_, xmtoAttrRepeatDur_, xmtoAttrRestart_, 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
MediaElement(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 enableTouchSensor(boolean enable)
           
 java.lang.String getXmtaConditionalDeleteId(ELASid elasId)
          Get the id for the conditional delete element.
 java.lang.String getXmtaConditionalDeleteTimerId(ELASid elasId)
          Get the id for the conditional delete timer.
 java.lang.String getXmtaConditionalInsertId(ELASid elasId)
          Get the id for the conditional insert element.
 java.lang.String getXmtaConditionalInsertTimerId(ELASid elasId)
          Get the id for the conditional insert timer.
 java.lang.String getXmtaGroupId(ELASid elasId)
          Get the id for the group element.
 java.lang.String getXmtaSwitchId(ELASid elasId)
          Get the id for the switch element.
 java.lang.String getXmtaTimeSensorBeginOffsetId(ELASid elasId)
          Get the id for the time sensor begin offset.
 java.lang.String getXmtaTimeSensorEndOffsetId(ELASid elasId)
          Get the id for the time sensor end offset.
 java.lang.String getXmtaTouchSensorId(ELASid elasId)
           
 java.lang.String getXmtaTransform2dId(ELASid elasId)
          Get the id for the transform2d element.
 java.lang.String getXmtaValuatorId(ELASid elasId)
          Get the id for the Valuator element.
 java.lang.String getXmtoAttrRegion()
           
protected  boolean handleValidateSyntax(java.lang.String attributeName, java.lang.String attributeValue)
          Handle the attribute by checking its syntax.
private static void loadClasses()
           
static void setDebug(boolean debug)
          Enable debugging information to be printed to the console.
 boolean touchSensorEnabled()
           
 
Methods inherited from class xmto2xmta.tree.TimingElement
getXmtoAttrBegin, getXmtoAttrDur, getXmtoAttrEnd, getXmtoAttrEndsync, getXmtoAttrFill, getXmtoAttrFillDefault, getXmtoAttrMax, getXmtoAttrMin, getXmtoAttrRepeatCount, getXmtoAttrRepeatDur, getXmtoAttrRepeatRestart, getXmtoAttrRepeatRestartDefault, validateDefsObjectTimingSyntax, validateSyntax
 
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).

xmtoAttrRegion_

private java.lang.String xmtoAttrRegion_

enableTouchSensor_

private boolean enableTouchSensor_

xmtaGroupIds_

private java.util.Hashtable xmtaGroupIds_

xmtaSwitchIds_

private java.util.Hashtable xmtaSwitchIds_

xmtaTransform2dIds_

private java.util.Hashtable xmtaTransform2dIds_

xmtaTouchSensorIds_

private java.util.Hashtable xmtaTouchSensorIds_

xmtaConditionalInsertIds_

private java.util.Hashtable xmtaConditionalInsertIds_

xmtaConditionalInsertTimerIds_

private java.util.Hashtable xmtaConditionalInsertTimerIds_

xmtaTimeSensorBeginOffsetIds_

private java.util.Hashtable xmtaTimeSensorBeginOffsetIds_

xmtaConditionalDeleteIds_

private java.util.Hashtable xmtaConditionalDeleteIds_

xmtaConditionalDeleteTimerIds_

private java.util.Hashtable xmtaConditionalDeleteTimerIds_

xmtaTimeSensorEndOffsetIds_

private java.util.Hashtable xmtaTimeSensorEndOffsetIds_

xmtaValuatorIds_

private java.util.Hashtable xmtaValuatorIds_

headClass_

private static java.lang.Class headClass_

groupClass_

private static java.lang.Class groupClass_

classesLoaded_

private static boolean classesLoaded_

xmto2XmtaRes_

private java.util.ResourceBundle xmto2XmtaRes_
Constructor Detail

MediaElement

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

getXmtaGroupId

public java.lang.String getXmtaGroupId(ELASid elasId)
Get the id for the group element.

getXmtaSwitchId

public java.lang.String getXmtaSwitchId(ELASid elasId)
Get the id for the switch element.

getXmtaTouchSensorId

public java.lang.String getXmtaTouchSensorId(ELASid elasId)
Specified by:
getXmtaTouchSensorId in interface Sensorable

getXmtaTransform2dId

public java.lang.String getXmtaTransform2dId(ELASid elasId)
Get the id for the transform2d element.

getXmtaConditionalInsertId

public java.lang.String getXmtaConditionalInsertId(ELASid elasId)
Get the id for the conditional insert element.

getXmtaConditionalInsertTimerId

public java.lang.String getXmtaConditionalInsertTimerId(ELASid elasId)
Get the id for the conditional insert timer.

getXmtaTimeSensorBeginOffsetId

public java.lang.String getXmtaTimeSensorBeginOffsetId(ELASid elasId)
Get the id for the time sensor begin offset.

getXmtaConditionalDeleteId

public java.lang.String getXmtaConditionalDeleteId(ELASid elasId)
Get the id for the conditional delete element.

getXmtaConditionalDeleteTimerId

public java.lang.String getXmtaConditionalDeleteTimerId(ELASid elasId)
Get the id for the conditional delete timer.

getXmtaTimeSensorEndOffsetId

public java.lang.String getXmtaTimeSensorEndOffsetId(ELASid elasId)
Get the id for the time sensor end offset.

getXmtaValuatorId

public java.lang.String getXmtaValuatorId(ELASid elasId)
Get the id for the Valuator element.

getXmtoAttrRegion

public java.lang.String getXmtoAttrRegion()

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 TimingElement
Parameters:
attributeName - node name of attribute.
attributeValue - node value of attribute.
Returns:
whether this attribute is handled or not.

touchSensorEnabled

public boolean touchSensorEnabled()

enableTouchSensor

public void enableTouchSensor(boolean enable)

loadClasses

private static void loadClasses()

setDebug

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

XMT-O Reference Software