Examples of DcDateElement


Examples of org.odftoolkit.odfdom.dom.element.dc.DcDateElement

      creator = System.getProperty("user.name");
    }
    dcCreatorElement.setTextContent(creator);
    // set date
    String dcDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(new Date());
    DcDateElement dcDateElement = annotationElement.newDcDateElement();
    dcDateElement.setTextContent(dcDate);
    TextPElement notePElement = annotationElement.newTextPElement();
    TextSpanElement noteSpanElement = notePElement.newTextSpanElement();
    // set comment style
    OdfOfficeAutomaticStyles styles = null;
    if (dom instanceof OdfContentDom) {
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.dc.DcDateElement

      creator = System.getProperty("user.name");
    }
    dcCreatorElement.setTextContent(creator);
    // set date
    String dcDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(new Date());
    DcDateElement dcDateElement = annotationElement.newDcDateElement();
    dcDateElement.setTextContent(dcDate);
    TextPElement notePElement = annotationElement.newTextPElement();
    TextSpanElement noteSpanElement = notePElement.newTextSpanElement();
    // set comment style
    OdfOfficeAutomaticStyles styles = null;
    if (dom instanceof OdfContentDom) {
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.dc.DcDateElement

    if (dcCreatorElement == null) {
      dcCreatorElement = annotation.newDcCreatorElement();
    }
    dcCreatorElement.setTextContent(System.getProperty("user.name"));
    String dcDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(new Date());
    DcDateElement dcDateElement = OdfElement.findFirstChildNode(DcDateElement.class, annotation);
    if (dcDateElement == null) {
      dcDateElement = annotation.newDcDateElement();
    }
    dcDateElement.setTextContent(dcDate);
    mCellElement.appendChild(annotation);
  }
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.dc.DcDateElement

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

Examples of org.odftoolkit.odfdom.dom.element.dc.DcDateElement

   * <code>DcDateElement</code> , See {@odf.element dc:date}.
   *
   * @param date  the date and time need to set. NULL will remove the element from the meta.xml.
   */
  public void setDate(Calendar date) {
    DcDateElement dcDateEle = OdfElement.findFirstChildNode(
        DcDateElement.class, mOfficeMetaElement);
    if (date == null) {
      if (dcDateEle != null) {
        mOfficeMetaElement.removeChild(dcDateEle);
      }
    } else {
      if (dcDateEle == null) {
        dcDateEle = mOfficeMetaElement.newDcDateElement();
      }
      dcDateEle.setTextContent(calendarToString(date));
    }
  }
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.dc.DcDateElement

      creator = System.getProperty("user.name");
    }
    dcCreatorElement.setTextContent(creator);
    // set date
    String dcDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(new Date());
    DcDateElement dcDateElement = annotationElement.newDcDateElement();
    dcDateElement.setTextContent(dcDate);
    TextPElement notePElement = annotationElement.newTextPElement();
    TextSpanElement noteSpanElement = notePElement.newTextSpanElement();
    // set comment style
    OdfOfficeAutomaticStyles styles = null;
    if (dom instanceof OdfContentDom) {
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.dc.DcDateElement

    if (dcCreatorElement == null) {
      dcCreatorElement = annotation.newDcCreatorElement();
    }
    dcCreatorElement.setTextContent(System.getProperty("user.name"));
    String dcDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(new Date());
    DcDateElement dcDateElement = OdfElement.findFirstChildNode(DcDateElement.class, annotation);
    if (dcDateElement == null) {
      dcDateElement = annotation.newDcDateElement();
    }
    dcDateElement.setTextContent(dcDate);
    mCellElement.appendChild(annotation);
  }
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.dc.DcDateElement

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

Examples of org.odftoolkit.odfdom.dom.element.dc.DcDateElement

   * <code>DcDateElement</code> , See {@odf.element dc:date}.
   *
   * @param date  the date and time need to set. NULL will remove the element from the meta.xml.
   */
  public void setDate(Calendar date) {
    DcDateElement dcDateEle = OdfElement.findFirstChildNode(
        DcDateElement.class, mOfficeMetaElement);
    if (date == null) {
      if (dcDateEle != null) {
        mOfficeMetaElement.removeChild(dcDateEle);
      }
    } else {
      if (dcDateEle == null) {
        dcDateEle = mOfficeMetaElement.newDcDateElement();
      }
      dcDateEle.setTextContent(calendarToString(date));
    }
  }
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.dc.DcDateElement

      creator = System.getProperty("user.name");
    }
    dcCreatorElement.setTextContent(creator);
    // set date
    String dcDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(new Date());
    DcDateElement dcDateElement = annotationElement.newDcDateElement();
    dcDateElement.setTextContent(dcDate);
    TextPElement notePElement = annotationElement.newTextPElement();
    TextSpanElement noteSpanElement = notePElement.newTextSpanElement();
    // set comment style
    OdfOfficeAutomaticStyles styles = null;
    if (dom instanceof OdfContentDom) {
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.