TableTargetRangeAddressElement.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.table;

  29. import org.odftoolkit.odfdom.dom.DefaultElementVisitor;
  30. import org.odftoolkit.odfdom.dom.OdfDocumentNamespace;
  31. import org.odftoolkit.odfdom.dom.attribute.table.TableColumnAttribute;
  32. import org.odftoolkit.odfdom.dom.attribute.table.TableEndColumnAttribute;
  33. import org.odftoolkit.odfdom.dom.attribute.table.TableEndRowAttribute;
  34. import org.odftoolkit.odfdom.dom.attribute.table.TableEndTableAttribute;
  35. import org.odftoolkit.odfdom.dom.attribute.table.TableRowAttribute;
  36. import org.odftoolkit.odfdom.dom.attribute.table.TableStartColumnAttribute;
  37. import org.odftoolkit.odfdom.dom.attribute.table.TableStartRowAttribute;
  38. import org.odftoolkit.odfdom.dom.attribute.table.TableStartTableAttribute;
  39. import org.odftoolkit.odfdom.dom.attribute.table.TableTableAttribute;
  40. import org.odftoolkit.odfdom.pkg.ElementVisitor;
  41. import org.odftoolkit.odfdom.pkg.OdfElement;
  42. import org.odftoolkit.odfdom.pkg.OdfFileDom;
  43. import org.odftoolkit.odfdom.pkg.OdfName;

  44. /** DOM implementation of OpenDocument element {@odf.element table:target-range-address}. */
  45. public class TableTargetRangeAddressElement extends OdfElement {

  46.   public static final OdfName ELEMENT_NAME =
  47.       OdfName.newName(OdfDocumentNamespace.TABLE, "target-range-address");

  48.   /**
  49.    * Create the instance of <code>TableTargetRangeAddressElement</code>
  50.    *
  51.    * @param ownerDoc The type is <code>OdfFileDom</code>
  52.    */
  53.   public TableTargetRangeAddressElement(OdfFileDom ownerDoc) {
  54.     super(ownerDoc, ELEMENT_NAME);
  55.   }

  56.   /**
  57.    * Get the element name
  58.    *
  59.    * @return return <code>OdfName</code> the name of element {@odf.element
  60.    *     table:target-range-address}.
  61.    */
  62.   public OdfName getOdfName() {
  63.     return ELEMENT_NAME;
  64.   }

  65.   /**
  66.    * Receives the value of the ODFDOM attribute representation <code>TableColumnAttribute</code> ,
  67.    * See {@odf.attribute table:column}
  68.    *
  69.    * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not
  70.    *     set and no default value defined.
  71.    */
  72.   public Integer getTableColumnAttribute() {
  73.     TableColumnAttribute attr =
  74.         (TableColumnAttribute) getOdfAttribute(OdfDocumentNamespace.TABLE, "column");
  75.     if (attr != null) {
  76.       return Integer.valueOf(attr.intValue());
  77.     }
  78.     return null;
  79.   }

  80.   /**
  81.    * Sets the value of ODFDOM attribute representation <code>TableColumnAttribute</code> , See
  82.    * {@odf.attribute table:column}
  83.    *
  84.    * @param tableColumnValue The type is <code>Integer</code>
  85.    */
  86.   public void setTableColumnAttribute(Integer tableColumnValue) {
  87.     TableColumnAttribute attr = new TableColumnAttribute((OdfFileDom) this.ownerDocument);
  88.     setOdfAttribute(attr);
  89.     attr.setIntValue(tableColumnValue.intValue());
  90.   }

  91.   /**
  92.    * Receives the value of the ODFDOM attribute representation <code>TableEndColumnAttribute</code>
  93.    * , See {@odf.attribute table:end-column}
  94.    *
  95.    * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not
  96.    *     set and no default value defined.
  97.    */
  98.   public Integer getTableEndColumnAttribute() {
  99.     TableEndColumnAttribute attr =
  100.         (TableEndColumnAttribute) getOdfAttribute(OdfDocumentNamespace.TABLE, "end-column");
  101.     if (attr != null) {
  102.       return Integer.valueOf(attr.intValue());
  103.     }
  104.     return null;
  105.   }

  106.   /**
  107.    * Sets the value of ODFDOM attribute representation <code>TableEndColumnAttribute</code> , See
  108.    * {@odf.attribute table:end-column}
  109.    *
  110.    * @param tableEndColumnValue The type is <code>Integer</code>
  111.    */
  112.   public void setTableEndColumnAttribute(Integer tableEndColumnValue) {
  113.     TableEndColumnAttribute attr = new TableEndColumnAttribute((OdfFileDom) this.ownerDocument);
  114.     setOdfAttribute(attr);
  115.     attr.setIntValue(tableEndColumnValue.intValue());
  116.   }

  117.   /**
  118.    * Receives the value of the ODFDOM attribute representation <code>TableEndRowAttribute</code> ,
  119.    * See {@odf.attribute table:end-row}
  120.    *
  121.    * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not
  122.    *     set and no default value defined.
  123.    */
  124.   public Integer getTableEndRowAttribute() {
  125.     TableEndRowAttribute attr =
  126.         (TableEndRowAttribute) getOdfAttribute(OdfDocumentNamespace.TABLE, "end-row");
  127.     if (attr != null) {
  128.       return Integer.valueOf(attr.intValue());
  129.     }
  130.     return null;
  131.   }

  132.   /**
  133.    * Sets the value of ODFDOM attribute representation <code>TableEndRowAttribute</code> , See
  134.    * {@odf.attribute table:end-row}
  135.    *
  136.    * @param tableEndRowValue The type is <code>Integer</code>
  137.    */
  138.   public void setTableEndRowAttribute(Integer tableEndRowValue) {
  139.     TableEndRowAttribute attr = new TableEndRowAttribute((OdfFileDom) this.ownerDocument);
  140.     setOdfAttribute(attr);
  141.     attr.setIntValue(tableEndRowValue.intValue());
  142.   }

  143.   /**
  144.    * Receives the value of the ODFDOM attribute representation <code>TableEndTableAttribute</code> ,
  145.    * See {@odf.attribute table:end-table}
  146.    *
  147.    * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not
  148.    *     set and no default value defined.
  149.    */
  150.   public Integer getTableEndTableAttribute() {
  151.     TableEndTableAttribute attr =
  152.         (TableEndTableAttribute) getOdfAttribute(OdfDocumentNamespace.TABLE, "end-table");
  153.     if (attr != null) {
  154.       return Integer.valueOf(attr.intValue());
  155.     }
  156.     return null;
  157.   }

  158.   /**
  159.    * Sets the value of ODFDOM attribute representation <code>TableEndTableAttribute</code> , See
  160.    * {@odf.attribute table:end-table}
  161.    *
  162.    * @param tableEndTableValue The type is <code>Integer</code>
  163.    */
  164.   public void setTableEndTableAttribute(Integer tableEndTableValue) {
  165.     TableEndTableAttribute attr = new TableEndTableAttribute((OdfFileDom) this.ownerDocument);
  166.     setOdfAttribute(attr);
  167.     attr.setIntValue(tableEndTableValue.intValue());
  168.   }

  169.   /**
  170.    * Receives the value of the ODFDOM attribute representation <code>TableRowAttribute</code> , See
  171.    * {@odf.attribute table:row}
  172.    *
  173.    * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not
  174.    *     set and no default value defined.
  175.    */
  176.   public Integer getTableRowAttribute() {
  177.     TableRowAttribute attr = (TableRowAttribute) getOdfAttribute(OdfDocumentNamespace.TABLE, "row");
  178.     if (attr != null) {
  179.       return Integer.valueOf(attr.intValue());
  180.     }
  181.     return null;
  182.   }

  183.   /**
  184.    * Sets the value of ODFDOM attribute representation <code>TableRowAttribute</code> , See
  185.    * {@odf.attribute table:row}
  186.    *
  187.    * @param tableRowValue The type is <code>Integer</code>
  188.    */
  189.   public void setTableRowAttribute(Integer tableRowValue) {
  190.     TableRowAttribute attr = new TableRowAttribute((OdfFileDom) this.ownerDocument);
  191.     setOdfAttribute(attr);
  192.     attr.setIntValue(tableRowValue.intValue());
  193.   }

  194.   /**
  195.    * Receives the value of the ODFDOM attribute representation <code>TableStartColumnAttribute
  196.    * </code> , See {@odf.attribute table:start-column}
  197.    *
  198.    * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not
  199.    *     set and no default value defined.
  200.    */
  201.   public Integer getTableStartColumnAttribute() {
  202.     TableStartColumnAttribute attr =
  203.         (TableStartColumnAttribute) getOdfAttribute(OdfDocumentNamespace.TABLE, "start-column");
  204.     if (attr != null) {
  205.       return Integer.valueOf(attr.intValue());
  206.     }
  207.     return null;
  208.   }

  209.   /**
  210.    * Sets the value of ODFDOM attribute representation <code>TableStartColumnAttribute</code> , See
  211.    * {@odf.attribute table:start-column}
  212.    *
  213.    * @param tableStartColumnValue The type is <code>Integer</code>
  214.    */
  215.   public void setTableStartColumnAttribute(Integer tableStartColumnValue) {
  216.     TableStartColumnAttribute attr = new TableStartColumnAttribute((OdfFileDom) this.ownerDocument);
  217.     setOdfAttribute(attr);
  218.     attr.setIntValue(tableStartColumnValue.intValue());
  219.   }

  220.   /**
  221.    * Receives the value of the ODFDOM attribute representation <code>TableStartRowAttribute</code> ,
  222.    * See {@odf.attribute table:start-row}
  223.    *
  224.    * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not
  225.    *     set and no default value defined.
  226.    */
  227.   public Integer getTableStartRowAttribute() {
  228.     TableStartRowAttribute attr =
  229.         (TableStartRowAttribute) getOdfAttribute(OdfDocumentNamespace.TABLE, "start-row");
  230.     if (attr != null) {
  231.       return Integer.valueOf(attr.intValue());
  232.     }
  233.     return null;
  234.   }

  235.   /**
  236.    * Sets the value of ODFDOM attribute representation <code>TableStartRowAttribute</code> , See
  237.    * {@odf.attribute table:start-row}
  238.    *
  239.    * @param tableStartRowValue The type is <code>Integer</code>
  240.    */
  241.   public void setTableStartRowAttribute(Integer tableStartRowValue) {
  242.     TableStartRowAttribute attr = new TableStartRowAttribute((OdfFileDom) this.ownerDocument);
  243.     setOdfAttribute(attr);
  244.     attr.setIntValue(tableStartRowValue.intValue());
  245.   }

  246.   /**
  247.    * Receives the value of the ODFDOM attribute representation <code>TableStartTableAttribute</code>
  248.    * , See {@odf.attribute table:start-table}
  249.    *
  250.    * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not
  251.    *     set and no default value defined.
  252.    */
  253.   public Integer getTableStartTableAttribute() {
  254.     TableStartTableAttribute attr =
  255.         (TableStartTableAttribute) getOdfAttribute(OdfDocumentNamespace.TABLE, "start-table");
  256.     if (attr != null) {
  257.       return Integer.valueOf(attr.intValue());
  258.     }
  259.     return null;
  260.   }

  261.   /**
  262.    * Sets the value of ODFDOM attribute representation <code>TableStartTableAttribute</code> , See
  263.    * {@odf.attribute table:start-table}
  264.    *
  265.    * @param tableStartTableValue The type is <code>Integer</code>
  266.    */
  267.   public void setTableStartTableAttribute(Integer tableStartTableValue) {
  268.     TableStartTableAttribute attr = new TableStartTableAttribute((OdfFileDom) this.ownerDocument);
  269.     setOdfAttribute(attr);
  270.     attr.setIntValue(tableStartTableValue.intValue());
  271.   }

  272.   /**
  273.    * Receives the value of the ODFDOM attribute representation <code>TableTableAttribute</code> ,
  274.    * See {@odf.attribute table:table}
  275.    *
  276.    * @return - the <code>Integer</code> , the value or <code>null</code>, if the attribute is not
  277.    *     set and no default value defined.
  278.    */
  279.   public Integer getTableTableAttribute() {
  280.     TableTableAttribute attr =
  281.         (TableTableAttribute) getOdfAttribute(OdfDocumentNamespace.TABLE, "table");
  282.     if (attr != null) {
  283.       return Integer.valueOf(attr.intValue());
  284.     }
  285.     return null;
  286.   }

  287.   /**
  288.    * Sets the value of ODFDOM attribute representation <code>TableTableAttribute</code> , See
  289.    * {@odf.attribute table:table}
  290.    *
  291.    * @param tableTableValue The type is <code>Integer</code>
  292.    */
  293.   public void setTableTableAttribute(Integer tableTableValue) {
  294.     TableTableAttribute attr = new TableTableAttribute((OdfFileDom) this.ownerDocument);
  295.     setOdfAttribute(attr);
  296.     attr.setIntValue(tableTableValue.intValue());
  297.   }

  298.   @Override
  299.   public void accept(ElementVisitor visitor) {
  300.     if (visitor instanceof DefaultElementVisitor) {
  301.       DefaultElementVisitor defaultVisitor = (DefaultElementVisitor) visitor;
  302.       defaultVisitor.visit(this);
  303.     } else {
  304.       visitor.visit(this);
  305.     }
  306.   }
  307. }