本文整理汇总了Java中org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.CTProperties类的典型用法代码示例。如果您正苦于以下问题:Java CTProperties类的具体用法?Java CTProperties怎么用?Java CTProperties使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CTProperties类属于org.openxmlformats.schemas.officeDocument.x2006.extendedProperties包,在下文中一共展示了CTProperties类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: info
import org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.CTProperties; //导入依赖的package包/类
private void info(Struct sct, CTProperties props) {
if(props==null) return;
set(sct, "COMPANY", props.getCompany());
set(sct, "MANAGER", props.getManager());
}
示例2: extractMetadata
import org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.CTProperties; //导入依赖的package包/类
private void extractMetadata(ExtendedProperties properties,
Metadata metadata) {
CTProperties propsHolder = properties.getUnderlyingProperties();
addProperty(metadata, OfficeOpenXMLExtended.APPLICATION, propsHolder.getApplication());
addProperty(metadata, OfficeOpenXMLExtended.APP_VERSION, propsHolder.getAppVersion());
addProperty(metadata, TikaCoreProperties.PUBLISHER, propsHolder.getCompany());
addProperty(metadata, OfficeOpenXMLExtended.COMPANY, propsHolder.getCompany());
addProperty(metadata, OfficeOpenXMLExtended.MANAGER, propsHolder.getManager());
addProperty(metadata, OfficeOpenXMLExtended.NOTES, propsHolder.getNotes());
addProperty(metadata, OfficeOpenXMLExtended.PRESENTATION_FORMAT, propsHolder.getPresentationFormat());
addProperty(metadata, OfficeOpenXMLExtended.TEMPLATE, propsHolder.getTemplate());
addProperty(metadata, OfficeOpenXMLExtended.TOTAL_TIME, propsHolder.getTotalTime());
if (propsHolder.getPages() > 0) {
metadata.set(PagedText.N_PAGES, propsHolder.getPages());
} else if (propsHolder.getSlides() > 0) {
metadata.set(PagedText.N_PAGES, propsHolder.getSlides());
}
// Process the document statistics
addProperty(metadata, Office.PAGE_COUNT, propsHolder.getPages());
addProperty(metadata, Office.SLIDE_COUNT, propsHolder.getSlides());
addProperty(metadata, Office.PARAGRAPH_COUNT, propsHolder.getParagraphs());
addProperty(metadata, Office.LINE_COUNT, propsHolder.getLines());
addProperty(metadata, Office.WORD_COUNT, propsHolder.getWords());
addProperty(metadata, Office.CHARACTER_COUNT, propsHolder.getCharacters());
addProperty(metadata, Office.CHARACTER_COUNT_WITH_SPACES, propsHolder.getCharactersWithSpaces());
// Legacy Tika-1.0 style stats
// TODO Remove these in Tika 2.0
addProperty(metadata, Metadata.APPLICATION_NAME, propsHolder.getApplication());
addProperty(metadata, Metadata.APPLICATION_VERSION, propsHolder.getAppVersion());
addProperty(metadata, Metadata.MANAGER, propsHolder.getManager());
addProperty(metadata, Metadata.NOTES, propsHolder.getNotes());
addProperty(metadata, Metadata.PRESENTATION_FORMAT, propsHolder.getPresentationFormat());
addProperty(metadata, Metadata.TEMPLATE, propsHolder.getTemplate());
addProperty(metadata, Metadata.TOTAL_TIME, propsHolder.getTotalTime());
addProperty(metadata, MSOffice.PAGE_COUNT, propsHolder.getPages());
addProperty(metadata, MSOffice.SLIDE_COUNT, propsHolder.getSlides());
addProperty(metadata, MSOffice.PARAGRAPH_COUNT, propsHolder.getParagraphs());
addProperty(metadata, MSOffice.LINE_COUNT, propsHolder.getLines());
addProperty(metadata, MSOffice.WORD_COUNT, propsHolder.getWords());
addProperty(metadata, MSOffice.CHARACTER_COUNT, propsHolder.getCharacters());
addProperty(metadata, MSOffice.CHARACTER_COUNT_WITH_SPACES, propsHolder.getCharactersWithSpaces());
}