xmto2xmta.tree
Class topLayout
java.lang.Object
|
+--xmto2xmta.tree.TreeElement
|
+--xmto2xmta.tree.ConvertElement
|
+--xmto2xmta.tree.StructureElement
|
+--xmto2xmta.tree.RegionContainerElement
|
+--xmto2xmta.tree.topLayout
- public class topLayout
- extends RegionContainerElement
Class to handle the conversion of the XMT-O element. The class
name is XMTO instead of XMT-O since java doesn't allow a dash character
in the class name.
History:
- 13 Dec 2000 - Created file.
- 30 Apr 2001 - Add switch to generate new format for XMT-A files.
- 30 Jun 2001 - Fix bug, on validating syntax if problem with parent then
return directly the problem.
Fields inherited from class xmto2xmta.tree.ConvertElement |
convertIndexTable_, index_, xmtaDoc_, xmtaIds_, xmtaParNodes_, xmtaParOds_, xmtaParRoutes_, xmto2Xmta_, xmtoAttrId_, xmtoElement_, xmtoIds_ |
Constructor Summary |
topLayout(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. |
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 java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
debug_
private static boolean debug_
- Whether debug information is to be printed to the console.
default is not have debug information printed (false).
xmtoAttrWidth_
private java.lang.String xmtoAttrWidth_
xmtoAttrHeight_
private java.lang.String xmtoAttrHeight_
xmtoAttrBackgroundColor_
private java.lang.String xmtoAttrBackgroundColor_
xmtaAttrBackgroundColor_
private java.lang.String xmtaAttrBackgroundColor_
xmtaBackground2dId_
private java.lang.String xmtaBackground2dId_
topLayoutRes_
private java.util.ResourceBundle topLayoutRes_
xmto2XmtaRes_
private java.util.ResourceBundle xmto2XmtaRes_
topLayout
public topLayout(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.
getXmtaAttrBackgroundColor
public java.lang.String getXmtaAttrBackgroundColor()
getXmtaBackground2dId
public java.lang.String getXmtaBackground2dId()
- Get the id for the Background2d element.
getXmtaLayoutOrderedGroupId
public java.lang.String getXmtaLayoutOrderedGroupId()
- Get the id for the XMT-A ordered group to which region objects are added.
- Overrides:
getXmtaLayoutOrderedGroupId
in class RegionContainerElement
- Returns:
- the id (DEF) of the XMT-A ordered group.
getXmtoAttrHeight
public java.lang.String getXmtoAttrHeight()
getXmtoAttrWidth
public java.lang.String getXmtoAttrWidth()
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
toString
public java.lang.String toString()
- Overrides:
toString
in class TreeElement
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