XMT-O Reference Software

xmto2xmta.mapmedia
Class MedMediaElement

java.lang.Object
  |
  +--xmto2xmta.MapRoot
        |
        +--xmto2xmta.mapmedia.MedMediaElement
All Implemented Interfaces:
MapInterface
Direct Known Subclasses:
MedExternalElement, MedInternalElement

public abstract class MedMediaElement
extends MapRoot

Class to group together the various type of media elements.

History:


Field Summary
private static boolean debug_
          Whether debug information is to be printed to the console.
private  MediaElement treeMediaElement_
           
private  java.util.ResourceBundle xmto2XmtaRes_
           
 
Fields inherited from class xmto2xmta.MapRoot
treeElement_, xmto2xmta_
 
Constructor Summary
MedMediaElement()
           
 
Method Summary
protected  boolean createDeleteMapping(ELASid elasId)
          Create the media Element infrastructure.
protected  boolean createDeleteMapping(ELASid elasId, ELASid parentELASid, TimingAttribute deleteTime)
          Create the media Element infrastructure.
protected  boolean createEventDeleteMapping(ELASid elasId, ELASid parentELASid)
          Map the timing of the end of the object based on the end event(s).
protected  boolean createEventInsertMapping(ELASid elasId, ELASid parentELASid)
          Attach the switch for the element based on the begin event.
protected  boolean createInsertMapping(ELASid elasId)
          Create the media Element infrastructure.
protected  boolean createInsertMapping(ELASid elasId, ELASid parentELASid, TimingAttribute insertTime, TimingAttribute simpleDuration)
          Create the media Element infrastructure.
private  org.w3c.dom.Element createXmtaMapping(ELASid elasId)
          Create the media Element infrastructure.
private  boolean deleteNodeAtEndOfDuration(org.w3c.dom.Node parent, java.lang.String groupId, long duration)
           
private  boolean doEventTimingMapping()
           
 void doMapping()
           
private  boolean doTimingMapping()
           
protected abstract  boolean fillInTransform2dChildren(org.w3c.dom.Element transform2dChildren, ELASid elasId)
           
private  boolean generateDeleteMapping(ELASid elasId, ELASid parentELASid, TimingAttribute deleteTime)
           
private  boolean generateInsertMapping(ELASid elasId, ELASid parentELASid, TimingAttribute insertTime, TimingAttribute simpleDuration)
           
 void init(Xmto2Xmta xmto2xmta, ConvertElement element)
           
static void setDebug(boolean debug)
          Enable debugging information to be printed to the console.
 
Methods inherited from class xmto2xmta.MapRoot
fireErrorEvent, fireErrorEvent, fireErrorEvent, getConvertElement
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, 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).

treeMediaElement_

private MediaElement treeMediaElement_

xmto2XmtaRes_

private java.util.ResourceBundle xmto2XmtaRes_
Constructor Detail

MedMediaElement

public MedMediaElement()
Method Detail

createDeleteMapping

protected boolean createDeleteMapping(ELASid elasId)
Create the media Element infrastructure. The infrastructure contains the par node for the deletion. The par for the deletion, deletes the top level group for the element. It also takes care of the position in the ordered group field (for z-order)
   <par begin="???">
     <Delete atNode="???"/>
     <Delete atField="order" atNode="???"/>
   </par>
 

createDeleteMapping

protected boolean createDeleteMapping(ELASid elasId,
                                      ELASid parentELASid,
                                      TimingAttribute deleteTime)
Create the media Element infrastructure. The infrastructure contains the par node for the deletion. The par for the deletion, deletes the top level group for the element. It also takes care of the position in the ordered group field (for z-order)
   <par begin="???">
     <Delete atNode="???"/>
     <Delete atField="order" atNode="???"/>
   </par>
 

generateDeleteMapping

private boolean generateDeleteMapping(ELASid elasId,
                                      ELASid parentELASid,
                                      TimingAttribute deleteTime)

createInsertMapping

protected boolean createInsertMapping(ELASid elasId)
Create the media Element infrastructure. The infrastructure contains the par node for the insertion. The par node for the insertion contains the top level group which will contain the information for the element. This also takes care of the position in the ordered group field (for z-order).
   <par begin="???">
     <Insert atNode="???">
       <Group DEF="???">
         <children>
           <TouchSensor DEF="???" enabled="false">
         </children>
       </Group>
     </Insert>
     <Insert atField="order" atNode="???" position="END" value="???"/>
   </par>
 

createInsertMapping

protected boolean createInsertMapping(ELASid elasId,
                                      ELASid parentELASid,
                                      TimingAttribute insertTime,
                                      TimingAttribute simpleDuration)
Create the media Element infrastructure. The infrastructure contains the par node for the insertion. The par node for the insertion contains the top level group which will contain the information for the element. This also takes care of the position in the ordered group field (for z-order).
   <par begin="???">
     <Insert atNode="???">
       <Group DEF="???">
         <children>
           <TouchSensor DEF="???" enabled="false">
         </children>
       </Group>
     </Insert>
     <Insert atField="order" atNode="???" position="END" value="???"/>
   </par>
 

generateInsertMapping

private boolean generateInsertMapping(ELASid elasId,
                                      ELASid parentELASid,
                                      TimingAttribute insertTime,
                                      TimingAttribute simpleDuration)

createXmtaMapping

private org.w3c.dom.Element createXmtaMapping(ELASid elasId)
Create the media Element infrastructure. The infrastructure contains the switch and the transform are the standard base nodes for the element. Where it is placed in the tree is dependent on the begin and end timing for the element. <Switch DEF="???"> <choice> <Transform2D DEF="???"> <children/> </Transform2D> </choice> </Switch>

doMapping

public void doMapping()

doTimingMapping

private boolean doTimingMapping()

fillInTransform2dChildren

protected abstract boolean fillInTransform2dChildren(org.w3c.dom.Element transform2dChildren,
                                                     ELASid elasId)

init

public void init(Xmto2Xmta xmto2xmta,
                 ConvertElement element)
          throws java.lang.Exception
Overrides:
init in class MapRoot

setDebug

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

doEventTimingMapping

private boolean doEventTimingMapping()

createEventInsertMapping

protected boolean createEventInsertMapping(ELASid elasId,
                                           ELASid parentELASid)
Attach the switch for the element based on the begin event. The begining of the object is based on an event thus attach switch The begining of the object is based on an event thus attach switch inside conditional and set the route from a touch sensor. If there is an offset time then also need a timer conditional.

deleteNodeAtEndOfDuration

private boolean deleteNodeAtEndOfDuration(org.w3c.dom.Node parent,
                                          java.lang.String groupId,
                                          long duration)

createEventDeleteMapping

protected boolean createEventDeleteMapping(ELASid elasId,
                                           ELASid parentELASid)
Map the timing of the end of the object based on the end event(s). The end could be a single event or more likely a list of end events or clock timing. The first one which occurs will remove the event and the rest will be ignored (or fall through without effect).

XMT-O Reference Software