本文整理汇总了Java中org.apache.poi.hpsf.DocumentSummaryInformation类的典型用法代码示例。如果您正苦于以下问题:Java DocumentSummaryInformation类的具体用法?Java DocumentSummaryInformation怎么用?Java DocumentSummaryInformation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DocumentSummaryInformation类属于org.apache.poi.hpsf包,在下文中一共展示了DocumentSummaryInformation类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: processDocumentSummaryInformation
import org.apache.poi.hpsf.DocumentSummaryInformation; //导入依赖的package包/类
void processDocumentSummaryInformation(DocumentSummaryInformation dsi, JOfficeFrame jOfficeFrame) {
StringBuilder documentSummary = new StringBuilder();
for (Section section : dsi.getSections()) {
for (Property property : section.getProperties()) {
documentSummary.append("--------------------------" + "\n");
documentSummary.append("ID: " + property.getID() + "\n");
documentSummary.append("Value: " + property.getValue() + "\n");
documentSummary.append("Type: " + property.getType() + "\n");
documentSummary.append("--------------------------" + "\n");
}
documentSummary.append("\n");
}
// TODO Current Document Summary only prints properties
// Need to fill this area with some relevant information
// documentSummaryArea.setText(documentSummary.toString());
jOfficeFrame.getDocumentSummaryArea().setText(documentSummary.toString());
}
开发者ID:hussainp,项目名称:JOffVis,代码行数:18,代码来源:Strategy.java
示例2: parse
import org.apache.poi.hpsf.DocumentSummaryInformation; //导入依赖的package包/类
private void parse(DocumentSummaryInformation summary) {
set(OfficeOpenXMLExtended.COMPANY, summary.getCompany());
set(OfficeOpenXMLExtended.MANAGER, summary.getManager());
set(TikaCoreProperties.LANGUAGE, getLanguage(summary));
set(OfficeOpenXMLCore.CATEGORY, summary.getCategory());
// New style counts
set(Office.SLIDE_COUNT, summary.getSlideCount());
if (summary.getSlideCount() > 0) {
metadata.set(PagedText.N_PAGES, summary.getSlideCount());
}
// Old style, Tika 1.0 counts
// TODO Remove these in Tika 2.0
set(Metadata.COMPANY, summary.getCompany());
set(Metadata.MANAGER, summary.getManager());
set(MSOffice.SLIDE_COUNT, summary.getSlideCount());
set(Metadata.CATEGORY, summary.getCategory());
parse(summary.getCustomProperties());
}
开发者ID:kolbasa,项目名称:OCRaptor,代码行数:21,代码来源:SummaryExtractor.java
示例3: create
import org.apache.poi.hpsf.DocumentSummaryInformation; //导入依赖的package包/类
@Override
public TreeModelSource create(final POIFSFileSystem poifs, final DefaultMutableTreeNode parent) {
final DirectoryNode dn = poifs.getRoot();
if (dn.hasEntry(DocumentSummaryInformation.DEFAULT_STREAM_NAME) ||
dn.hasEntry(SummaryInformation.DEFAULT_STREAM_NAME)) {
return appContext.getBean(HPSFTreeModel.class, parent);
}
return null;
}
开发者ID:kiwiwings,项目名称:poi-visualizer,代码行数:10,代码来源:HPSFTreeModelFactory.java
示例4: makeDocInfo
import org.apache.poi.hpsf.DocumentSummaryInformation; //导入依赖的package包/类
private void makeDocInfo ( final HSSFWorkbook workbook )
{
workbook.createInformationProperties ();
final DocumentSummaryInformation dsi = workbook.getDocumentSummaryInformation ();
dsi.setCompany ( "Eclipse SCADA Project" );
final CustomProperties cp = new CustomProperties ();
cp.put ( "Eclipse SCADA Export Version", Activator.getDefault ().getBundle ().getVersion ().toString () );
dsi.setCustomProperties ( cp );
}
开发者ID:eclipse,项目名称:neoscada,代码行数:12,代码来源:ExportEventsImpl.java
示例5: info
import org.apache.poi.hpsf.DocumentSummaryInformation; //导入依赖的package包/类
private void info(Struct sct, DocumentSummaryInformation summary) {
if(summary==null) return;
set(sct,"CATEGORY",summary.getCategory());
set(sct,"COMPANY",summary.getCompany());
set(sct,"MANAGER",summary.getManager());
set(sct,"PRESENTATIONFORMAT",summary.getPresentationFormat());
}
开发者ID:lucee,项目名称:Lucee4,代码行数:8,代码来源:Excel.java
示例6: execute
import org.apache.poi.hpsf.DocumentSummaryInformation; //导入依赖的package包/类
public cfData execute( cfSession _session, List<cfData> parameters ) throws cfmRunTimeException {
if ( parameters.get(0).getDataType() != cfData.CFSTRUCTDATA )
throwException(_session, "parameter must be of type structure");
cfSpreadSheetData spreadsheet = (cfSpreadSheetData)parameters.get(1);
cfStructData s = (cfStructData)parameters.get(0);
Workbook workbook = spreadsheet.getWorkBook();
/*
* XSSFWorkbook
*/
if ( workbook instanceof XSSFWorkbook ){
XSSFWorkbook xSSFWorkbook = (XSSFWorkbook)workbook;
CoreProperties cP = xSSFWorkbook.getProperties().getCoreProperties();
if ( s.containsKey("author") )
cP.setCreator( s.getData("author").getString() );
if ( s.containsKey("category") )
cP.setCategory( s.getData("category").getString() );
if ( s.containsKey("subject") )
cP.setSubjectProperty( s.getData("subject").getString() );
if ( s.containsKey("title") )
cP.setTitle( s.getData("title").getString() );
if ( s.containsKey("revision") )
cP.setRevision( s.getData("revision").getString() );
if ( s.containsKey("description") )
cP.setDescription( s.getData("description").getString() );
}else{
HSSFWorkbook hSSFWorkbook = (HSSFWorkbook)workbook;
DocumentSummaryInformation dSummary = hSSFWorkbook.getDocumentSummaryInformation();
if ( dSummary == null ){
hSSFWorkbook.createInformationProperties();
dSummary = hSSFWorkbook.getDocumentSummaryInformation();
}
if ( s.containsKey("category") )
dSummary.setCategory( s.getData("category").getString() );
if ( s.containsKey("manager") )
dSummary.setManager( s.getData("manager").getString() );
if ( s.containsKey("company") )
dSummary.setCompany( s.getData("company").getString() );
SummaryInformation sInformation = hSSFWorkbook.getSummaryInformation();
if ( s.containsKey("title") )
sInformation.setTitle( s.getData("title").getString() );
if ( s.containsKey("subject") )
sInformation.setSubject( s.getData("subject").getString() );
if ( s.containsKey("author") )
sInformation.setAuthor( s.getData("author").getString() );
if ( s.containsKey("comments") )
sInformation.setComments( s.getData("comments").getString() );
if ( s.containsKey("keywords") )
sInformation.setKeywords( s.getData("keywords").getString() );
if ( s.containsKey("lastauthor") )
sInformation.setLastAuthor( s.getData("lastauthor").getString() );
}
return cfBooleanData.TRUE;
}
开发者ID:OpenBD,项目名称:openbd-core,代码行数:65,代码来源:SpreadsheetAddInfo.java
示例7: getLanguage
import org.apache.poi.hpsf.DocumentSummaryInformation; //导入依赖的package包/类
private String getLanguage(DocumentSummaryInformation summary) {
CustomProperties customProperties = summary.getCustomProperties();
if (customProperties != null) {
Object value = customProperties.get("Language");
if (value instanceof String) {
return (String) value;
}
}
return null;
}
开发者ID:kolbasa,项目名称:OCRaptor,代码行数:11,代码来源:SummaryExtractor.java
示例8: load
import org.apache.poi.hpsf.DocumentSummaryInformation; //导入依赖的package包/类
@Override
public void load(Object source) throws TreeModelLoadException {
DirectoryNode dn = (DirectoryNode)source;
addPropertySet(dn, SummaryInformation.DEFAULT_STREAM_NAME);
addPropertySet(dn, DocumentSummaryInformation.DEFAULT_STREAM_NAME);
}
开发者ID:kiwiwings,项目名称:poi-visualizer,代码行数:7,代码来源:HPSFTreeModel.java
注:本文中的org.apache.poi.hpsf.DocumentSummaryInformation类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论