当前位置: 首页>>代码示例>>Java>>正文


Java CTProperties类代码示例

本文整理汇总了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());
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:6,代码来源:Excel.java

示例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());
}
 
开发者ID:kolbasa,项目名称:OCRaptor,代码行数:47,代码来源:MetadataExtractor.java


注:本文中的org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.CTProperties类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。