Examples of MetaCreationDateElement


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

   * @return the date and time when the document was created initially;
   * <p>
   * <code>null</code>, if element is not set
   */
  public Calendar getCreationDate() {
    MetaCreationDateElement creationDateEle = OdfElement.findFirstChildNode(MetaCreationDateElement.class,
        mOfficeMetaElement);
    if (creationDateEle != null) {
      return stringToCalendar(creationDateEle.getTextContent());
    }
    return null;
  }
View Full Code Here

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

   * meta:creation-date}.
   *
   * @param creationDate  the date and time need to set. NULL will remove the element from the meta.xml.
   */
  public void setCreationDate(Calendar creationDate) {
    MetaCreationDateElement creationDateEle = OdfElement.findFirstChildNode(MetaCreationDateElement.class,
        mOfficeMetaElement);
    if (creationDate == null) {
      if (creationDateEle != null) {
        mOfficeMetaElement.removeChild(creationDateEle);
      }
    } else {
      if (creationDateEle == null) {
        creationDateEle = mOfficeMetaElement.newMetaCreationDateElement();
      }
      creationDateEle.setTextContent(calendarToString(creationDate));
    }
  }
View Full Code Here

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

   * @return the date and time when the document was created initially;
   * <p>
   * <code>null</code>, if element is not set
   */
  public Calendar getCreationDate() {
    MetaCreationDateElement creationDateEle = OdfElement.findFirstChildNode(MetaCreationDateElement.class,
        mOfficeMetaElement);
    if (creationDateEle != null) {
      return stringToCalendar(creationDateEle.getTextContent());
    }
    return null;
  }
View Full Code Here

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

   * meta:creation-date}.
   *
   * @param creationDate  the date and time need to set. NULL will remove the element from the meta.xml.
   */
  public void setCreationDate(Calendar creationDate) {
    MetaCreationDateElement creationDateEle = OdfElement.findFirstChildNode(MetaCreationDateElement.class,
        mOfficeMetaElement);
    if (creationDate == null) {
      if (creationDateEle != null) {
        mOfficeMetaElement.removeChild(creationDateEle);
      }
    } else {
      if (creationDateEle == null) {
        creationDateEle = mOfficeMetaElement.newMetaCreationDateElement();
      }
      creationDateEle.setTextContent(calendarToString(creationDate));
    }
  }
View Full Code Here

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

   * <p>
   * <code>null</code>, if element is not set
   * @see org.odftoolkit.odfdom.dom.element.meta.MetaCreationDateElement.
   */
  public Calendar getCreationDate() {
    MetaCreationDateElement creationDateEle = OdfElement.findFirstChildNode(MetaCreationDateElement.class,
        mOfficeMetaElement);
    if (creationDateEle != null) {
      return stringToCalendar(creationDateEle.getTextContent());
    }
    return null;
  }
View Full Code Here

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

   *
   * @param creationDate  the date and time need to set
   * @see org.odftoolkit.odfdom.dom.element.meta.MetaCreationDateElement.
   */
  public void setCreationDate(Calendar creationDate) {
    MetaCreationDateElement creationDateEle = OdfElement.findFirstChildNode(MetaCreationDateElement.class,
        mOfficeMetaElement);
    if (creationDateEle == null) {
      creationDateEle = mOfficeMetaElement.newMetaCreationDateElement();
    }
    creationDateEle.setTextContent(calendarToString(creationDate));
  }
View Full Code Here

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

   * Child element is new in Odf 1.2
   *
   * @return the element {@odf.element meta:creation-date}
   */
  public MetaCreationDateElement newMetaCreationDateElement() {
    MetaCreationDateElement metaCreationDate = ((OdfFileDom) this.ownerDocument).newOdfElement(MetaCreationDateElement.class);
    this.appendChild(metaCreationDate);
    return metaCreationDate;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.