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()); } }
text.append("\nKeywords: " + si.getKeywords()); text.append("\nComments: " + si.getComments()); text.append("\nTemplate: " + si.getTemplate()); text.append("\nLast Author: " + si.getLastAuthor()); text.append("\nRev. Number: " + si.getRevNumber());
text.append("\nKeywords: " + si.getKeywords()); text.append("\nComments: " + si.getComments()); text.append("\nTemplate: " + si.getTemplate()); text.append("\nLast Author: " + si.getLastAuthor()); text.append("\nRev. Number: " + si.getRevNumber());
text.append("\nKeywords: " + si.getKeywords()); text.append("\nComments: " + si.getComments()); text.append("\nTemplate: " + si.getTemplate()); text.append("\nLast Author: " + si.getLastAuthor()); text.append("\nRev. Number: " + si.getRevNumber());
String coreProp=summaryInfo.getTemplate(); if ((coreProp!=null) && (coreProp.matches(this.hocr.getMetaDataFilter().get(corePropertyName)))) { matchOnce=true;
protected void sanitizeTemplate(BleachSession session, SummaryInformation dsi) { String template = dsi.getTemplate(); if (NORMAL_TEMPLATE.equals(template)) { return; } if (template == null) { return; } LOGGER.trace("Removing the document's template (was '{}')", template); dsi.removeTemplate(); ThreatSeverity severity = isExternalTemplate(template) ? ThreatSeverity.HIGH : ThreatSeverity.LOW; Threat threat = Threat.builder() .type(ThreatType.EXTERNAL_CONTENT) .severity(severity) .action(ThreatAction.REMOVE) .location("Summary Information - Template") .details("Template was: '" + template + "'") .build(); session.recordThreat(threat); }
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(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(Metadata.TEMPLATE, summary.getTemplate()); set(Metadata.APPLICATION_NAME, summary.getApplicationName()); set(Metadata.REVISION_NUMBER, summary.getRevNumber());
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(Metadata.TEMPLATE, summary.getTemplate()); set(Metadata.APPLICATION_NAME, summary.getApplicationName()); set(Metadata.REVISION_NUMBER, summary.getRevNumber());
ph.setKeywords(summaryInformation.getKeywords()); ph.setComments(summaryInformation.getComments()); ph.setTemplate(summaryInformation.getTemplate()); ph.setLastAuthor(summaryInformation.getLastAuthor()); ph.setRevision(NumberHelper.parseInteger(summaryInformation.getRevNumber()));
ph.setKeywords(summaryInformation.getKeywords()); ph.setComments(summaryInformation.getComments()); ph.setTemplate(summaryInformation.getTemplate()); ph.setLastAuthor(summaryInformation.getLastAuthor()); ph.setRevision(NumberHelper.parseInteger(summaryInformation.getRevNumber()));