Class PackagePropertiesPart
java.lang.Object
org.apache.poi.openxml4j.opc.PackagePart
org.apache.poi.openxml4j.opc.internal.PackagePropertiesPart
- All Implemented Interfaces:
Comparable<PackagePart>
,PackageProperties
,RelationshipSource
Represents the core properties part of a package.
- Author:
- Julien Chable
-
Field Summary
FieldsModifier and TypeFieldDescriptionA categorization of the content of this package.The status of the content.The type of content represented, generally defined by a specific use and intended audience.Date of creation of the resource.An entity primarily responsible for making the content of the resource.An explanation of the content of the resource.An unambiguous reference to the resource within a given context.A delimited set of keywords to support searching and indexing.The language of the intellectual content of the resource.The user who performed the last modification.The date and time of the last printing.Date on which the resource was changed.static final String
static final String
static final String
The revision number.The topic of the content of the resource.The name given to the resource.The version number.Fields inherited from class org.apache.poi.openxml4j.opc.PackagePart
_container, _contentType, _partName
Fields inherited from interface org.apache.poi.openxml4j.opc.PackageProperties
NAMESPACE_DC, NAMESPACE_DCTERMS
-
Constructor Summary
ConstructorsConstructorDescriptionPackagePropertiesPart
(OPCPackage pack, PackagePartName partName) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close this part : flush this part, close the input stream and output stream.void
flush()
Flush the content of this part.Get the category property.Get content status.Get content type.Get created date.Get created date formated into a String.Get creator.Get description.Get identifier.protected InputStream
Method that gets the input stream for this part.Get keywords.Get the language.Get the author of last modifications.Get last printed date.Get last printed date formated into a String.Get modified date.Get modified date formated into a String.protected OutputStream
Method that gets the output stream for this part.Get revision.Get subject.Get title.Get version.boolean
load
(InputStream ios) Load the content of this part.boolean
save
(OutputStream zos) Save the content of this part and the associated relationships part (if this part own at least one relationship) into the specified output stream.void
setCategoryProperty
(String category) Set the category.void
setCategoryProperty
(Optional<String> category) Set the category.void
setContentStatusProperty
(String contentStatus) Set the content status.void
setContentStatusProperty
(Optional<String> contentStatus) Set the content status.void
setContentTypeProperty
(String contentType) Set the content type.void
setContentTypeProperty
(Optional<String> contentType) Set the content type.void
setCreatedProperty
(String created) Set the created date.void
setCreatedProperty
(Optional<Date> created) Set the created date.void
setCreatorProperty
(String creator) Set the creator.void
setCreatorProperty
(Optional<String> creator) Set the creator.void
setDescriptionProperty
(String description) Set the description.void
setDescriptionProperty
(Optional<String> description) Set the description.void
setIdentifierProperty
(String identifier) Set identifier.void
setIdentifierProperty
(Optional<String> identifier) Set identifier.void
setKeywordsProperty
(String keywords) Set keywords.void
setKeywordsProperty
(Optional<String> keywords) Set keywords.void
setLanguageProperty
(String language) Set language.void
setLanguageProperty
(Optional<String> language) Set language.void
setLastModifiedByProperty
(String lastModifiedBy) Set last modifications author.void
setLastModifiedByProperty
(Optional<String> lastModifiedBy) Set last modifications author.void
setLastPrintedProperty
(String lastPrinted) Set last printed date.void
setLastPrintedProperty
(Optional<Date> lastPrinted) Set last printed date.void
setModifiedProperty
(String modified) Set last modification date.void
setModifiedProperty
(Optional<Date> modified) Set last modification date.void
setRevisionProperty
(String revision) Set revision.void
setRevisionProperty
(Optional<String> revision) Set revision.void
setSubjectProperty
(String subject) Set subject.void
setSubjectProperty
(Optional<String> subject) Set subject.void
setTitleProperty
(String title) Set title.void
setTitleProperty
(Optional<String> title) Set title.void
setVersionProperty
(String version) Set version.void
setVersionProperty
(Optional<String> version) Set version.Methods inherited from class org.apache.poi.openxml4j.opc.PackagePart
addExternalRelationship, addExternalRelationship, addRelationship, addRelationship, addRelationship, addRelationship, clear, clearRelationships, compareTo, findExistingRelation, getContentType, getContentTypeDetails, getInputStream, getOutputStream, getPackage, getPartName, getRelatedPart, getRelationship, getRelationships, getRelationshipsByType, getSize, hasRelationships, isDeleted, isRelationshipExists, isRelationshipPart, removeRelationship, setContentType, setDeleted, toString
-
Field Details
-
NAMESPACE_DC_URI
- See Also:
-
NAMESPACE_CP_URI
- See Also:
-
NAMESPACE_DCTERMS_URI
- See Also:
-
category
A categorization of the content of this package. [Example: Example values for this property might include: Resume, Letter, Financial Forecast, Proposal, Technical Presentation, and so on. This value might be used by an application's user interface to facilitate navigation of a large set of documents. end example] -
contentStatus
The status of the content. [Example: Values might include "Draft", "Reviewed", and "Final". end example] -
contentType
The type of content represented, generally defined by a specific use and intended audience. [Example: Values might include "Whitepaper", "Security Bulletin", and "Exam". end example] [Note: This property is distinct from MIME content types as defined in RFC 2616. end note] -
created
Date of creation of the resource. -
creator
An entity primarily responsible for making the content of the resource. -
description
An explanation of the content of the resource. [Example: Values might include an abstract, table of contents, reference to a graphical representation of content, and a free-text account of the content. end example] -
identifier
An unambiguous reference to the resource within a given context. -
keywords
A delimited set of keywords to support searching and indexing. This is typically a list of terms that are not available elsewhere in the properties. -
language
The language of the intellectual content of the resource. [Note: IETF RFC 3066 provides guidance on encoding to represent languages. end note] -
lastModifiedBy
The user who performed the last modification. The identification is environment-specific. [Example: A name, email address, or employee ID. end example] It is recommended that this value be as concise as possible. -
lastPrinted
The date and time of the last printing. -
modified
Date on which the resource was changed. -
revision
The revision number. [Example: This value might indicate the number of saves or revisions, provided the application updates it after each revision. end example] -
subject
The topic of the content of the resource. -
title
The name given to the resource. -
version
The version number. This value is set by the user or by the application.
-
-
Constructor Details
-
PackagePropertiesPart
public PackagePropertiesPart(OPCPackage pack, PackagePartName partName) throws InvalidFormatException Constructor.- Parameters:
pack
- Container package.partName
- Name of this part.- Throws:
InvalidFormatException
- Throws if the content is invalid.
-
-
Method Details
-
getCategoryProperty
Get the category property.- Specified by:
getCategoryProperty
in interfacePackageProperties
- Returns:
- property value
- See Also:
-
getContentStatusProperty
Get content status.- Specified by:
getContentStatusProperty
in interfacePackageProperties
- Returns:
- property value
- See Also:
-
getContentTypeProperty
Get content type.- Specified by:
getContentTypeProperty
in interfacePackageProperties
- Returns:
- property value
- See Also:
-
getCreatedProperty
Get created date.- Specified by:
getCreatedProperty
in interfacePackageProperties
- Returns:
- property value
- See Also:
-
getCreatedPropertyString
Get created date formated into a String.- Returns:
- A string representation of the created date.
-
getCreatorProperty
Get creator.- Specified by:
getCreatorProperty
in interfacePackageProperties
- Returns:
- property value
- See Also:
-
getDescriptionProperty
Get description.- Specified by:
getDescriptionProperty
in interfacePackageProperties
- See Also:
-
getIdentifierProperty
Get identifier.- Specified by:
getIdentifierProperty
in interfacePackageProperties
- Returns:
- property value
- See Also:
-
getKeywordsProperty
Get keywords.- Specified by:
getKeywordsProperty
in interfacePackageProperties
- Returns:
- property value
- See Also:
-
getLanguageProperty
Get the language.- Specified by:
getLanguageProperty
in interfacePackageProperties
- Returns:
- property value
- See Also:
-
getLastModifiedByProperty
Get the author of last modifications.- Specified by:
getLastModifiedByProperty
in interfacePackageProperties
- See Also:
-
getLastPrintedProperty
Get last printed date.- Specified by:
getLastPrintedProperty
in interfacePackageProperties
- Returns:
- property value
- See Also:
-
getLastPrintedPropertyString
Get last printed date formated into a String.- Returns:
- A string representation of the last printed date.
-
getModifiedProperty
Get modified date.- Specified by:
getModifiedProperty
in interfacePackageProperties
- Returns:
- property value
- See Also:
-
getModifiedPropertyString
Get modified date formated into a String.- Returns:
- A string representation of the modified date.
-
getRevisionProperty
Get revision.- Specified by:
getRevisionProperty
in interfacePackageProperties
- Returns:
- property value
- See Also:
-
getSubjectProperty
Get subject.- Specified by:
getSubjectProperty
in interfacePackageProperties
- Returns:
- property value
- See Also:
-
getTitleProperty
Get title.- Specified by:
getTitleProperty
in interfacePackageProperties
- Returns:
- property value
- See Also:
-
getVersionProperty
Get version.- Specified by:
getVersionProperty
in interfacePackageProperties
- Returns:
- property value
- See Also:
-
setCategoryProperty
Set the category.- Specified by:
setCategoryProperty
in interfacePackageProperties
- See Also:
-
setCategoryProperty
Set the category.- Specified by:
setCategoryProperty
in interfacePackageProperties
- See Also:
-
setContentStatusProperty
Set the content status.- Specified by:
setContentStatusProperty
in interfacePackageProperties
- See Also:
-
setContentStatusProperty
Set the content status.- Specified by:
setContentStatusProperty
in interfacePackageProperties
- See Also:
-
setContentTypeProperty
Set the content type.- Specified by:
setContentTypeProperty
in interfacePackageProperties
- See Also:
-
setContentTypeProperty
Set the content type.- Specified by:
setContentTypeProperty
in interfacePackageProperties
- See Also:
-
setCreatedProperty
Set the created date.- Specified by:
setCreatedProperty
in interfacePackageProperties
- See Also:
-
setCreatedProperty
Set the created date.- Specified by:
setCreatedProperty
in interfacePackageProperties
- See Also:
-
setCreatorProperty
Set the creator.- Specified by:
setCreatorProperty
in interfacePackageProperties
- See Also:
-
setCreatorProperty
Set the creator.- Specified by:
setCreatorProperty
in interfacePackageProperties
- See Also:
-
setDescriptionProperty
Set the description.- Specified by:
setDescriptionProperty
in interfacePackageProperties
- See Also:
-
setDescriptionProperty
Set the description.- Specified by:
setDescriptionProperty
in interfacePackageProperties
- See Also:
-
setIdentifierProperty
Set identifier.- Specified by:
setIdentifierProperty
in interfacePackageProperties
- See Also:
-
setIdentifierProperty
Set identifier.- Specified by:
setIdentifierProperty
in interfacePackageProperties
- See Also:
-
setKeywordsProperty
Set keywords.- Specified by:
setKeywordsProperty
in interfacePackageProperties
- See Also:
-
setKeywordsProperty
Set keywords.- Specified by:
setKeywordsProperty
in interfacePackageProperties
- See Also:
-
setLanguageProperty
Set language.- Specified by:
setLanguageProperty
in interfacePackageProperties
- See Also:
-
setLanguageProperty
Set language.- Specified by:
setLanguageProperty
in interfacePackageProperties
- See Also:
-
setLastModifiedByProperty
Set last modifications author.- Specified by:
setLastModifiedByProperty
in interfacePackageProperties
- See Also:
-
setLastModifiedByProperty
Set last modifications author.- Specified by:
setLastModifiedByProperty
in interfacePackageProperties
- See Also:
-
setLastPrintedProperty
Set last printed date.- Specified by:
setLastPrintedProperty
in interfacePackageProperties
- See Also:
-
setLastPrintedProperty
Set last printed date.- Specified by:
setLastPrintedProperty
in interfacePackageProperties
- See Also:
-
setModifiedProperty
Set last modification date.- Specified by:
setModifiedProperty
in interfacePackageProperties
- See Also:
-
setModifiedProperty
Set last modification date.- Specified by:
setModifiedProperty
in interfacePackageProperties
- See Also:
-
setRevisionProperty
Set revision.- Specified by:
setRevisionProperty
in interfacePackageProperties
- See Also:
-
setRevisionProperty
Set revision.- Specified by:
setRevisionProperty
in interfacePackageProperties
- See Also:
-
setSubjectProperty
Set subject.- Specified by:
setSubjectProperty
in interfacePackageProperties
- See Also:
-
setSubjectProperty
Set subject.- Specified by:
setSubjectProperty
in interfacePackageProperties
- See Also:
-
setTitleProperty
Set title.- Specified by:
setTitleProperty
in interfacePackageProperties
- See Also:
-
setTitleProperty
Set title.- Specified by:
setTitleProperty
in interfacePackageProperties
- See Also:
-
setVersionProperty
Set version.- Specified by:
setVersionProperty
in interfacePackageProperties
- See Also:
-
setVersionProperty
Set version.- Specified by:
setVersionProperty
in interfacePackageProperties
- See Also:
-
getInputStreamImpl
Description copied from class:PackagePart
Method that gets the input stream for this part.- Specified by:
getInputStreamImpl
in classPackagePart
- Returns:
- input stream for this part
-
getOutputStreamImpl
Description copied from class:PackagePart
Method that gets the output stream for this part.- Specified by:
getOutputStreamImpl
in classPackagePart
- Returns:
- output stream for this part
-
save
Description copied from class:PackagePart
Save the content of this part and the associated relationships part (if this part own at least one relationship) into the specified output stream.- Specified by:
save
in classPackagePart
- Parameters:
zos
- Output stream to save this part.- Returns:
- boolean flag that shows if the save succeeded
-
load
Description copied from class:PackagePart
Load the content of this part.- Specified by:
load
in classPackagePart
- Parameters:
ios
- The input stream of the content to load.- Returns:
- true if the content has been successfully loaded, else false.
-
close
public void close()Description copied from class:PackagePart
Close this part : flush this part, close the input stream and output stream. After this method call, the part must be available for packaging.- Specified by:
close
in classPackagePart
-
flush
public void flush()Description copied from class:PackagePart
Flush the content of this part. If the input stream and/or output stream as in a waiting state to read or write, the must to empty their respective buffer.- Specified by:
flush
in classPackagePart
-