WordProcessingPackage
Inheritance: java.lang.Object, com.groupdocs.metadata.core.MetadataPackage, com.groupdocs.metadata.core.CustomPackage, com.groupdocs.metadata.core.DocumentPackage
public class WordProcessingPackage extends DocumentPackage
Represents a native metadata package in a word processing document.
Learn more
This code sample shows how to update built-in metadata properties in a WordProcessing document.
try (Metadata metadata = new Metadata(Constants.InputDoc)) { WordProcessingRootPackage root = metadata.getRootPackageGeneric(); root.getDocumentProperties().setAuthor(“test author”); root.getDocumentProperties().setCreatedTime(new Date()); root.getDocumentProperties().setCompany(“GroupDocs”); root.getDocumentProperties().setCategory(“test category”); root.getDocumentProperties().setKeywords(“metadata, built-in, update”); // … metadata.save(Constants.OutputDoc); }
Methods
Method | Description |
---|---|
getAuthor() | Gets the document’s author. |
setAuthor(String value) | Sets the document’s author. |
getBytesInDocument() | Gets an estimate of the number of bytes in the document. |
getCategory() | Gets the category. |
setCategory(String value) | Sets the category. |
getComments() | Gets the comments. |
setComments(String value) | Sets the comments. |
getCompany() | Gets the company. |
setCompany(String value) | Sets the company. |
getContentStatus() | Gets the content status. |
setContentStatus(String value) | Sets the content status. |
getContentType() | Gets the content type of the document. |
setContentType(String value) | Sets the content type of the document. |
getCreatedTime() | Gets the document created date. |
setCreatedTime(Date value) | Sets the document created date. |
getHyperlinkBase() | Gets the hyperlink base. |
setHyperlinkBase(String value) | Sets the hyperlink base. |
getKeywords() | Gets the keywords. |
setKeywords(String value) | Sets the keywords. |
getSubject() | Gets the subject. |
setSubject(String value) | Sets the subject. |
getTemplate() | Gets the template. |
setTemplate(String value) | Sets the template. |
getLastPrintedDate() | Gets the last printed date. |
setLastPrintedDate(Date value) | Sets the last printed date. |
getLastSavedBy() | Gets the name of the last author. |
setLastSavedBy(String value) | Sets the name of the last author. |
getLastSavedTime() | Gets the time of the last save. |
setLastSavedTime(Date value) | Sets the time of the last save. |
getManager() | Gets the manager. |
setManager(String value) | Sets the manager. |
getNameOfApplication() | Gets the name of the application. |
getRevisionNumber() | Gets the revision number. |
setRevisionNumber(Integer value) | Sets the revision number. |
getVersion() | Gets the version number of the application that created the document. |
getTotalEditingTime() | Gets the total editing time in minutes. |
setTotalEditingTime(Integer value) | Sets the total editing time in minutes. |
getTitle() | Gets the title of the document. |
setTitle(String value) | Sets the title of the document. |
getLinksUpToDate() | Gets a value indicating whether the hyperlinks in the document are up-to-date. |
setLinksUpToDate(Boolean value) | Sets a value indicating whether the hyperlinks in the document are up-to-date. |
getTitlesOfParts() | Gets the titles of document parts. |
getWords() | Gets an estimate of the number of words in the document. |
set(String propertyName, String value) | Adds or replaces the metadata property with the specified name. |
set(String propertyName, boolean value) | Adds or replaces the metadata property with the specified name. |
set(String propertyName, Date value) | Adds or replaces the metadata property with the specified name. |
set(String propertyName, int value) | Adds or replaces the metadata property with the specified name. |
set(String propertyName, double value) | Adds or replaces the metadata property with the specified name. |
getAuthor()
public final String getAuthor()
Gets the document’s author.
Returns: java.lang.String - The author.
setAuthor(String value)
public final void setAuthor(String value)
Sets the document’s author.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The author. |
getBytesInDocument()
public final Integer getBytesInDocument()
Gets an estimate of the number of bytes in the document.
Returns: java.lang.Integer - An estimate of the number of bytes in the document.
getCategory()
public final String getCategory()
Gets the category.
Returns: java.lang.String - The category.
setCategory(String value)
public final void setCategory(String value)
Sets the category.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The category. |
getComments()
public final String getComments()
Gets the comments.
Returns: java.lang.String - The comments.
setComments(String value)
public final void setComments(String value)
Sets the comments.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The comments. |
getCompany()
public final String getCompany()
Gets the company.
Returns: java.lang.String - The company.
setCompany(String value)
public final void setCompany(String value)
Sets the company.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The company. |
getContentStatus()
public final String getContentStatus()
Gets the content status.
Returns: java.lang.String - The content status.
setContentStatus(String value)
public final void setContentStatus(String value)
Sets the content status.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The content status. |
getContentType()
public final String getContentType()
Gets the content type of the document.
Returns: java.lang.String - The type of the content.
setContentType(String value)
public final void setContentType(String value)
Sets the content type of the document.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The type of the content. |
getCreatedTime()
public final Date getCreatedTime()
Gets the document created date.
Returns: java.util.Date - The created time.
setCreatedTime(Date value)
public final void setCreatedTime(Date value)
Sets the document created date.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.util.Date | The created time. |
getHyperlinkBase()
public final String getHyperlinkBase()
Gets the hyperlink base.
Returns: java.lang.String - The hyperlink base.
setHyperlinkBase(String value)
public final void setHyperlinkBase(String value)
Sets the hyperlink base.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The hyperlink base. |
getKeywords()
public final String getKeywords()
Gets the keywords.
Returns: java.lang.String - The keywords.
setKeywords(String value)
public final void setKeywords(String value)
Sets the keywords.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The keywords. |
getSubject()
public final String getSubject()
Gets the subject.
Returns: java.lang.String - The subject.
setSubject(String value)
public final void setSubject(String value)
Sets the subject.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The subject. |
getTemplate()
public final String getTemplate()
Gets the template.
Returns: java.lang.String - The template.
setTemplate(String value)
public final void setTemplate(String value)
Sets the template.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The template. |
getLastPrintedDate()
public final Date getLastPrintedDate()
Gets the last printed date.
Returns: java.util.Date - The last printed date.
setLastPrintedDate(Date value)
public final void setLastPrintedDate(Date value)
Sets the last printed date.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.util.Date | The last printed date. |
getLastSavedBy()
public final String getLastSavedBy()
Gets the name of the last author.
Returns: java.lang.String - The name of the last author.
setLastSavedBy(String value)
public final void setLastSavedBy(String value)
Sets the name of the last author.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The name of the last author. |
getLastSavedTime()
public final Date getLastSavedTime()
Gets the time of the last save.
Returns: java.util.Date - The time of the last save.
setLastSavedTime(Date value)
public final void setLastSavedTime(Date value)
Sets the time of the last save.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.util.Date | The time of the last save. |
getManager()
public final String getManager()
Gets the manager.
Returns: java.lang.String - The manager.
setManager(String value)
public final void setManager(String value)
Sets the manager.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The manager. |
getNameOfApplication()
public final String getNameOfApplication()
Gets the name of the application.
Returns: java.lang.String - The name of the application.
getRevisionNumber()
public final Integer getRevisionNumber()
Gets the revision number.
Returns: java.lang.Integer - The revision number.
setRevisionNumber(Integer value)
public final void setRevisionNumber(Integer value)
Sets the revision number.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.Integer | The revision number. |
getVersion()
public final Integer getVersion()
Gets the version number of the application that created the document.
Returns: java.lang.Integer - The version number of the application that created the document.
When a document was created by Microsoft Word, then high 16 bit represent the major version and low 16 bit represent the build number.
getTotalEditingTime()
public final Integer getTotalEditingTime()
Gets the total editing time in minutes.
Returns: java.lang.Integer - The total editing time in minutes.
setTotalEditingTime(Integer value)
public final void setTotalEditingTime(Integer value)
Sets the total editing time in minutes.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.Integer | The total editing time in minutes. |
getTitle()
public final String getTitle()
Gets the title of the document.
Returns: java.lang.String - The title of the document.
setTitle(String value)
public final void setTitle(String value)
Sets the title of the document.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | The title of the document. |
getLinksUpToDate()
public final Boolean getLinksUpToDate()
Gets a value indicating whether the hyperlinks in the document are up-to-date.
Returns: java.lang.Boolean - A value indicating whether the hyperlinks in the document are up-to-date.
setLinksUpToDate(Boolean value)
public final void setLinksUpToDate(Boolean value)
Sets a value indicating whether the hyperlinks in the document are up-to-date.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.Boolean | A value indicating whether the hyperlinks in the document are up-to-date. |
getTitlesOfParts()
public final String[] getTitlesOfParts()
Gets the titles of document parts. Read-only.
Returns: java.lang.String[] - The titles of document parts.
getWords()
public final Integer getWords()
Gets an estimate of the number of words in the document.
Returns: java.lang.Integer - The number of words in the document.
set(String propertyName, String value)
public final void set(String propertyName, String value)
Adds or replaces the metadata property with the specified name.
Parameters:
Parameter | Type | Description |
---|---|---|
propertyName | java.lang.String | The property name. |
value | java.lang.String | The property value. |
set(String propertyName, boolean value)
public final void set(String propertyName, boolean value)
Adds or replaces the metadata property with the specified name.
Parameters:
Parameter | Type | Description |
---|---|---|
propertyName | java.lang.String | The property name. |
value | boolean | The property value. |
set(String propertyName, Date value)
public final void set(String propertyName, Date value)
Adds or replaces the metadata property with the specified name.
Parameters:
Parameter | Type | Description |
---|---|---|
propertyName | java.lang.String | The property name. |
value | java.util.Date | The property value. |
set(String propertyName, int value)
public final void set(String propertyName, int value)
Adds or replaces the metadata property with the specified name.
Parameters:
Parameter | Type | Description |
---|---|---|
propertyName | java.lang.String | The property name. |
value | int | The property value. |
set(String propertyName, double value)
public final void set(String propertyName, double value)
Adds or replaces the metadata property with the specified name.
Parameters:
Parameter | Type | Description |
---|---|---|
propertyName | java.lang.String | The property name. |
value | double | The property value. |