All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kz.greetgo.msoffice.docx.CoreProperties Maven / Gradle / Ivy

There is a newer version: 0.5.9
Show newest version
package kz.greetgo.msoffice.docx;

import kz.greetgo.msoffice.util.UtilOffice;

import java.io.PrintStream;
import java.util.Date;

public class CoreProperties implements ContentElement {
  private final String partName;
  private String title = "";
  private String subject = "";
  private String creator = "greetgo";
  private String keywords = "";
  private String description = "";
  private String lastModifiedBy = "greetgo";
  private String revision = "1";
  private Date created = new Date();
  private Date modified = new Date();

  CoreProperties(String partName) {
    this.partName = partName;
  }

  @Override
  public String getPartName() {
    return partName;
  }

  @Override
  public void write(PrintStream out) {
    out.print("\n");
    out.print("");

    out.print("" + getTitle() + "");
    out.print("" + getSubject() + "");
    out.print("" + getCreator() + "");
    out.print("" + getKeywords() + "");
    out.print("" + getDescription() + "");
    out.print("" + getLastModifiedBy() + "");
    out.print("" + getRevision() + "");
    out.print("" + UtilOffice.toW3CDTF(getCreated())
      + "");
    out.print("" + UtilOffice.toW3CDTF(getModified())
      + "");

    out.print("");
  }

  public String getTitle() {
    return title;
  }

  public void setTitle(String title) {
    this.title = title;
  }

  public String getSubject() {
    return subject;
  }

  public void setSubject(String subject) {
    this.subject = subject;
  }

  public String getKeywords() {
    return keywords;
  }

  public void setKeywords(String keywords) {
    this.keywords = keywords;
  }

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public String getLastModifiedBy() {
    return lastModifiedBy;
  }

  public void setLastModifiedBy(String lastModifiedBy) {
    this.lastModifiedBy = lastModifiedBy;
  }

  public String getRevision() {
    return revision;
  }

  public void setRevision(String revision) {
    this.revision = revision;
  }

  public Date getCreated() {
    return created;
  }

  public void setCreated(Date created) {
    this.created = created;
  }

  public Date getModified() {
    return modified;
  }

  public void setModified(Date modified) {
    this.modified = modified;
  }

  public void setCreator(String creator) {
    this.creator = creator;
  }

  public String getCreator() {
    return creator;
  }

  @Override
  public ContentType getContentType() {
    return ContentType.CORE_PROPERTIES;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy