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

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


   * 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

   * @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

   * 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

   * <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

   *
   * @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

   * 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

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

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.