Package org.odftoolkit.odfdom.dom.element.meta

Examples of org.odftoolkit.odfdom.dom.element.meta.MetaEditingDurationElement


   * @return the total time spent editing the document;
   * <p>
   * <code>null</code>, if the element is not set.
   */
  public Duration getEditingDuration() {
    MetaEditingDurationElement editiingDurationEle = OdfElement.findFirstChildNode(MetaEditingDurationElement.class,
        mOfficeMetaElement);
    if (editiingDurationEle != null) {
      return Duration.valueOf(editiingDurationEle.getTextContent());
    }
    return null;
  }
View Full Code Here


   *  meta:editing-duration}.
   *
   * @param editingDuration the time need to set. NULL will remove the element from the meta.xml.
   */
  public void setEditingDuration(Duration editingDuration) {
    MetaEditingDurationElement editingDurationEle = OdfElement.findFirstChildNode(MetaEditingDurationElement.class,
        mOfficeMetaElement);
    if (editingDuration == null) {
      if (editingDurationEle != null) {
        mOfficeMetaElement.removeChild(editingDurationEle);
      }
    } else {
      if (editingDurationEle == null) {
        editingDurationEle = mOfficeMetaElement.newMetaEditingDurationElement();
      }
      editingDurationEle.setTextContent(editingDuration.toString());
    }
  }
View Full Code Here

   * @return the total time spent editing the document;
   * <p>
   * <code>null</code>, if the element is not set.
   */
  public Duration getEditingDuration() {
    MetaEditingDurationElement editiingDurationEle = OdfElement.findFirstChildNode(MetaEditingDurationElement.class,
        mOfficeMetaElement);
    if (editiingDurationEle != null) {
      return Duration.valueOf(editiingDurationEle.getTextContent());
    }
    return null;
  }
View Full Code Here

   *  meta:editing-duration}.
   *
   * @param editingDuration the time need to set. NULL will remove the element from the meta.xml.
   */
  public void setEditingDuration(Duration editingDuration) {
    MetaEditingDurationElement editingDurationEle = OdfElement.findFirstChildNode(MetaEditingDurationElement.class,
        mOfficeMetaElement);
    if (editingDuration == null) {
      if (editingDurationEle != null) {
        mOfficeMetaElement.removeChild(editingDurationEle);
      }
    } else {
      if (editingDurationEle == null) {
        editingDurationEle = mOfficeMetaElement.newMetaEditingDurationElement();
      }
      editingDurationEle.setTextContent(editingDuration.toString());
    }
  }
View Full Code Here

   * <p>
   * <code>null</code>, if the element is not set.
   * @see org.odftoolkit.odfdom.dom.element.meta.MetaEditingDurationElement
   */
  public Duration getEditingDuration() {
    MetaEditingDurationElement editiingDurationEle = OdfElement.findFirstChildNode(MetaEditingDurationElement.class,
        mOfficeMetaElement);
    if (editiingDurationEle != null) {
      return Duration.valueOf(editiingDurationEle.getTextContent());
    }
    return null;
  }
View Full Code Here

   *
   * @param editingDuration the time need to set
   * @see org.odftoolkit.odfdom.dom.element.meta.MetaEditingDurationElement
   */
  public void setEditingDuration(Duration editingDuration) {
    MetaEditingDurationElement editiingDurationEle = OdfElement.findFirstChildNode(MetaEditingDurationElement.class,
        mOfficeMetaElement);
    if (editiingDurationEle == null) {
      editiingDurationEle = mOfficeMetaElement.newMetaEditingDurationElement();
    }
    editiingDurationEle.setTextContent(editingDuration.toString());

  }
View Full Code Here

   * Child element is new in Odf 1.2
   *
   * @return the element {@odf.element meta:editing-duration}
   */
  public MetaEditingDurationElement newMetaEditingDurationElement() {
    MetaEditingDurationElement metaEditingDuration = ((OdfFileDom) this.ownerDocument).newOdfElement(MetaEditingDurationElement.class);
    this.appendChild(metaEditingDuration);
    return metaEditingDuration;
  }
View Full Code Here

TOP

Related Classes of org.odftoolkit.odfdom.dom.element.meta.MetaEditingDurationElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.