Package org.odftoolkit.odfdom.dom.element.dc

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


    TextPElement noteElement = OdfElement.findFirstChildNode(TextPElement.class, annotation);
    if (noteElement == null) {
      noteElement = annotation.newTextPElement();
    }
    noteElement.setTextContent(note);
    DcCreatorElement dcCreatorElement = OdfElement.findFirstChildNode(DcCreatorElement.class, annotation);
    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();
    }
View Full Code Here


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

   *
   * @param creator set the specified creator
   * @see org.odftoolkit.odfdom.dom.element.meta.DcCreatorElement.
   */
  public void setCreator(String creator) {
    DcCreatorElement creatorEle = OdfElement.findFirstChildNode(
        DcCreatorElement.class, mOfficeMetaElement);
    if (creatorEle == null) {
      creatorEle = mOfficeMetaElement.newDcCreatorElement();
    }
    creatorEle.setTextContent(creator);
  }
View Full Code Here

    // create annotation element
    OdfElement parentElement = getContainerElement();
    OdfFileDom dom = (OdfFileDom) parentElement.getOwnerDocument();
    OfficeAnnotationElement annotationElement = dom.newOdfElement(OfficeAnnotationElement.class);
    // set creator
    DcCreatorElement dcCreatorElement = annotationElement.newDcCreatorElement();
    if (creator == null) {
      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();
View Full Code Here

   * Child element is mandatory.
   *
   * @return the element {@odf.element dc:creator}
   */
  public DcCreatorElement newDcCreatorElement() {
    DcCreatorElement dcCreator = ((OdfFileDom) this.ownerDocument).newOdfElement(DcCreatorElement.class);
    this.appendChild(dcCreator);
    return dcCreator;
  }
View Full Code Here

   * Child element is new in Odf 1.2
   *
   * @return the element {@odf.element dc:creator}
   */
  public DcCreatorElement newDcCreatorElement() {
    DcCreatorElement dcCreator = ((OdfFileDom) this.ownerDocument).newOdfElement(DcCreatorElement.class);
    this.appendChild(dcCreator);
    return dcCreator;
  }
View Full Code Here

   * Create child element {@odf.element dc:creator}.
   *
   * @return the element {@odf.element dc:creator}
   */
  public DcCreatorElement newDcCreatorElement() {
    DcCreatorElement dcCreator = ((OdfFileDom) this.ownerDocument).newOdfElement(DcCreatorElement.class);
    this.appendChild(dcCreator);
    return dcCreator;
  }
View Full Code Here

TOP

Related Classes of org.odftoolkit.odfdom.dom.element.dc.DcCreatorElement

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.