XMT-O Reference Software

xmto2xmta.tree
Class GroupElement

java.lang.Object
  |
  +--xmto2xmta.tree.TreeElement
        |
        +--xmto2xmta.tree.ConvertElement
              |
              +--xmto2xmta.tree.TimingElement
                    |
                    +--xmto2xmta.tree.GroupElement
All Implemented Interfaces:
ZorderSupport
Direct Known Subclasses:
body, group

public abstract class GroupElement
extends TimingElement
implements ZorderSupport

Class to group together the various type elements who group together other elements.

History:


Field Summary
private static boolean classesLoaded_
           
private static boolean debug_
          Whether debug information is to be printed to the console.
private  java.util.Hashtable deletePositions_
           
private static java.lang.reflect.Method getXmtoAttrOrderMethodGroup_
           
private static java.lang.reflect.Method getXmtoAttrOrderMethodTransformation_
           
private static java.lang.reflect.Method getXmtoAttrRegionMethodGroup_
           
private static java.lang.Class groupClass_
           
private  java.util.ResourceBundle groupElementRes_
           
private  boolean positionsDetermined_
           
private static java.lang.Class transformationClass_
           
private  boolean usePositions_
           
private  java.util.ResourceBundle xmto2XmtaRes_
           
 
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
GroupElement(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
private  java.util.Vector determineChildrenElements(ConvertElement parent)
          Create a list of the timing element children of this GroupElement node.
private  void determineDeleteFieldPositions()
          Add a media element into the ordered group.
static java.util.Hashtable determineDeletePositions(ConvertElement element, java.util.Vector children)
          Create a table of all the (z-order) delete positions for all of the simple durations for the specified children.
private static java.util.Hashtable determineDeletePositions(ConvertElement element, java.util.Vector elasIdsInAddOrder, java.util.Hashtable deleteTimes)
          Create list of all the ELASid ids for the children in their add order.
static boolean determineUsePosition(ConvertElement element, java.util.Vector children)
          Create list of all the ELASid ids for the children in their add order.
 int getDeleteFieldPosition(ELASid elasId)
          Determine the field position at time of deletion for the media/group element in the group.
abstract  java.lang.String getXmtaOrderedGroupId(ELASid elasId)
          Get the id for the XMT-A ordered group to which media objects are added.
private static void loadClasses()
           
static void setDebug(boolean debug)
          Enable debugging information to be printed to the console.
 boolean usePositions()
          Return whether the z-ordering positioning is used for the children or not.
 
Methods inherited from class xmto2xmta.tree.TimingElement
getXmtoAttrBegin, getXmtoAttrDur, getXmtoAttrEnd, getXmtoAttrEndsync, getXmtoAttrFill, getXmtoAttrFillDefault, getXmtoAttrMax, getXmtoAttrMin, getXmtoAttrRepeatCount, getXmtoAttrRepeatDur, getXmtoAttrRepeatRestart, getXmtoAttrRepeatRestartDefault, handleValidateSyntax, 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).

deletePositions_

private java.util.Hashtable deletePositions_

positionsDetermined_

private boolean positionsDetermined_

usePositions_

private boolean usePositions_

transformationClass_

private static java.lang.Class transformationClass_

groupClass_

private static java.lang.Class groupClass_

getXmtoAttrOrderMethodTransformation_

private static java.lang.reflect.Method getXmtoAttrOrderMethodTransformation_

getXmtoAttrOrderMethodGroup_

private static java.lang.reflect.Method getXmtoAttrOrderMethodGroup_

getXmtoAttrRegionMethodGroup_

private static java.lang.reflect.Method getXmtoAttrRegionMethodGroup_

classesLoaded_

private static boolean classesLoaded_

groupElementRes_

private java.util.ResourceBundle groupElementRes_

xmto2XmtaRes_

private java.util.ResourceBundle xmto2XmtaRes_
Constructor Detail

GroupElement

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

determineChildrenElements

private java.util.Vector determineChildrenElements(ConvertElement parent)
Create a list of the timing element children of this GroupElement node. This includes all media elements and group elements. If a Time container element is encountered then recurse through the time container element adding its elements. There can be par elements because the <.body>. elements is a GroupElement. The list should be in document order.
Returns:
list of the children elements.

determineDeleteFieldPositions

private void determineDeleteFieldPositions()
Add a media element into the ordered group.
Parameters:
mediaElement - XMT-A media object to be added into ordered group.

determineDeletePositions

public static java.util.Hashtable determineDeletePositions(ConvertElement element,
                                                           java.util.Vector children)
Create a table of all the (z-order) delete positions for all of the simple durations for the specified children.

First create a list of all the ELASid ids for the children in their add order. The add order is the order in which the simple durations are added to the scene. The list of the children is in document order. Go through the list of children enumerating all their simple durations This should be a list of all the ELASid ids in the order in which they are added to the list.

Next go through the list of simple durations determining their position at deletion time.

NOTE: this method is a static method so that it can be shared with <region>

Parameters:
element - the parent of the list of children parameter. Used for debug purposes to specify which element has problems with determing the delete positions of the children.
children - list of the children is in document order.
Returns:
sorted list of the ELASid ids in delete order.

determineDeletePositions

private static java.util.Hashtable determineDeletePositions(ConvertElement element,
                                                            java.util.Vector elasIdsInAddOrder,
                                                            java.util.Hashtable deleteTimes)
Create list of all the ELASid ids for the children in their add order. The add order is the order in which the simple durations are added to the scene. The list of the children is in document order.
Returns:
sorted list of the ELASid ids.

determineUsePosition

public static boolean determineUsePosition(ConvertElement element,
                                           java.util.Vector children)
Create list of all the ELASid ids for the children in their add order. The add order is the order in which the simple durations are added to the scene. The list of the children is in document order.

NOTE: this method is a static method so that it can be shared with <region>

Returns:
whether to use the z-order positioning or not.

getDeleteFieldPosition

public int getDeleteFieldPosition(ELASid elasId)
Determine the field position at time of deletion for the media/group element in the group.
Specified by:
getDeleteFieldPosition in interface ZorderSupport
Parameters:
elasId - id to specify which simple duration of a child element.
Returns:
the field position at time of deletion for the media/group element.

getXmtaOrderedGroupId

public abstract java.lang.String getXmtaOrderedGroupId(ELASid elasId)
Get the id for the XMT-A ordered group to which media objects are added.
Specified by:
getXmtaOrderedGroupId in interface ZorderSupport
Parameters:
elasId - id to specify which simple duration of a child element.
Returns:
the id (DEF) of the XMT-A ordered group.

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

usePositions

public boolean usePositions()
Return whether the z-ordering positioning is used for the children or not.
Specified by:
usePositions in interface ZorderSupport
Returns:
whether z-ordering is used for this GroupElement or not.

XMT-O Reference Software