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.
-
Field Summary
FieldsFields 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 TypeMethodDescriptionvoidclose()Close this part : flush this part, close the input stream and output stream.voidflush()Flush the content of this part.Get the category property.Get content status.Get content type.Get created date.Get created date formatted into a String.Get creator.Get description.Get identifier.Get keywords.Get the language.Get the author of last modifications.Get last printed date.Get last printed date formatted into a String.Get modified date.Get modified date formatted into a String.Get revision.Get subject.Get title.Get version.booleanload(InputStream ios) Load the content of this part.booleansave(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.voidsetCategoryProperty(String category) Set the category.voidsetCategoryProperty(Optional<String> category) Set the category.voidsetContentStatusProperty(String contentStatus) Set the content status.voidsetContentStatusProperty(Optional<String> contentStatus) Set the content status.voidsetContentTypeProperty(String contentType) Set the content type.voidsetContentTypeProperty(Optional<String> contentType) Set the content type.voidsetCreatedProperty(String created) Set the created date.voidsetCreatedProperty(Optional<Date> created) Set the created date.voidsetCreatorProperty(String creator) Set the creator.voidsetCreatorProperty(Optional<String> creator) Set the creator.voidsetDescriptionProperty(String description) Set the description.voidsetDescriptionProperty(Optional<String> description) Set the description.voidsetIdentifierProperty(String identifier) Set identifier.voidsetIdentifierProperty(Optional<String> identifier) Set identifier.voidsetKeywordsProperty(String keywords) Set keywords.voidsetKeywordsProperty(Optional<String> keywords) Set keywords.voidsetLanguageProperty(String language) Set language.voidsetLanguageProperty(Optional<String> language) Set language.voidsetLastModifiedByProperty(String lastModifiedBy) Set last modifications author.voidsetLastModifiedByProperty(Optional<String> lastModifiedBy) Set last modifications author.voidsetLastPrintedProperty(String lastPrinted) Set last printed date.voidsetLastPrintedProperty(Optional<Date> lastPrinted) Set last printed date.voidsetModifiedProperty(String modified) Set last modification date.voidsetModifiedProperty(Optional<Date> modified) Set last modification date.voidsetRevisionProperty(String revision) Set revision.voidsetRevisionProperty(Optional<String> revision) Set revision.voidsetSubjectProperty(String subject) Set subject.voidsetSubjectProperty(Optional<String> subject) Set subject.voidsetTitleProperty(String title) Set title.voidsetTitleProperty(Optional<String> title) Set title.voidsetVersionProperty(String version) Set version.voidsetVersionProperty(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:
-
-
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:
getCategoryPropertyin interfacePackageProperties- Returns:
- property value
-
getContentStatusProperty
Get content status.- Specified by:
getContentStatusPropertyin interfacePackageProperties- Returns:
- property value
-
getContentTypeProperty
Get content type.- Specified by:
getContentTypePropertyin interfacePackageProperties- Returns:
- property value
-
getCreatedProperty
Get created date.- Specified by:
getCreatedPropertyin interfacePackageProperties- Returns:
- property value
-
getCreatedPropertyString
Get created date formatted into a String.- Returns:
- A string representation of the created date.
-
getCreatorProperty
Get creator.- Specified by:
getCreatorPropertyin interfacePackageProperties- Returns:
- property value
-
getDescriptionProperty
Get description.- Specified by:
getDescriptionPropertyin interfacePackageProperties
-
getIdentifierProperty
Get identifier.- Specified by:
getIdentifierPropertyin interfacePackageProperties- Returns:
- property value
-
getKeywordsProperty
Get keywords.- Specified by:
getKeywordsPropertyin interfacePackageProperties- Returns:
- property value
-
getLanguageProperty
Get the language.- Specified by:
getLanguagePropertyin interfacePackageProperties- Returns:
- property value
-
getLastModifiedByProperty
Get the author of last modifications.- Specified by:
getLastModifiedByPropertyin interfacePackageProperties
-
getLastPrintedProperty
Get last printed date.- Specified by:
getLastPrintedPropertyin interfacePackageProperties- Returns:
- property value
-
getLastPrintedPropertyString
Get last printed date formatted into a String.- Returns:
- A string representation of the last printed date.
-
getModifiedProperty
Get modified date.- Specified by:
getModifiedPropertyin interfacePackageProperties- Returns:
- property value
-
getModifiedPropertyString
Get modified date formatted into a String.- Returns:
- A string representation of the modified date.
-
getRevisionProperty
Get revision.- Specified by:
getRevisionPropertyin interfacePackageProperties- Returns:
- property value
-
getSubjectProperty
Get subject.- Specified by:
getSubjectPropertyin interfacePackageProperties- Returns:
- property value
-
getTitleProperty
Get title.- Specified by:
getTitlePropertyin interfacePackageProperties- Returns:
- property value
-
getVersionProperty
Get version.- Specified by:
getVersionPropertyin interfacePackageProperties- Returns:
- property value
-
setCategoryProperty
Set the category.- Specified by:
setCategoryPropertyin interfacePackageProperties
-
setCategoryProperty
Set the category.- Specified by:
setCategoryPropertyin interfacePackageProperties
-
setContentStatusProperty
Set the content status.- Specified by:
setContentStatusPropertyin interfacePackageProperties
-
setContentStatusProperty
Set the content status.- Specified by:
setContentStatusPropertyin interfacePackageProperties
-
setContentTypeProperty
Set the content type.- Specified by:
setContentTypePropertyin interfacePackageProperties
-
setContentTypeProperty
Set the content type.- Specified by:
setContentTypePropertyin interfacePackageProperties
-
setCreatedProperty
Set the created date.- Specified by:
setCreatedPropertyin interfacePackageProperties- Throws:
InvalidFormatException- only since POI 5.2.0, used to throw unchecked exception IllegalArgumentException if format was invalid- See Also:
-
setCreatedProperty
Set the created date.- Specified by:
setCreatedPropertyin interfacePackageProperties
-
setCreatorProperty
Set the creator.- Specified by:
setCreatorPropertyin interfacePackageProperties
-
setCreatorProperty
Set the creator.- Specified by:
setCreatorPropertyin interfacePackageProperties
-
setDescriptionProperty
Set the description.- Specified by:
setDescriptionPropertyin interfacePackageProperties
-
setDescriptionProperty
Set the description.- Specified by:
setDescriptionPropertyin interfacePackageProperties
-
setIdentifierProperty
Set identifier.- Specified by:
setIdentifierPropertyin interfacePackageProperties
-
setIdentifierProperty
Set identifier.- Specified by:
setIdentifierPropertyin interfacePackageProperties
-
setKeywordsProperty
Set keywords.- Specified by:
setKeywordsPropertyin interfacePackageProperties
-
setKeywordsProperty
Set keywords.- Specified by:
setKeywordsPropertyin interfacePackageProperties
-
setLanguageProperty
Set language.- Specified by:
setLanguagePropertyin interfacePackageProperties
-
setLanguageProperty
Set language.- Specified by:
setLanguagePropertyin interfacePackageProperties
-
setLastModifiedByProperty
Set last modifications author.- Specified by:
setLastModifiedByPropertyin interfacePackageProperties
-
setLastModifiedByProperty
Set last modifications author.- Specified by:
setLastModifiedByPropertyin interfacePackageProperties
-
setLastPrintedProperty
Set last printed date.- Specified by:
setLastPrintedPropertyin interfacePackageProperties- Throws:
InvalidFormatException- only since POI 5.2.0, used to throw unchecked exception IllegalArgumentException if format was invalid- See Also:
-
setLastPrintedProperty
Set last printed date.- Specified by:
setLastPrintedPropertyin interfacePackageProperties
-
setModifiedProperty
Set last modification date.- Specified by:
setModifiedPropertyin interfacePackageProperties- Throws:
InvalidFormatException- only since POI 5.2.0, used to throw unchecked exception IllegalArgumentException if format was invalid- See Also:
-
setModifiedProperty
Set last modification date.- Specified by:
setModifiedPropertyin interfacePackageProperties
-
setRevisionProperty
Set revision.- Specified by:
setRevisionPropertyin interfacePackageProperties
-
setRevisionProperty
Set revision.- Specified by:
setRevisionPropertyin interfacePackageProperties
-
setSubjectProperty
Set subject.- Specified by:
setSubjectPropertyin interfacePackageProperties
-
setSubjectProperty
Set subject.- Specified by:
setSubjectPropertyin interfacePackageProperties
-
setTitleProperty
Set title.- Specified by:
setTitlePropertyin interfacePackageProperties
-
setTitleProperty
Set title.- Specified by:
setTitlePropertyin interfacePackageProperties
-
setVersionProperty
Set version.- Specified by:
setVersionPropertyin interfacePackageProperties
-
setVersionProperty
Set version.- Specified by:
setVersionPropertyin interfacePackageProperties
-
save
Description copied from class:PackagePartSave 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:
savein classPackagePart- Parameters:
zos- Output stream to save this part.- Returns:
- true if the content has been successfully stored, false otherwise. More information about errors may be logged via Log4j 2.
-
load
Description copied from class:PackagePartLoad the content of this part.- Specified by:
loadin classPackagePart- Parameters:
ios- The input stream of the content to load.- Returns:
- true if the content has been successfully loaded, false otherwise. More information about errors may be logged via Log4j 2.
-
close
public void close()Description copied from class:PackagePartClose 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:
closein classPackagePart
-
flush
public void flush()Description copied from class:PackagePartFlush 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:
flushin classPackagePart
-