extractMetadata(extractor.getCustomProperties(), metadata);
}
}
private void extractMetadata(CoreProperties properties, Metadata metadata) {
PackagePropertiesPart propsHolder = properties
.getUnderlyingProperties();
addProperty(metadata, OfficeOpenXMLCore.CATEGORY, propsHolder.getCategoryProperty());
addProperty(metadata, OfficeOpenXMLCore.CONTENT_STATUS, propsHolder
.getContentStatusProperty());
addProperty(metadata, TikaCoreProperties.CREATED, propsHolder
.getCreatedProperty());
addProperty(metadata, TikaCoreProperties.CREATOR, propsHolder
.getCreatorProperty());
addProperty(metadata, TikaCoreProperties.DESCRIPTION, propsHolder
.getDescriptionProperty());
addProperty(metadata, TikaCoreProperties.IDENTIFIER, propsHolder
.getIdentifierProperty());
addProperty(metadata, TikaCoreProperties.KEYWORDS, propsHolder
.getKeywordsProperty());
addProperty(metadata, TikaCoreProperties.LANGUAGE, propsHolder
.getLanguageProperty());
addProperty(metadata, TikaCoreProperties.MODIFIER, propsHolder
.getLastModifiedByProperty());
addProperty(metadata, TikaCoreProperties.PRINT_DATE, propsHolder
.getLastPrintedProperty());
addProperty(metadata, Metadata.LAST_MODIFIED, propsHolder
.getModifiedProperty());
addProperty(metadata, TikaCoreProperties.MODIFIED, propsHolder
.getModifiedProperty());
addProperty(metadata, OfficeOpenXMLCore.REVISION, propsHolder
.getRevisionProperty());
// TODO: Move to OO subject in Tika 2.0
addProperty(metadata, TikaCoreProperties.TRANSITION_SUBJECT_TO_OO_SUBJECT,
propsHolder.getSubjectProperty());
addProperty(metadata, TikaCoreProperties.TITLE, propsHolder.getTitleProperty());
addProperty(metadata, OfficeOpenXMLCore.VERSION, propsHolder.getVersionProperty());
// Legacy Tika-1.0 style stats
// TODO Remove these in Tika 2.0
addProperty(metadata, Metadata.CATEGORY, propsHolder.getCategoryProperty());
addProperty(metadata, Metadata.CONTENT_STATUS, propsHolder
.getContentStatusProperty());
addProperty(metadata, Metadata.REVISION_NUMBER, propsHolder
.getRevisionProperty());
addProperty(metadata, Metadata.VERSION, propsHolder.getVersionProperty());
}