public final class PackagePropertiesPart extends PackagePart implements PackageProperties
Modifier and Type | Field and Description |
---|---|
protected Optional<String> |
category
A categorization of the content of this package.
|
protected Optional<String> |
contentStatus
The status of the content.
|
protected Optional<String> |
contentType
The type of content represented, generally defined by a specific use and
intended audience.
|
protected Optional<Date> |
created
Date of creation of the resource.
|
protected Optional<String> |
creator
An entity primarily responsible for making the content of the resource.
|
protected Optional<String> |
description
An explanation of the content of the resource.
|
protected Optional<String> |
identifier
An unambiguous reference to the resource within a given context.
|
protected Optional<String> |
keywords
A delimited set of keywords to support searching and indexing.
|
protected Optional<String> |
language
The language of the intellectual content of the resource.
|
protected Optional<String> |
lastModifiedBy
The user who performed the last modification.
|
protected Optional<Date> |
lastPrinted
The date and time of the last printing.
|
protected Optional<Date> |
modified
Date on which the resource was changed.
|
static String |
NAMESPACE_CP_URI |
static String |
NAMESPACE_DC_URI |
static String |
NAMESPACE_DCTERMS_URI |
protected Optional<String> |
revision
The revision number.
|
protected Optional<String> |
subject
The topic of the content of the resource.
|
protected Optional<String> |
title
The name given to the resource.
|
protected Optional<String> |
version
The version number.
|
_container, _contentType, _partName
NAMESPACE_DC, NAMESPACE_DCTERMS
Constructor and Description |
---|
PackagePropertiesPart(OPCPackage pack,
PackagePartName partName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this part : flush this part, close the input stream and output
stream.
|
void |
flush()
Flush the content of this part.
|
Optional<String> |
getCategoryProperty()
Get the category property.
|
Optional<String> |
getContentStatusProperty()
Get content status.
|
Optional<String> |
getContentTypeProperty()
Get content type.
|
Optional<Date> |
getCreatedProperty()
Get created date.
|
String |
getCreatedPropertyString()
Get created date formated into a String.
|
Optional<String> |
getCreatorProperty()
Get creator.
|
Optional<String> |
getDescriptionProperty()
Get description.
|
Optional<String> |
getIdentifierProperty()
Get identifier.
|
protected InputStream |
getInputStreamImpl()
Method that gets the input stream for this part.
|
Optional<String> |
getKeywordsProperty()
Get keywords.
|
Optional<String> |
getLanguageProperty()
Get the language.
|
Optional<String> |
getLastModifiedByProperty()
Get the author of last modifications.
|
Optional<Date> |
getLastPrintedProperty()
Get last printed date.
|
String |
getLastPrintedPropertyString()
Get last printed date formated into a String.
|
Optional<Date> |
getModifiedProperty()
Get modified date.
|
String |
getModifiedPropertyString()
Get modified date formated into a String.
|
protected OutputStream |
getOutputStreamImpl()
Method that gets the output stream for this part.
|
Optional<String> |
getRevisionProperty()
Get revision.
|
Optional<String> |
getSubjectProperty()
Get subject.
|
Optional<String> |
getTitleProperty()
Get title.
|
Optional<String> |
getVersionProperty()
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(Optional<String> category)
Set the category.
|
void |
setCategoryProperty(String category)
Set the category.
|
void |
setContentStatusProperty(Optional<String> contentStatus)
Set the content status.
|
void |
setContentStatusProperty(String contentStatus)
Set the content status.
|
void |
setContentTypeProperty(Optional<String> contentType)
Set the content type.
|
void |
setContentTypeProperty(String contentType)
Set the content type.
|
void |
setCreatedProperty(Optional<Date> created)
Set the created date.
|
void |
setCreatedProperty(String created)
Set the created date.
|
void |
setCreatorProperty(Optional<String> creator)
Set the creator.
|
void |
setCreatorProperty(String creator)
Set the creator.
|
void |
setDescriptionProperty(Optional<String> description)
Set the description.
|
void |
setDescriptionProperty(String description)
Set the description.
|
void |
setIdentifierProperty(Optional<String> identifier)
Set identifier.
|
void |
setIdentifierProperty(String identifier)
Set identifier.
|
void |
setKeywordsProperty(Optional<String> keywords)
Set keywords.
|
void |
setKeywordsProperty(String keywords)
Set keywords.
|
void |
setLanguageProperty(Optional<String> language)
Set language.
|
void |
setLanguageProperty(String language)
Set language.
|
void |
setLastModifiedByProperty(Optional<String> lastModifiedBy)
Set last modifications author.
|
void |
setLastModifiedByProperty(String lastModifiedBy)
Set last modifications author.
|
void |
setLastPrintedProperty(Optional<Date> lastPrinted)
Set last printed date.
|
void |
setLastPrintedProperty(String lastPrinted)
Set last printed date.
|
void |
setModifiedProperty(Optional<Date> modified)
Set last modification date.
|
void |
setModifiedProperty(String modified)
Set last modification date.
|
void |
setRevisionProperty(Optional<String> revision)
Set revision.
|
void |
setRevisionProperty(String revision)
Set revision.
|
void |
setSubjectProperty(Optional<String> subject)
Set subject.
|
void |
setSubjectProperty(String subject)
Set subject.
|
void |
setTitleProperty(Optional<String> title)
Set title.
|
void |
setTitleProperty(String title)
Set title.
|
void |
setVersionProperty(Optional<String> version)
Set version.
|
void |
setVersionProperty(String version)
Set version.
|
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
public static final String NAMESPACE_DC_URI
public static final String NAMESPACE_CP_URI
public static final String NAMESPACE_DCTERMS_URI
protected Optional<String> category
protected Optional<String> contentStatus
protected Optional<String> contentType
protected Optional<String> creator
protected Optional<String> description
protected Optional<String> identifier
protected Optional<String> keywords
protected Optional<String> language
protected Optional<String> lastModifiedBy
protected Optional<String> revision
public PackagePropertiesPart(OPCPackage pack, PackagePartName partName) throws InvalidFormatException
pack
- Container package.partName
- Name of this part.InvalidFormatException
- Throws if the content is invalid.public Optional<String> getCategoryProperty()
getCategoryProperty
in interface PackageProperties
PackageProperties.getCategoryProperty()
public Optional<String> getContentStatusProperty()
getContentStatusProperty
in interface PackageProperties
PackageProperties.getContentStatusProperty()
public Optional<String> getContentTypeProperty()
getContentTypeProperty
in interface PackageProperties
PackageProperties.getContentTypeProperty()
public Optional<Date> getCreatedProperty()
getCreatedProperty
in interface PackageProperties
PackageProperties.getCreatedProperty()
public String getCreatedPropertyString()
public Optional<String> getCreatorProperty()
getCreatorProperty
in interface PackageProperties
PackageProperties.getCreatorProperty()
public Optional<String> getDescriptionProperty()
getDescriptionProperty
in interface PackageProperties
PackageProperties.getDescriptionProperty()
public Optional<String> getIdentifierProperty()
getIdentifierProperty
in interface PackageProperties
PackageProperties.getIdentifierProperty()
public Optional<String> getKeywordsProperty()
getKeywordsProperty
in interface PackageProperties
PackageProperties.getKeywordsProperty()
public Optional<String> getLanguageProperty()
getLanguageProperty
in interface PackageProperties
PackageProperties.getLanguageProperty()
public Optional<String> getLastModifiedByProperty()
getLastModifiedByProperty
in interface PackageProperties
PackageProperties.getLastModifiedByProperty()
public Optional<Date> getLastPrintedProperty()
getLastPrintedProperty
in interface PackageProperties
PackageProperties.getLastPrintedProperty()
public String getLastPrintedPropertyString()
public Optional<Date> getModifiedProperty()
getModifiedProperty
in interface PackageProperties
PackageProperties.getModifiedProperty()
public String getModifiedPropertyString()
public Optional<String> getRevisionProperty()
getRevisionProperty
in interface PackageProperties
PackageProperties.getRevisionProperty()
public Optional<String> getSubjectProperty()
getSubjectProperty
in interface PackageProperties
PackageProperties.getSubjectProperty()
public Optional<String> getTitleProperty()
getTitleProperty
in interface PackageProperties
PackageProperties.getTitleProperty()
public Optional<String> getVersionProperty()
getVersionProperty
in interface PackageProperties
PackageProperties.getVersionProperty()
public void setCategoryProperty(String category)
setCategoryProperty
in interface PackageProperties
PackageProperties.setCategoryProperty(java.lang.String)
public void setCategoryProperty(Optional<String> category)
setCategoryProperty
in interface PackageProperties
PackageProperties.setCategoryProperty(java.util.Optional)
public void setContentStatusProperty(String contentStatus)
setContentStatusProperty
in interface PackageProperties
PackageProperties.setContentStatusProperty(java.lang.String)
public void setContentStatusProperty(Optional<String> contentStatus)
setContentStatusProperty
in interface PackageProperties
PackageProperties.setContentStatusProperty(java.util.Optional)
public void setContentTypeProperty(String contentType)
setContentTypeProperty
in interface PackageProperties
PackageProperties.setContentTypeProperty(java.lang.String)
public void setContentTypeProperty(Optional<String> contentType)
setContentTypeProperty
in interface PackageProperties
PackageProperties.setContentTypeProperty(java.util.Optional)
public void setCreatedProperty(String created)
setCreatedProperty
in interface PackageProperties
PackageProperties.setCreatedProperty(java.util.Optional)
public void setCreatedProperty(Optional<Date> created)
setCreatedProperty
in interface PackageProperties
PackageProperties.setCreatedProperty(java.util.Optional)
public void setCreatorProperty(String creator)
setCreatorProperty
in interface PackageProperties
PackageProperties.setCreatorProperty(java.lang.String)
public void setCreatorProperty(Optional<String> creator)
setCreatorProperty
in interface PackageProperties
PackageProperties.setCreatorProperty(java.util.Optional)
public void setDescriptionProperty(String description)
setDescriptionProperty
in interface PackageProperties
PackageProperties.setDescriptionProperty(java.lang.String)
public void setDescriptionProperty(Optional<String> description)
setDescriptionProperty
in interface PackageProperties
PackageProperties.setDescriptionProperty(java.util.Optional)
public void setIdentifierProperty(String identifier)
setIdentifierProperty
in interface PackageProperties
PackageProperties.setIdentifierProperty(java.lang.String)
public void setIdentifierProperty(Optional<String> identifier)
setIdentifierProperty
in interface PackageProperties
PackageProperties.setIdentifierProperty(java.util.Optional)
public void setKeywordsProperty(String keywords)
setKeywordsProperty
in interface PackageProperties
PackageProperties.setKeywordsProperty(java.lang.String)
public void setKeywordsProperty(Optional<String> keywords)
setKeywordsProperty
in interface PackageProperties
PackageProperties.setKeywordsProperty(java.util.Optional)
public void setLanguageProperty(String language)
setLanguageProperty
in interface PackageProperties
PackageProperties.setLanguageProperty(java.lang.String)
public void setLanguageProperty(Optional<String> language)
setLanguageProperty
in interface PackageProperties
PackageProperties.setLanguageProperty(java.util.Optional)
public void setLastModifiedByProperty(String lastModifiedBy)
setLastModifiedByProperty
in interface PackageProperties
PackageProperties.setLastModifiedByProperty(java.lang.String)
public void setLastModifiedByProperty(Optional<String> lastModifiedBy)
setLastModifiedByProperty
in interface PackageProperties
PackageProperties.setLastModifiedByProperty(java.util.Optional)
public void setLastPrintedProperty(String lastPrinted)
setLastPrintedProperty
in interface PackageProperties
PackageProperties.setLastPrintedProperty(java.util.Optional)
public void setLastPrintedProperty(Optional<Date> lastPrinted)
setLastPrintedProperty
in interface PackageProperties
PackageProperties.setLastPrintedProperty(java.util.Optional)
public void setModifiedProperty(String modified)
setModifiedProperty
in interface PackageProperties
PackageProperties.setModifiedProperty(java.util.Optional)
public void setModifiedProperty(Optional<Date> modified)
setModifiedProperty
in interface PackageProperties
PackageProperties.setModifiedProperty(java.util.Optional)
public void setRevisionProperty(Optional<String> revision)
setRevisionProperty
in interface PackageProperties
PackageProperties.setRevisionProperty(java.util.Optional)
public void setRevisionProperty(String revision)
setRevisionProperty
in interface PackageProperties
PackageProperties.setRevisionProperty(java.lang.String)
public void setSubjectProperty(String subject)
setSubjectProperty
in interface PackageProperties
PackageProperties.setSubjectProperty(java.lang.String)
public void setSubjectProperty(Optional<String> subject)
setSubjectProperty
in interface PackageProperties
PackageProperties.setSubjectProperty(java.util.Optional)
public void setTitleProperty(String title)
setTitleProperty
in interface PackageProperties
PackageProperties.setTitleProperty(java.lang.String)
public void setTitleProperty(Optional<String> title)
setTitleProperty
in interface PackageProperties
PackageProperties.setTitleProperty(java.util.Optional)
public void setVersionProperty(String version)
setVersionProperty
in interface PackageProperties
PackageProperties.setVersionProperty(java.lang.String)
public void setVersionProperty(Optional<String> version)
setVersionProperty
in interface PackageProperties
PackageProperties.setVersionProperty(java.util.Optional)
protected InputStream getInputStreamImpl()
PackagePart
getInputStreamImpl
in class PackagePart
protected OutputStream getOutputStreamImpl()
PackagePart
getOutputStreamImpl
in class PackagePart
public boolean save(OutputStream zos)
PackagePart
save
in class PackagePart
zos
- Output stream to save this part.public boolean load(InputStream ios)
PackagePart
load
in class PackagePart
ios
- The input stream of the content to load.public void close()
PackagePart
close
in class PackagePart
public void flush()
PackagePart
flush
in class PackagePart
Copyright 2019 The Apache Software Foundation or its licensors, as applicable.