private void parse(SummaryInformation summary) { set(TikaCoreProperties.TITLE, summary.getTitle()); addMulti(metadata, TikaCoreProperties.CREATOR, summary.getAuthor()); //make sure these are retrievable specifically add(Office.KEYWORDS, summary.getKeywords()); add(OfficeOpenXMLCore.SUBJECT, summary.getSubject()); set(TikaCoreProperties.MODIFIER, summary.getLastAuthor()); set(TikaCoreProperties.COMMENTS, summary.getComments()); set(OfficeOpenXMLExtended.TEMPLATE, summary.getTemplate()); set(OfficeOpenXMLExtended.APPLICATION, summary.getApplicationName()); set(OfficeOpenXMLCore.REVISION, summary.getRevNumber()); set(TikaCoreProperties.CREATED, summary.getCreateDateTime()); set(TikaCoreProperties.MODIFIED, summary.getLastSaveDateTime()); set(TikaCoreProperties.PRINT_DATE, summary.getLastPrinted()); set(OfficeOpenXMLExtended.TOTAL_TIME, Long.toString(summary.getEditTime())); set(OfficeOpenXMLExtended.DOC_SECURITY, summary.getSecurity()); // New style counts set(Office.WORD_COUNT, summary.getWordCount()); set(Office.CHARACTER_COUNT, summary.getCharCount()); set(Office.PAGE_COUNT, summary.getPageCount()); if (summary.getPageCount() > 0) { metadata.set(PagedText.N_PAGES, summary.getPageCount()); } }
private int wordDocLength(ContentResource resource) { if (!serverConfigurationService.getBoolean("tii.checkWordLength", false)) return 100; try { POIFSFileSystem pfs = new POIFSFileSystem(resource.streamContent()); HWPFDocument doc = new HWPFDocument(pfs); SummaryInformation dsi = doc.getSummaryInformation(); int count = dsi.getWordCount(); log.debug("got a count of " + count); //if this == 0 then its likely that something went wrong -poi couldn't read it if (count == 0) return 100; return count; } catch (IOException e) { log.error(e.getMessage(), e); } catch (ServerOverloadException e) { log.error(e.getMessage(), e); } //in case we can't read this lets err on the side of caution return 100; }
text.append("\nLast Save Date/Time: " + si.getLastSaveDateTime()); text.append("\nPage Count: " + si.getPageCount()); text.append("\nWord Count: " + si.getWordCount()); text.append("\nChar Count: " + si.getCharCount());
text.append("\nLast Save Date/Time: " + si.getLastSaveDateTime()); text.append("\nPage Count: " + si.getPageCount()); text.append("\nWord Count: " + si.getWordCount()); text.append("\nChar Count: " + si.getCharCount());
text.append("\nLast Save Date/Time: " + si.getLastSaveDateTime()); text.append("\nPage Count: " + si.getPageCount()); text.append("\nWord Count: " + si.getWordCount()); text.append("\nChar Count: " + si.getCharCount());
int coreProp=summaryInfo.getWordCount(); if (String.valueOf(coreProp).matches(this.hocr.getMetaDataFilter().get(corePropertyName))) { matchOnce=true;
public void setSummaryInformation( SummaryInformation si ) { title = si.getTitle(); subject = si.getSubject(); author = si.getAuthor(); keywords = si.getKeywords(); comment = si.getComments(); template = si.getTemplate(); lastSaved = si.getLastSaveDateTime(); revision = si.getRevNumber(); totalEditingTime = si.getEditTime(); lastPrinted = si.getLastPrinted(); created = si.getCreateDateTime(); pages = si.getPageCount(); words = si.getWordCount(); characters = si.getCharCount(); creatingApplication = si.getApplicationName(); thumbnail = si.getThumbnail(); }
public void setSummaryInformation( SummaryInformation si ) { title = si.getTitle(); subject = si.getSubject(); author = si.getAuthor(); keywords = si.getKeywords(); comment = si.getComments(); template = si.getTemplate(); lastSaved = si.getLastSaveDateTime(); revision = si.getRevNumber(); totalEditingTime = si.getEditTime(); lastPrinted = si.getLastPrinted(); created = si.getCreateDateTime(); pages = si.getPageCount(); words = si.getWordCount(); characters = si.getCharCount(); creatingApplication = si.getApplicationName(); thumbnail = si.getThumbnail(); }
set(Office.WORD_COUNT, summary.getWordCount()); set(Office.CHARACTER_COUNT, summary.getCharCount()); set(Office.PAGE_COUNT, summary.getPageCount()); set(Metadata.REVISION_NUMBER, summary.getRevNumber()); set(Metadata.SECURITY, summary.getSecurity()); set(MSOffice.WORD_COUNT, summary.getWordCount()); set(MSOffice.CHARACTER_COUNT, summary.getCharCount()); set(MSOffice.PAGE_COUNT, summary.getPageCount());
set(Office.WORD_COUNT, summary.getWordCount()); set(Office.CHARACTER_COUNT, summary.getCharCount()); set(Office.PAGE_COUNT, summary.getPageCount()); set(Metadata.REVISION_NUMBER, summary.getRevNumber()); set(Metadata.SECURITY, summary.getSecurity()); set(MSOffice.WORD_COUNT, summary.getWordCount()); set(MSOffice.CHARACTER_COUNT, summary.getCharCount()); set(MSOffice.PAGE_COUNT, summary.getPageCount());