XMT-O Reference Software

xmto2xmta.tree
Class points

java.lang.Object
  |
  +--xmto2xmta.tree.TreeElement
        |
        +--xmto2xmta.tree.ConvertElement
              |
              +--xmto2xmta.tree.TimingElement
                    |
                    +--xmto2xmta.tree.MediaElement
                          |
                          +--xmto2xmta.tree.InternalElement
                                |
                                +--xmto2xmta.tree.points
All Implemented Interfaces:
Animatable, DefsObject, ParContainable, Sensorable, VisualElement

public class points
extends InternalElement
implements Animatable

Class to handle the conversion of the points element.

History:


Field Summary
private  java.lang.String[] animXmtaAttrFieldDefaultValue_
           
private  int[] animXmtaAttrFieldType_
           
private  java.lang.String[] animXmtaAttrName_
           
private  int[] animXmtoAttrFieldType_
           
private  java.lang.String[] animXmtoAttrName_
           
private static boolean debug_
          Whether debug information is to be printed to the console.
private  java.lang.String xmtaAttrColor_
           
private  java.lang.String xmtaAttrPoint_
           
(package private)  java.util.Hashtable xmtaColorIds_
           
(package private)  java.util.Hashtable xmtaCoordinate2DIds_
           
(package private)  java.util.Hashtable xmtaPointsIds_
           
private  java.util.ResourceBundle xmto2XmtaRes_
           
 
Fields inherited from class xmto2xmta.tree.InternalElement
isDefsParent_, isInDefsTree_, isInDefsTreeInitialized_, xmtaAppearanceIds_, xmtaMaterial2dIds_
 
Fields inherited from class xmto2xmta.tree.MediaElement
classesLoaded_, enableTouchSensor_, groupClass_, headClass_, xmtaConditionalDeleteIds_, xmtaConditionalDeleteTimerIds_, xmtaConditionalInsertIds_, xmtaConditionalInsertTimerIds_, xmtaGroupIds_, xmtaSwitchIds_, xmtaTimeSensorBeginOffsetIds_, xmtaTimeSensorEndOffsetIds_, xmtaTouchSensorIds_, xmtaTransform2dIds_, xmtaValuatorIds_, 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_
 
Fields inherited from interface xmto2xmta.tree.Animatable
TYPE_MFBool, TYPE_MFColor, TYPE_MFFloat, TYPE_MFInt32, TYPE_MFString, TYPE_MFVec2f, TYPE_SFBool, TYPE_SFColor, TYPE_SFFloat, TYPE_SFInt32, TYPE_SFString, TYPE_SFVec2f, TYPE_UNSUPPORTED
 
Constructor Summary
points(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
 java.lang.String getAnimConvertValueXmto2Xmta(java.lang.String xmtoAttrName, java.lang.String xmtoValue, int xmtoFieldType, int xmtaFieldType)
          This function converts a xmto attribute value to its xmta equivalent.
 int getAnimXmtaAttrFieldType(java.lang.String xmtoAttrName)
          This function returns the MPEG-4 field type being animated.
 java.lang.String getAnimXmtaAttrInitialValue(java.lang.String xmtoAttrName)
          This function returns the initial value of the field begin animated.
 java.lang.String getAnimXmtaAttrName(java.lang.String xmtoAttrName)
          This function returns the MPEG-4 field being animated.
 java.lang.String getAnimXmtaDefsNodeId(java.lang.String attributeName)
          This function returns the MPEG-4 node whose field is being animated.
 java.lang.String getAnimXmtaNodeId(java.lang.String xmtoAttrName, ELASid elasId)
          This function returns the MPEG-4 node whose field is being animated.
 int getAnimXmtoAttrFieldType(java.lang.String xmtoAttrName)
          This function returns the MPEG-4 field type being animated.
 java.lang.String getXmtaAttrColor()
           
 java.lang.String getXmtaAttrPoint()
           
 java.lang.String getXmtaColorId(ELASid elasId)
          Get the id for the circle element.
 java.lang.String getXmtaCoordinate2DId(ELASid elasId)
          Get the id for the Coordinate2D element.
 java.lang.String getXmtaPointsId(ELASid elasId)
          Get the id for the circle element.
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.
 java.lang.String toString()
           
 
Methods inherited from class xmto2xmta.tree.InternalElement
getXmtaAppearanceId, getXmtaDefsId, initDefsFlags, isDefsParent, isInDefsTree
 
Methods inherited from class xmto2xmta.tree.MediaElement
enableTouchSensor, getXmtaConditionalDeleteId, getXmtaConditionalDeleteTimerId, getXmtaConditionalInsertId, getXmtaConditionalInsertTimerId, getXmtaGroupId, getXmtaSwitchId, getXmtaTimeSensorBeginOffsetId, getXmtaTimeSensorEndOffsetId, getXmtaTouchSensorId, getXmtaTransform2dId, getXmtaValuatorId, getXmtoAttrRegion, loadClasses, 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
 
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).

xmtaAttrColor_

private java.lang.String xmtaAttrColor_

xmtaAttrPoint_

private java.lang.String xmtaAttrPoint_

xmtaPointsIds_

java.util.Hashtable xmtaPointsIds_

xmtaColorIds_

java.util.Hashtable xmtaColorIds_

xmtaCoordinate2DIds_

java.util.Hashtable xmtaCoordinate2DIds_

animXmtoAttrName_

private java.lang.String[] animXmtoAttrName_

animXmtoAttrFieldType_

private int[] animXmtoAttrFieldType_

animXmtaAttrName_

private java.lang.String[] animXmtaAttrName_

animXmtaAttrFieldType_

private int[] animXmtaAttrFieldType_

animXmtaAttrFieldDefaultValue_

private java.lang.String[] animXmtaAttrFieldDefaultValue_

xmto2XmtaRes_

private java.util.ResourceBundle xmto2XmtaRes_
Constructor Detail

points

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

getAnimConvertValueXmto2Xmta

public java.lang.String getAnimConvertValueXmto2Xmta(java.lang.String xmtoAttrName,
                                                     java.lang.String xmtoValue,
                                                     int xmtoFieldType,
                                                     int xmtaFieldType)
This function converts a xmto attribute value to its xmta equivalent. It then returns the converted value.
Specified by:
getAnimConvertValueXmto2Xmta in interface Animatable

getAnimXmtaAttrFieldType

public int getAnimXmtaAttrFieldType(java.lang.String xmtoAttrName)
This function returns the MPEG-4 field type being animated. e.g. SFVec2f, MFVec3f, SFColor, MFColor, ...
Specified by:
getAnimXmtaAttrFieldType in interface Animatable

getAnimXmtaAttrInitialValue

public java.lang.String getAnimXmtaAttrInitialValue(java.lang.String xmtoAttrName)
This function returns the initial value of the field begin animated. This is used in case the attribute is not specified in the animaiton. Generally this is the original value so that after the animation is finished the node field can be returned to its original state. If this value isn't specified then the default value will be used.
Specified by:
getAnimXmtaAttrInitialValue in interface Animatable

getAnimXmtaAttrName

public java.lang.String getAnimXmtaAttrName(java.lang.String xmtoAttrName)
This function returns the MPEG-4 field being animated.
Specified by:
getAnimXmtaAttrName in interface Animatable

getAnimXmtaDefsNodeId

public java.lang.String getAnimXmtaDefsNodeId(java.lang.String attributeName)
This function returns the MPEG-4 node whose field is being animated.

Normally: This method is for when there is no elasId for this instantiation of the object. This can occur for xMediaChildrenObject that are defs objects, but the parent isn't a TimingElement.

In this case where we are a subclass of TimingElement it is not possible not have an elasId since we are a timing element.


getAnimXmtaNodeId

public java.lang.String getAnimXmtaNodeId(java.lang.String xmtoAttrName,
                                          ELASid elasId)
This function returns the MPEG-4 node whose field is being animated.
Specified by:
getAnimXmtaNodeId in interface Animatable

getAnimXmtoAttrFieldType

public int getAnimXmtoAttrFieldType(java.lang.String xmtoAttrName)
This function returns the MPEG-4 field type being animated. e.g. SFVec2f, MFVec3f, SFColor, MFColor, ...
Specified by:
getAnimXmtoAttrFieldType in interface Animatable

getXmtaAttrColor

public java.lang.String getXmtaAttrColor()

getXmtaAttrPoint

public java.lang.String getXmtaAttrPoint()

getXmtaColorId

public java.lang.String getXmtaColorId(ELASid elasId)
Get the id for the circle element.

getXmtaCoordinate2DId

public java.lang.String getXmtaCoordinate2DId(ELASid elasId)
Get the id for the Coordinate2D element.

getXmtaPointsId

public java.lang.String getXmtaPointsId(ELASid elasId)
Get the id for the circle element.

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

toString

public java.lang.String toString()
Overrides:
toString in class TreeElement

XMT-O Reference Software