DrawPageElement.java

  1. /**
  2.  * **********************************************************************
  3.  *
  4.  * <p>DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
  5.  *
  6.  * <p>Copyright 2008, 2010 Oracle and/or its affiliates. All rights reserved.
  7.  *
  8.  * <p>Use is subject to license terms.
  9.  *
  10.  * <p>Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
  11.  * except in compliance with the License. You may obtain a copy of the License at
  12.  * http://www.apache.org/licenses/LICENSE-2.0. You can also obtain a copy of the License at
  13.  * http://odftoolkit.org/docs/license.txt
  14.  *
  15.  * <p>Unless required by applicable law or agreed to in writing, software distributed under the
  16.  * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  17.  * express or implied.
  18.  *
  19.  * <p>See the License for the specific language governing permissions and limitations under the
  20.  * License.
  21.  *
  22.  * <p>**********************************************************************
  23.  */

  24. /*
  25.  * This file is automatically generated.
  26.  * Don't edit manually.
  27.  */
  28. package org.odftoolkit.odfdom.dom.element.draw;

  29. import org.odftoolkit.odfdom.dom.DefaultElementVisitor;
  30. import org.odftoolkit.odfdom.dom.OdfDocumentNamespace;
  31. import org.odftoolkit.odfdom.dom.attribute.draw.DrawIdAttribute;
  32. import org.odftoolkit.odfdom.dom.attribute.draw.DrawMasterPageNameAttribute;
  33. import org.odftoolkit.odfdom.dom.attribute.draw.DrawNameAttribute;
  34. import org.odftoolkit.odfdom.dom.attribute.draw.DrawNavOrderAttribute;
  35. import org.odftoolkit.odfdom.dom.attribute.draw.DrawStyleNameAttribute;
  36. import org.odftoolkit.odfdom.dom.attribute.presentation.PresentationPresentationPageLayoutNameAttribute;
  37. import org.odftoolkit.odfdom.dom.attribute.presentation.PresentationUseDateTimeNameAttribute;
  38. import org.odftoolkit.odfdom.dom.attribute.presentation.PresentationUseFooterNameAttribute;
  39. import org.odftoolkit.odfdom.dom.attribute.presentation.PresentationUseHeaderNameAttribute;
  40. import org.odftoolkit.odfdom.dom.attribute.xml.XmlIdAttribute;
  41. import org.odftoolkit.odfdom.dom.element.OdfStylableElement;
  42. import org.odftoolkit.odfdom.dom.element.anim.AnimAnimateColorElement;
  43. import org.odftoolkit.odfdom.dom.element.anim.AnimAnimateElement;
  44. import org.odftoolkit.odfdom.dom.element.anim.AnimAnimateMotionElement;
  45. import org.odftoolkit.odfdom.dom.element.anim.AnimAnimateTransformElement;
  46. import org.odftoolkit.odfdom.dom.element.anim.AnimAudioElement;
  47. import org.odftoolkit.odfdom.dom.element.anim.AnimCommandElement;
  48. import org.odftoolkit.odfdom.dom.element.anim.AnimIterateElement;
  49. import org.odftoolkit.odfdom.dom.element.anim.AnimParElement;
  50. import org.odftoolkit.odfdom.dom.element.anim.AnimSeqElement;
  51. import org.odftoolkit.odfdom.dom.element.anim.AnimSetElement;
  52. import org.odftoolkit.odfdom.dom.element.anim.AnimTransitionFilterElement;
  53. import org.odftoolkit.odfdom.dom.element.dr3d.Dr3dSceneElement;
  54. import org.odftoolkit.odfdom.dom.element.office.OfficeFormsElement;
  55. import org.odftoolkit.odfdom.dom.element.presentation.PresentationAnimationsElement;
  56. import org.odftoolkit.odfdom.dom.element.presentation.PresentationNotesElement;
  57. import org.odftoolkit.odfdom.dom.element.svg.SvgDescElement;
  58. import org.odftoolkit.odfdom.dom.element.svg.SvgTitleElement;
  59. import org.odftoolkit.odfdom.dom.style.OdfStyleFamily;
  60. import org.odftoolkit.odfdom.pkg.ElementVisitor;
  61. import org.odftoolkit.odfdom.pkg.OdfFileDom;
  62. import org.odftoolkit.odfdom.pkg.OdfName;

  63. /** DOM implementation of OpenDocument element {@odf.element draw:page}. */
  64. public class DrawPageElement extends OdfStylableElement {

  65.   public static final OdfName ELEMENT_NAME = OdfName.newName(OdfDocumentNamespace.DRAW, "page");

  66.   /**
  67.    * Create the instance of <code>DrawPageElement</code>
  68.    *
  69.    * @param ownerDoc The type is <code>OdfFileDom</code>
  70.    */
  71.   public DrawPageElement(OdfFileDom ownerDoc) {
  72.     super(
  73.         ownerDoc,
  74.         ELEMENT_NAME,
  75.         OdfStyleFamily.DrawingPage,
  76.         OdfName.newName(OdfDocumentNamespace.DRAW, "style-name"));
  77.   }

  78.   /**
  79.    * Get the element name
  80.    *
  81.    * @return return <code>OdfName</code> the name of element {@odf.element draw:page}.
  82.    */
  83.   public OdfName getOdfName() {
  84.     return ELEMENT_NAME;
  85.   }

  86.   /**
  87.    * Receives the value of the ODFDOM attribute representation <code>DrawIdAttribute</code> , See
  88.    * {@odf.attribute draw:id}
  89.    *
  90.    * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  91.    *     and no default value defined.
  92.    */
  93.   public String getDrawIdAttribute() {
  94.     DrawIdAttribute attr = (DrawIdAttribute) getOdfAttribute(OdfDocumentNamespace.DRAW, "id");
  95.     if (attr != null) {
  96.       return String.valueOf(attr.getValue());
  97.     }
  98.     return null;
  99.   }

  100.   /**
  101.    * Sets the value of ODFDOM attribute representation <code>DrawIdAttribute</code> , See
  102.    * {@odf.attribute draw:id}
  103.    *
  104.    * @param drawIdValue The type is <code>String</code>
  105.    */
  106.   public void setDrawIdAttribute(String drawIdValue) {
  107.     DrawIdAttribute attr = new DrawIdAttribute((OdfFileDom) this.ownerDocument);
  108.     setOdfAttribute(attr);
  109.     attr.setValue(drawIdValue);
  110.   }

  111.   /**
  112.    * Receives the value of the ODFDOM attribute representation <code>DrawMasterPageNameAttribute
  113.    * </code> , See {@odf.attribute draw:master-page-name}
  114.    *
  115.    * <p>Attribute is mandatory.
  116.    *
  117.    * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  118.    *     and no default value defined.
  119.    */
  120.   public String getDrawMasterPageNameAttribute() {
  121.     DrawMasterPageNameAttribute attr =
  122.         (DrawMasterPageNameAttribute)
  123.             getOdfAttribute(OdfDocumentNamespace.DRAW, "master-page-name");
  124.     if (attr != null) {
  125.       return String.valueOf(attr.getValue());
  126.     }
  127.     return null;
  128.   }

  129.   /**
  130.    * Sets the value of ODFDOM attribute representation <code>DrawMasterPageNameAttribute</code> ,
  131.    * See {@odf.attribute draw:master-page-name}
  132.    *
  133.    * @param drawMasterPageNameValue The type is <code>String</code>
  134.    */
  135.   public void setDrawMasterPageNameAttribute(String drawMasterPageNameValue) {
  136.     DrawMasterPageNameAttribute attr =
  137.         new DrawMasterPageNameAttribute((OdfFileDom) this.ownerDocument);
  138.     setOdfAttribute(attr);
  139.     attr.setValue(drawMasterPageNameValue);
  140.   }

  141.   /**
  142.    * Receives the value of the ODFDOM attribute representation <code>DrawNameAttribute</code> , See
  143.    * {@odf.attribute draw:name}
  144.    *
  145.    * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  146.    *     and no default value defined.
  147.    */
  148.   public String getDrawNameAttribute() {
  149.     DrawNameAttribute attr = (DrawNameAttribute) getOdfAttribute(OdfDocumentNamespace.DRAW, "name");
  150.     if (attr != null) {
  151.       return String.valueOf(attr.getValue());
  152.     }
  153.     return null;
  154.   }

  155.   /**
  156.    * Sets the value of ODFDOM attribute representation <code>DrawNameAttribute</code> , See
  157.    * {@odf.attribute draw:name}
  158.    *
  159.    * @param drawNameValue The type is <code>String</code>
  160.    */
  161.   public void setDrawNameAttribute(String drawNameValue) {
  162.     DrawNameAttribute attr = new DrawNameAttribute((OdfFileDom) this.ownerDocument);
  163.     setOdfAttribute(attr);
  164.     attr.setValue(drawNameValue);
  165.   }

  166.   /**
  167.    * Receives the value of the ODFDOM attribute representation <code>DrawNavOrderAttribute</code> ,
  168.    * See {@odf.attribute draw:nav-order}
  169.    *
  170.    * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  171.    *     and no default value defined.
  172.    */
  173.   public String getDrawNavOrderAttribute() {
  174.     DrawNavOrderAttribute attr =
  175.         (DrawNavOrderAttribute) getOdfAttribute(OdfDocumentNamespace.DRAW, "nav-order");
  176.     if (attr != null) {
  177.       return String.valueOf(attr.getValue());
  178.     }
  179.     return null;
  180.   }

  181.   /**
  182.    * Sets the value of ODFDOM attribute representation <code>DrawNavOrderAttribute</code> , See
  183.    * {@odf.attribute draw:nav-order}
  184.    *
  185.    * @param drawNavOrderValue The type is <code>String</code>
  186.    */
  187.   public void setDrawNavOrderAttribute(String drawNavOrderValue) {
  188.     DrawNavOrderAttribute attr = new DrawNavOrderAttribute((OdfFileDom) this.ownerDocument);
  189.     setOdfAttribute(attr);
  190.     attr.setValue(drawNavOrderValue);
  191.   }

  192.   /**
  193.    * Receives the value of the ODFDOM attribute representation <code>DrawStyleNameAttribute</code> ,
  194.    * See {@odf.attribute draw:style-name}
  195.    *
  196.    * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  197.    *     and no default value defined.
  198.    */
  199.   public String getDrawStyleNameAttribute() {
  200.     DrawStyleNameAttribute attr =
  201.         (DrawStyleNameAttribute) getOdfAttribute(OdfDocumentNamespace.DRAW, "style-name");
  202.     if (attr != null) {
  203.       return String.valueOf(attr.getValue());
  204.     }
  205.     return null;
  206.   }

  207.   /**
  208.    * Sets the value of ODFDOM attribute representation <code>DrawStyleNameAttribute</code> , See
  209.    * {@odf.attribute draw:style-name}
  210.    *
  211.    * @param drawStyleNameValue The type is <code>String</code>
  212.    */
  213.   public void setDrawStyleNameAttribute(String drawStyleNameValue) {
  214.     DrawStyleNameAttribute attr = new DrawStyleNameAttribute((OdfFileDom) this.ownerDocument);
  215.     setOdfAttribute(attr);
  216.     attr.setValue(drawStyleNameValue);
  217.   }

  218.   /**
  219.    * Receives the value of the ODFDOM attribute representation <code>
  220.    * PresentationPresentationPageLayoutNameAttribute</code> , See {@odf.attribute
  221.    * presentation:presentation-page-layout-name}
  222.    *
  223.    * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  224.    *     and no default value defined.
  225.    */
  226.   public String getPresentationPresentationPageLayoutNameAttribute() {
  227.     PresentationPresentationPageLayoutNameAttribute attr =
  228.         (PresentationPresentationPageLayoutNameAttribute)
  229.             getOdfAttribute(OdfDocumentNamespace.PRESENTATION, "presentation-page-layout-name");
  230.     if (attr != null) {
  231.       return String.valueOf(attr.getValue());
  232.     }
  233.     return null;
  234.   }

  235.   /**
  236.    * Sets the value of ODFDOM attribute representation <code>
  237.    * PresentationPresentationPageLayoutNameAttribute</code> , See {@odf.attribute
  238.    * presentation:presentation-page-layout-name}
  239.    *
  240.    * @param presentationPresentationPageLayoutNameValue The type is <code>String</code>
  241.    */
  242.   public void setPresentationPresentationPageLayoutNameAttribute(
  243.       String presentationPresentationPageLayoutNameValue) {
  244.     PresentationPresentationPageLayoutNameAttribute attr =
  245.         new PresentationPresentationPageLayoutNameAttribute((OdfFileDom) this.ownerDocument);
  246.     setOdfAttribute(attr);
  247.     attr.setValue(presentationPresentationPageLayoutNameValue);
  248.   }

  249.   /**
  250.    * Receives the value of the ODFDOM attribute representation <code>
  251.    * PresentationUseDateTimeNameAttribute</code> , See {@odf.attribute
  252.    * presentation:use-date-time-name}
  253.    *
  254.    * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  255.    *     and no default value defined.
  256.    */
  257.   public String getPresentationUseDateTimeNameAttribute() {
  258.     PresentationUseDateTimeNameAttribute attr =
  259.         (PresentationUseDateTimeNameAttribute)
  260.             getOdfAttribute(OdfDocumentNamespace.PRESENTATION, "use-date-time-name");
  261.     if (attr != null) {
  262.       return String.valueOf(attr.getValue());
  263.     }
  264.     return null;
  265.   }

  266.   /**
  267.    * Sets the value of ODFDOM attribute representation <code>PresentationUseDateTimeNameAttribute
  268.    * </code> , See {@odf.attribute presentation:use-date-time-name}
  269.    *
  270.    * @param presentationUseDateTimeNameValue The type is <code>String</code>
  271.    */
  272.   public void setPresentationUseDateTimeNameAttribute(String presentationUseDateTimeNameValue) {
  273.     PresentationUseDateTimeNameAttribute attr =
  274.         new PresentationUseDateTimeNameAttribute((OdfFileDom) this.ownerDocument);
  275.     setOdfAttribute(attr);
  276.     attr.setValue(presentationUseDateTimeNameValue);
  277.   }

  278.   /**
  279.    * Receives the value of the ODFDOM attribute representation <code>
  280.    * PresentationUseFooterNameAttribute</code> , See {@odf.attribute presentation:use-footer-name}
  281.    *
  282.    * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  283.    *     and no default value defined.
  284.    */
  285.   public String getPresentationUseFooterNameAttribute() {
  286.     PresentationUseFooterNameAttribute attr =
  287.         (PresentationUseFooterNameAttribute)
  288.             getOdfAttribute(OdfDocumentNamespace.PRESENTATION, "use-footer-name");
  289.     if (attr != null) {
  290.       return String.valueOf(attr.getValue());
  291.     }
  292.     return null;
  293.   }

  294.   /**
  295.    * Sets the value of ODFDOM attribute representation <code>PresentationUseFooterNameAttribute
  296.    * </code> , See {@odf.attribute presentation:use-footer-name}
  297.    *
  298.    * @param presentationUseFooterNameValue The type is <code>String</code>
  299.    */
  300.   public void setPresentationUseFooterNameAttribute(String presentationUseFooterNameValue) {
  301.     PresentationUseFooterNameAttribute attr =
  302.         new PresentationUseFooterNameAttribute((OdfFileDom) this.ownerDocument);
  303.     setOdfAttribute(attr);
  304.     attr.setValue(presentationUseFooterNameValue);
  305.   }

  306.   /**
  307.    * Receives the value of the ODFDOM attribute representation <code>
  308.    * PresentationUseHeaderNameAttribute</code> , See {@odf.attribute presentation:use-header-name}
  309.    *
  310.    * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  311.    *     and no default value defined.
  312.    */
  313.   public String getPresentationUseHeaderNameAttribute() {
  314.     PresentationUseHeaderNameAttribute attr =
  315.         (PresentationUseHeaderNameAttribute)
  316.             getOdfAttribute(OdfDocumentNamespace.PRESENTATION, "use-header-name");
  317.     if (attr != null) {
  318.       return String.valueOf(attr.getValue());
  319.     }
  320.     return null;
  321.   }

  322.   /**
  323.    * Sets the value of ODFDOM attribute representation <code>PresentationUseHeaderNameAttribute
  324.    * </code> , See {@odf.attribute presentation:use-header-name}
  325.    *
  326.    * @param presentationUseHeaderNameValue The type is <code>String</code>
  327.    */
  328.   public void setPresentationUseHeaderNameAttribute(String presentationUseHeaderNameValue) {
  329.     PresentationUseHeaderNameAttribute attr =
  330.         new PresentationUseHeaderNameAttribute((OdfFileDom) this.ownerDocument);
  331.     setOdfAttribute(attr);
  332.     attr.setValue(presentationUseHeaderNameValue);
  333.   }

  334.   /**
  335.    * Receives the value of the ODFDOM attribute representation <code>XmlIdAttribute</code> , See
  336.    * {@odf.attribute xml:id}
  337.    *
  338.    * @return - the <code>String</code> , the value or <code>null</code>, if the attribute is not set
  339.    *     and no default value defined.
  340.    */
  341.   public String getXmlIdAttribute() {
  342.     XmlIdAttribute attr = (XmlIdAttribute) getOdfAttribute(OdfDocumentNamespace.XML, "id");
  343.     if (attr != null) {
  344.       return String.valueOf(attr.getValue());
  345.     }
  346.     return null;
  347.   }

  348.   /**
  349.    * Sets the value of ODFDOM attribute representation <code>XmlIdAttribute</code> , See
  350.    * {@odf.attribute xml:id}
  351.    *
  352.    * @param xmlIdValue The type is <code>String</code>
  353.    */
  354.   public void setXmlIdAttribute(String xmlIdValue) {
  355.     XmlIdAttribute attr = new XmlIdAttribute((OdfFileDom) this.ownerDocument);
  356.     setOdfAttribute(attr);
  357.     attr.setValue(xmlIdValue);
  358.   }

  359.   /**
  360.    * Create child element {@odf.element anim:animate}.
  361.    *
  362.    * @param smilAttributeNameValue the <code>String</code> value of <code>SmilAttributeNameAttribute
  363.    *     </code>, see {@odf.attribute smil:attributeName} at specification
  364.    * @return the element {@odf.element anim:animate}
  365.    */
  366.   public AnimAnimateElement newAnimAnimateElement(String smilAttributeNameValue) {
  367.     AnimAnimateElement animAnimate =
  368.         ((OdfFileDom) this.ownerDocument).newOdfElement(AnimAnimateElement.class);
  369.     animAnimate.setSmilAttributeNameAttribute(smilAttributeNameValue);
  370.     this.appendChild(animAnimate);
  371.     return animAnimate;
  372.   }

  373.   /**
  374.    * Create child element {@odf.element anim:animateColor}.
  375.    *
  376.    * @param smilAttributeNameValue the <code>String</code> value of <code>SmilAttributeNameAttribute
  377.    *     </code>, see {@odf.attribute smil:attributeName} at specification
  378.    * @return the element {@odf.element anim:animateColor}
  379.    */
  380.   public AnimAnimateColorElement newAnimAnimateColorElement(String smilAttributeNameValue) {
  381.     AnimAnimateColorElement animAnimateColor =
  382.         ((OdfFileDom) this.ownerDocument).newOdfElement(AnimAnimateColorElement.class);
  383.     animAnimateColor.setSmilAttributeNameAttribute(smilAttributeNameValue);
  384.     this.appendChild(animAnimateColor);
  385.     return animAnimateColor;
  386.   }

  387.   /**
  388.    * Create child element {@odf.element anim:animateMotion}.
  389.    *
  390.    * @param smilAttributeNameValue the <code>String</code> value of <code>SmilAttributeNameAttribute
  391.    *     </code>, see {@odf.attribute smil:attributeName} at specification
  392.    * @return the element {@odf.element anim:animateMotion}
  393.    */
  394.   public AnimAnimateMotionElement newAnimAnimateMotionElement(String smilAttributeNameValue) {
  395.     AnimAnimateMotionElement animAnimateMotion =
  396.         ((OdfFileDom) this.ownerDocument).newOdfElement(AnimAnimateMotionElement.class);
  397.     animAnimateMotion.setSmilAttributeNameAttribute(smilAttributeNameValue);
  398.     this.appendChild(animAnimateMotion);
  399.     return animAnimateMotion;
  400.   }

  401.   /**
  402.    * Create child element {@odf.element anim:animateTransform}.
  403.    *
  404.    * @param smilAttributeNameValue the <code>String</code> value of <code>SmilAttributeNameAttribute
  405.    *     </code>, see {@odf.attribute smil:attributeName} at specification
  406.    * @param svgTypeValue the <code>String</code> value of <code>SvgTypeAttribute</code>, see
  407.    *     {@odf.attribute svg:type} at specification
  408.    * @return the element {@odf.element anim:animateTransform}
  409.    */
  410.   public AnimAnimateTransformElement newAnimAnimateTransformElement(
  411.       String smilAttributeNameValue, String svgTypeValue) {
  412.     AnimAnimateTransformElement animAnimateTransform =
  413.         ((OdfFileDom) this.ownerDocument).newOdfElement(AnimAnimateTransformElement.class);
  414.     animAnimateTransform.setSmilAttributeNameAttribute(smilAttributeNameValue);
  415.     animAnimateTransform.setSvgTypeAttribute(svgTypeValue);
  416.     this.appendChild(animAnimateTransform);
  417.     return animAnimateTransform;
  418.   }

  419.   /**
  420.    * Create child element {@odf.element anim:audio}.
  421.    *
  422.    * @return the element {@odf.element anim:audio}
  423.    */
  424.   public AnimAudioElement newAnimAudioElement() {
  425.     AnimAudioElement animAudio =
  426.         ((OdfFileDom) this.ownerDocument).newOdfElement(AnimAudioElement.class);
  427.     this.appendChild(animAudio);
  428.     return animAudio;
  429.   }

  430.   /**
  431.    * Create child element {@odf.element anim:command}.
  432.    *
  433.    * @param animCommandValue the <code>String</code> value of <code>AnimCommandAttribute</code>, see
  434.    *     {@odf.attribute anim:command} at specification
  435.    * @return the element {@odf.element anim:command}
  436.    */
  437.   public AnimCommandElement newAnimCommandElement(String animCommandValue) {
  438.     AnimCommandElement animCommand =
  439.         ((OdfFileDom) this.ownerDocument).newOdfElement(AnimCommandElement.class);
  440.     animCommand.setAnimCommandAttribute(animCommandValue);
  441.     this.appendChild(animCommand);
  442.     return animCommand;
  443.   }

  444.   /**
  445.    * Create child element {@odf.element anim:iterate}.
  446.    *
  447.    * @return the element {@odf.element anim:iterate}
  448.    */
  449.   public AnimIterateElement newAnimIterateElement() {
  450.     AnimIterateElement animIterate =
  451.         ((OdfFileDom) this.ownerDocument).newOdfElement(AnimIterateElement.class);
  452.     this.appendChild(animIterate);
  453.     return animIterate;
  454.   }

  455.   /**
  456.    * Create child element {@odf.element anim:par}.
  457.    *
  458.    * @return the element {@odf.element anim:par}
  459.    */
  460.   public AnimParElement newAnimParElement() {
  461.     AnimParElement animPar = ((OdfFileDom) this.ownerDocument).newOdfElement(AnimParElement.class);
  462.     this.appendChild(animPar);
  463.     return animPar;
  464.   }

  465.   /**
  466.    * Create child element {@odf.element anim:seq}.
  467.    *
  468.    * @return the element {@odf.element anim:seq}
  469.    */
  470.   public AnimSeqElement newAnimSeqElement() {
  471.     AnimSeqElement animSeq = ((OdfFileDom) this.ownerDocument).newOdfElement(AnimSeqElement.class);
  472.     this.appendChild(animSeq);
  473.     return animSeq;
  474.   }

  475.   /**
  476.    * Create child element {@odf.element anim:set}.
  477.    *
  478.    * @param smilAttributeNameValue the <code>String</code> value of <code>SmilAttributeNameAttribute
  479.    *     </code>, see {@odf.attribute smil:attributeName} at specification
  480.    * @return the element {@odf.element anim:set}
  481.    */
  482.   public AnimSetElement newAnimSetElement(String smilAttributeNameValue) {
  483.     AnimSetElement animSet = ((OdfFileDom) this.ownerDocument).newOdfElement(AnimSetElement.class);
  484.     animSet.setSmilAttributeNameAttribute(smilAttributeNameValue);
  485.     this.appendChild(animSet);
  486.     return animSet;
  487.   }

  488.   /**
  489.    * Create child element {@odf.element anim:transitionFilter}.
  490.    *
  491.    * @param smilTypeValue the <code>String</code> value of <code>SmilTypeAttribute</code>, see
  492.    *     {@odf.attribute smil:type} at specification
  493.    * @return the element {@odf.element anim:transitionFilter}
  494.    */
  495.   public AnimTransitionFilterElement newAnimTransitionFilterElement(String smilTypeValue) {
  496.     AnimTransitionFilterElement animTransitionFilter =
  497.         ((OdfFileDom) this.ownerDocument).newOdfElement(AnimTransitionFilterElement.class);
  498.     animTransitionFilter.setSmilTypeAttribute(smilTypeValue);
  499.     this.appendChild(animTransitionFilter);
  500.     return animTransitionFilter;
  501.   }

  502.   /**
  503.    * Create child element {@odf.element dr3d:scene}.
  504.    *
  505.    * @return the element {@odf.element dr3d:scene}
  506.    */
  507.   public Dr3dSceneElement newDr3dSceneElement() {
  508.     Dr3dSceneElement dr3dScene =
  509.         ((OdfFileDom) this.ownerDocument).newOdfElement(Dr3dSceneElement.class);
  510.     this.appendChild(dr3dScene);
  511.     return dr3dScene;
  512.   }

  513.   /**
  514.    * Create child element {@odf.element draw:a}.
  515.    *
  516.    * @param xlinkHrefValue the <code>String</code> value of <code>XlinkHrefAttribute</code>, see
  517.    *     {@odf.attribute xlink:href} at specification
  518.    * @param xlinkTypeValue the <code>String</code> value of <code>XlinkTypeAttribute</code>, see
  519.    *     {@odf.attribute xlink:type} at specification Child element is new in Odf 1.2
  520.    * @return the element {@odf.element draw:a}
  521.    */
  522.   public DrawAElement newDrawAElement(String xlinkHrefValue, String xlinkTypeValue) {
  523.     DrawAElement drawA = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawAElement.class);
  524.     drawA.setXlinkHrefAttribute(xlinkHrefValue);
  525.     drawA.setXlinkTypeAttribute(xlinkTypeValue);
  526.     this.appendChild(drawA);
  527.     return drawA;
  528.   }

  529.   /**
  530.    * Create child element {@odf.element draw:caption}.
  531.    *
  532.    * @return the element {@odf.element draw:caption}
  533.    */
  534.   public DrawCaptionElement newDrawCaptionElement() {
  535.     DrawCaptionElement drawCaption =
  536.         ((OdfFileDom) this.ownerDocument).newOdfElement(DrawCaptionElement.class);
  537.     this.appendChild(drawCaption);
  538.     return drawCaption;
  539.   }

  540.   /**
  541.    * Create child element {@odf.element draw:circle}.
  542.    *
  543.    * @return the element {@odf.element draw:circle}
  544.    */
  545.   public DrawCircleElement newDrawCircleElement() {
  546.     DrawCircleElement drawCircle =
  547.         ((OdfFileDom) this.ownerDocument).newOdfElement(DrawCircleElement.class);
  548.     this.appendChild(drawCircle);
  549.     return drawCircle;
  550.   }

  551.   /**
  552.    * Create child element {@odf.element draw:connector}.
  553.    *
  554.    * @param svgViewBoxValue the <code>Integer</code> value of <code>SvgViewBoxAttribute</code>, see
  555.    *     {@odf.attribute svg:viewBox} at specification
  556.    * @return the element {@odf.element draw:connector}
  557.    */
  558.   public DrawConnectorElement newDrawConnectorElement(int svgViewBoxValue) {
  559.     DrawConnectorElement drawConnector =
  560.         ((OdfFileDom) this.ownerDocument).newOdfElement(DrawConnectorElement.class);
  561.     drawConnector.setSvgViewBoxAttribute(svgViewBoxValue);
  562.     this.appendChild(drawConnector);
  563.     return drawConnector;
  564.   }

  565.   /**
  566.    * Create child element {@odf.element draw:control}.
  567.    *
  568.    * @param drawControlValue the <code>String</code> value of <code>DrawControlAttribute</code>, see
  569.    *     {@odf.attribute draw:control} at specification
  570.    * @return the element {@odf.element draw:control}
  571.    */
  572.   public DrawControlElement newDrawControlElement(String drawControlValue) {
  573.     DrawControlElement drawControl =
  574.         ((OdfFileDom) this.ownerDocument).newOdfElement(DrawControlElement.class);
  575.     drawControl.setDrawControlAttribute(drawControlValue);
  576.     this.appendChild(drawControl);
  577.     return drawControl;
  578.   }

  579.   /**
  580.    * Create child element {@odf.element draw:custom-shape}.
  581.    *
  582.    * @return the element {@odf.element draw:custom-shape}
  583.    */
  584.   public DrawCustomShapeElement newDrawCustomShapeElement() {
  585.     DrawCustomShapeElement drawCustomShape =
  586.         ((OdfFileDom) this.ownerDocument).newOdfElement(DrawCustomShapeElement.class);
  587.     this.appendChild(drawCustomShape);
  588.     return drawCustomShape;
  589.   }

  590.   /**
  591.    * Create child element {@odf.element draw:ellipse}.
  592.    *
  593.    * @return the element {@odf.element draw:ellipse}
  594.    */
  595.   public DrawEllipseElement newDrawEllipseElement() {
  596.     DrawEllipseElement drawEllipse =
  597.         ((OdfFileDom) this.ownerDocument).newOdfElement(DrawEllipseElement.class);
  598.     this.appendChild(drawEllipse);
  599.     return drawEllipse;
  600.   }

  601.   /**
  602.    * Create child element {@odf.element draw:frame}.
  603.    *
  604.    * @return the element {@odf.element draw:frame}
  605.    */
  606.   public DrawFrameElement newDrawFrameElement() {
  607.     DrawFrameElement drawFrame =
  608.         ((OdfFileDom) this.ownerDocument).newOdfElement(DrawFrameElement.class);
  609.     this.appendChild(drawFrame);
  610.     return drawFrame;
  611.   }

  612.   /**
  613.    * Create child element {@odf.element draw:g}.
  614.    *
  615.    * @return the element {@odf.element draw:g}
  616.    */
  617.   public DrawGElement newDrawGElement() {
  618.     DrawGElement drawG = ((OdfFileDom) this.ownerDocument).newOdfElement(DrawGElement.class);
  619.     this.appendChild(drawG);
  620.     return drawG;
  621.   }

  622.   /**
  623.    * Create child element {@odf.element draw:layer-set}.
  624.    *
  625.    * <p>Child element is new in Odf 1.2
  626.    *
  627.    * @return the element {@odf.element draw:layer-set}
  628.    */
  629.   public DrawLayerSetElement newDrawLayerSetElement() {
  630.     DrawLayerSetElement drawLayerSet =
  631.         ((OdfFileDom) this.ownerDocument).newOdfElement(DrawLayerSetElement.class);
  632.     this.appendChild(drawLayerSet);
  633.     return drawLayerSet;
  634.   }

  635.   /**
  636.    * Create child element {@odf.element draw:line}.
  637.    *
  638.    * @param svgX1Value the <code>String</code> value of <code>SvgX1Attribute</code>, see
  639.    *     {@odf.attribute svg:x1} at specification
  640.    * @param svgX2Value the <code>String</code> value of <code>SvgX2Attribute</code>, see
  641.    *     {@odf.attribute svg:x2} at specification
  642.    * @param svgY1Value the <code>String</code> value of <code>SvgY1Attribute</code>, see
  643.    *     {@odf.attribute svg:y1} at specification
  644.    * @param svgY2Value the <code>String</code> value of <code>SvgY2Attribute</code>, see
  645.    *     {@odf.attribute svg:y2} at specification
  646.    * @return the element {@odf.element draw:line}
  647.    */
  648.   public DrawLineElement newDrawLineElement(
  649.       String svgX1Value, String svgX2Value, String svgY1Value, String svgY2Value) {
  650.     DrawLineElement drawLine =
  651.         ((OdfFileDom) this.ownerDocument).newOdfElement(DrawLineElement.class);
  652.     drawLine.setSvgX1Attribute(svgX1Value);
  653.     drawLine.setSvgX2Attribute(svgX2Value);
  654.     drawLine.setSvgY1Attribute(svgY1Value);
  655.     drawLine.setSvgY2Attribute(svgY2Value);
  656.     this.appendChild(drawLine);
  657.     return drawLine;
  658.   }

  659.   /**
  660.    * Create child element {@odf.element draw:measure}.
  661.    *
  662.    * @param svgX1Value the <code>String</code> value of <code>SvgX1Attribute</code>, see
  663.    *     {@odf.attribute svg:x1} at specification
  664.    * @param svgX2Value the <code>String</code> value of <code>SvgX2Attribute</code>, see
  665.    *     {@odf.attribute svg:x2} at specification
  666.    * @param svgY1Value the <code>String</code> value of <code>SvgY1Attribute</code>, see
  667.    *     {@odf.attribute svg:y1} at specification
  668.    * @param svgY2Value the <code>String</code> value of <code>SvgY2Attribute</code>, see
  669.    *     {@odf.attribute svg:y2} at specification
  670.    * @return the element {@odf.element draw:measure}
  671.    */
  672.   public DrawMeasureElement newDrawMeasureElement(
  673.       String svgX1Value, String svgX2Value, String svgY1Value, String svgY2Value) {
  674.     DrawMeasureElement drawMeasure =
  675.         ((OdfFileDom) this.ownerDocument).newOdfElement(DrawMeasureElement.class);
  676.     drawMeasure.setSvgX1Attribute(svgX1Value);
  677.     drawMeasure.setSvgX2Attribute(svgX2Value);
  678.     drawMeasure.setSvgY1Attribute(svgY1Value);
  679.     drawMeasure.setSvgY2Attribute(svgY2Value);
  680.     this.appendChild(drawMeasure);
  681.     return drawMeasure;
  682.   }

  683.   /**
  684.    * Create child element {@odf.element draw:page-thumbnail}.
  685.    *
  686.    * @return the element {@odf.element draw:page-thumbnail}
  687.    */
  688.   public DrawPageThumbnailElement newDrawPageThumbnailElement() {
  689.     DrawPageThumbnailElement drawPageThumbnail =
  690.         ((OdfFileDom) this.ownerDocument).newOdfElement(DrawPageThumbnailElement.class);
  691.     this.appendChild(drawPageThumbnail);
  692.     return drawPageThumbnail;
  693.   }

  694.   /**
  695.    * Create child element {@odf.element draw:path}.
  696.    *
  697.    * @param svgDValue the <code>String</code> value of <code>SvgDAttribute</code>, see
  698.    *     {@odf.attribute svg:d} at specification
  699.    * @param svgViewBoxValue the <code>Integer</code> value of <code>SvgViewBoxAttribute</code>, see
  700.    *     {@odf.attribute svg:viewBox} at specification
  701.    * @return the element {@odf.element draw:path}
  702.    */
  703.   public DrawPathElement newDrawPathElement(String svgDValue, int svgViewBoxValue) {
  704.     DrawPathElement drawPath =
  705.         ((OdfFileDom) this.ownerDocument).newOdfElement(DrawPathElement.class);
  706.     drawPath.setSvgDAttribute(svgDValue);
  707.     drawPath.setSvgViewBoxAttribute(svgViewBoxValue);
  708.     this.appendChild(drawPath);
  709.     return drawPath;
  710.   }

  711.   /**
  712.    * Create child element {@odf.element draw:polygon}.
  713.    *
  714.    * @param drawPointsValue the <code>String</code> value of <code>DrawPointsAttribute</code>, see
  715.    *     {@odf.attribute draw:points} at specification
  716.    * @param svgViewBoxValue the <code>Integer</code> value of <code>SvgViewBoxAttribute</code>, see
  717.    *     {@odf.attribute svg:viewBox} at specification
  718.    * @return the element {@odf.element draw:polygon}
  719.    */
  720.   public DrawPolygonElement newDrawPolygonElement(String drawPointsValue, int svgViewBoxValue) {
  721.     DrawPolygonElement drawPolygon =
  722.         ((OdfFileDom) this.ownerDocument).newOdfElement(DrawPolygonElement.class);
  723.     drawPolygon.setDrawPointsAttribute(drawPointsValue);
  724.     drawPolygon.setSvgViewBoxAttribute(svgViewBoxValue);
  725.     this.appendChild(drawPolygon);
  726.     return drawPolygon;
  727.   }

  728.   /**
  729.    * Create child element {@odf.element draw:polyline}.
  730.    *
  731.    * @param drawPointsValue the <code>String</code> value of <code>DrawPointsAttribute</code>, see
  732.    *     {@odf.attribute draw:points} at specification
  733.    * @param svgViewBoxValue the <code>Integer</code> value of <code>SvgViewBoxAttribute</code>, see
  734.    *     {@odf.attribute svg:viewBox} at specification
  735.    * @return the element {@odf.element draw:polyline}
  736.    */
  737.   public DrawPolylineElement newDrawPolylineElement(String drawPointsValue, int svgViewBoxValue) {
  738.     DrawPolylineElement drawPolyline =
  739.         ((OdfFileDom) this.ownerDocument).newOdfElement(DrawPolylineElement.class);
  740.     drawPolyline.setDrawPointsAttribute(drawPointsValue);
  741.     drawPolyline.setSvgViewBoxAttribute(svgViewBoxValue);
  742.     this.appendChild(drawPolyline);
  743.     return drawPolyline;
  744.   }

  745.   /**
  746.    * Create child element {@odf.element draw:rect}.
  747.    *
  748.    * @return the element {@odf.element draw:rect}
  749.    */
  750.   public DrawRectElement newDrawRectElement() {
  751.     DrawRectElement drawRect =
  752.         ((OdfFileDom) this.ownerDocument).newOdfElement(DrawRectElement.class);
  753.     this.appendChild(drawRect);
  754.     return drawRect;
  755.   }

  756.   /**
  757.    * Create child element {@odf.element draw:regular-polygon}.
  758.    *
  759.    * @param drawConcaveValue the <code>Boolean</code> value of <code>DrawConcaveAttribute</code>,
  760.    *     see {@odf.attribute draw:concave} at specification
  761.    * @param drawCornersValue the <code>Integer</code> value of <code>DrawCornersAttribute</code>,
  762.    *     see {@odf.attribute draw:corners} at specification
  763.    * @return the element {@odf.element draw:regular-polygon}
  764.    */
  765.   public DrawRegularPolygonElement newDrawRegularPolygonElement(
  766.       boolean drawConcaveValue, int drawCornersValue) {
  767.     DrawRegularPolygonElement drawRegularPolygon =
  768.         ((OdfFileDom) this.ownerDocument).newOdfElement(DrawRegularPolygonElement.class);
  769.     drawRegularPolygon.setDrawConcaveAttribute(drawConcaveValue);
  770.     drawRegularPolygon.setDrawCornersAttribute(drawCornersValue);
  771.     this.appendChild(drawRegularPolygon);
  772.     return drawRegularPolygon;
  773.   }

  774.   /**
  775.    * Create child element {@odf.element office:forms}.
  776.    *
  777.    * @return the element {@odf.element office:forms}
  778.    */
  779.   public OfficeFormsElement newOfficeFormsElement() {
  780.     OfficeFormsElement officeForms =
  781.         ((OdfFileDom) this.ownerDocument).newOdfElement(OfficeFormsElement.class);
  782.     this.appendChild(officeForms);
  783.     return officeForms;
  784.   }

  785.   /**
  786.    * Create child element {@odf.element presentation:animations}.
  787.    *
  788.    * @return the element {@odf.element presentation:animations}
  789.    */
  790.   public PresentationAnimationsElement newPresentationAnimationsElement() {
  791.     PresentationAnimationsElement presentationAnimations =
  792.         ((OdfFileDom) this.ownerDocument).newOdfElement(PresentationAnimationsElement.class);
  793.     this.appendChild(presentationAnimations);
  794.     return presentationAnimations;
  795.   }

  796.   /**
  797.    * Create child element {@odf.element presentation:notes}.
  798.    *
  799.    * @return the element {@odf.element presentation:notes}
  800.    */
  801.   public PresentationNotesElement newPresentationNotesElement() {
  802.     PresentationNotesElement presentationNotes =
  803.         ((OdfFileDom) this.ownerDocument).newOdfElement(PresentationNotesElement.class);
  804.     this.appendChild(presentationNotes);
  805.     return presentationNotes;
  806.   }

  807.   /**
  808.    * Create child element {@odf.element svg:desc}.
  809.    *
  810.    * <p>Child element is new in Odf 1.2
  811.    *
  812.    * @return the element {@odf.element svg:desc}
  813.    */
  814.   public SvgDescElement newSvgDescElement() {
  815.     SvgDescElement svgDesc = ((OdfFileDom) this.ownerDocument).newOdfElement(SvgDescElement.class);
  816.     this.appendChild(svgDesc);
  817.     return svgDesc;
  818.   }

  819.   /**
  820.    * Create child element {@odf.element svg:title}.
  821.    *
  822.    * <p>Child element is new in Odf 1.2
  823.    *
  824.    * @return the element {@odf.element svg:title}
  825.    */
  826.   public SvgTitleElement newSvgTitleElement() {
  827.     SvgTitleElement svgTitle =
  828.         ((OdfFileDom) this.ownerDocument).newOdfElement(SvgTitleElement.class);
  829.     this.appendChild(svgTitle);
  830.     return svgTitle;
  831.   }

  832.   @Override
  833.   public void accept(ElementVisitor visitor) {
  834.     if (visitor instanceof DefaultElementVisitor) {
  835.       DefaultElementVisitor defaultVisitor = (DefaultElementVisitor) visitor;
  836.       defaultVisitor.visit(this);
  837.     } else {
  838.       visitor.visit(this);
  839.     }
  840.   }
  841. }