Class JhoveRepInfoReport
- java.lang.Object
-
- com.adobe.epubcheck.api.MasterReport
-
- org.ithaka.portico.jhove.module.epub.JhoveRepInfoReport
-
- All Implemented Interfaces:
com.adobe.epubcheck.api.LocalizableReport,com.adobe.epubcheck.api.Report
public class JhoveRepInfoReport extends com.adobe.epubcheck.api.MasterReportThis is a custom report to extend the EPUBCheckMasterReport. Its purpose is to collect the properties needed to producing a JHOVE RepInfo object while the EPUB is being validated.- Author:
- Karen Hanson
-
-
Field Summary
Fields Modifier and Type Field Description protected longcharsCountprotected Set<String>contributorsprotected StringcreationDateprotected Set<String>creatorsprotected Stringdateprotected Set<String>embeddedFontsprotected List<com.adobe.epubcheck.reporting.CheckMessage>errorsprotected static StringFALLBACK_FORMATprotected List<com.adobe.epubcheck.reporting.CheckMessage>fatalErrorsprotected StringformatNameprotected StringformatVersionprotected StringgenerationDateprotected booleanhasAudioprotected booleanhasEncryptionprotected booleanhasFixedLayoutprotected booleanhasScriptsprotected booleanhasSignaturesprotected booleanhasVideoprotected Stringidentifierprotected List<com.adobe.epubcheck.reporting.CheckMessage>infoMsgsprotected static StringISO_DATE_PATTERNprotected Stringlanguageprotected StringlastModifiedDateprotected Set<String>mediaTypesprotected longpagesCountprotected Stringpublisherprotected Set<String>referencesprotected Set<String>refFontsprotected Set<String>resourcesprotected Set<String>rightsprotected Set<String>subjectsprotected Set<String>titlesprotected List<com.adobe.epubcheck.reporting.CheckMessage>usageMsgsprotected List<com.adobe.epubcheck.reporting.CheckMessage>warns
-
Constructor Summary
Constructors Constructor Description JhoveRepInfoReport(String ePubName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgenerate()List<com.adobe.epubcheck.reporting.CheckMessage>getAllMessages()Get all messages generated during validationlonggetCharacterCount()Get EPUB character count.String[]getContributors()Get EPUB contributors as string array.DategetCreationDate()Get EPUB file creation dateString[]getCreators()Get EPUB creators as string arrayStringgetDate()Get EPUB publication dateSet<String>getEmbeddedFonts()Get EPUB embedded fontsintgetErrorCount()intgetFatalErrorCount()Set<String>getFeatures()Get set of features identified in the EPUBStringgetFormat()Get format of file validated (application/octet-stream if not an EPUB)StringgetIdentifier()Get EPUB identifier.intgetInfoCount()StringgetLanguage()Get EPUB language.DategetLastModifiedDate()Get EPUB file last modified dateString[]getMediaTypes()Get list of media types present in the EPUB packagelonggetPageCount()Get EPUB page count.StringgetPublisher()Get EPUB publisherString[]getReferences()Get all EPUB references - this array includes both referenced and embedded material.Set<String>getRefFonts()Get EPUB referenced fonts - these fonts are not embeddedString[]getResources()Get a list of all EPUB resources - files that are either stored in the EPUB package or else stored outside of the EPUB but used as a key component e.g.String[]getRights()Get EPUB rights statements as string arrayString[]getSubjects()Get EPUB subject headingsString[]getTitles()Get EPUB titles as string arrayintgetUsageCount()StringgetVersion()Get EPUB version validated against - EPUBcheck will use the most recent minor release version for the EPUB's major version e.g.intgetWarningCount()voidinfo(String resource, com.adobe.epubcheck.util.FeatureEnum feature, String value)voidinitialize()voidmessage(com.adobe.epubcheck.messages.Message message, com.adobe.epubcheck.api.EPUBLocation location, Object... args)
-
-
-
Field Detail
-
generationDate
protected String generationDate
-
creationDate
protected String creationDate
-
lastModifiedDate
protected String lastModifiedDate
-
identifier
protected String identifier
-
publisher
protected String publisher
-
date
protected String date
-
formatName
protected String formatName
-
formatVersion
protected String formatVersion
-
pagesCount
protected long pagesCount
-
charsCount
protected long charsCount
-
language
protected String language
-
hasEncryption
protected boolean hasEncryption
-
hasSignatures
protected boolean hasSignatures
-
hasAudio
protected boolean hasAudio
-
hasVideo
protected boolean hasVideo
-
hasFixedLayout
protected boolean hasFixedLayout
-
hasScripts
protected boolean hasScripts
-
warns
protected List<com.adobe.epubcheck.reporting.CheckMessage> warns
-
errors
protected List<com.adobe.epubcheck.reporting.CheckMessage> errors
-
fatalErrors
protected List<com.adobe.epubcheck.reporting.CheckMessage> fatalErrors
-
usageMsgs
protected List<com.adobe.epubcheck.reporting.CheckMessage> usageMsgs
-
infoMsgs
protected List<com.adobe.epubcheck.reporting.CheckMessage> infoMsgs
-
ISO_DATE_PATTERN
protected static final String ISO_DATE_PATTERN
- See Also:
- Constant Field Values
-
FALLBACK_FORMAT
protected static final String FALLBACK_FORMAT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JhoveRepInfoReport
public JhoveRepInfoReport(String ePubName)
-
-
Method Detail
-
message
public void message(com.adobe.epubcheck.messages.Message message, com.adobe.epubcheck.api.EPUBLocation location, Object... args)
-
getCreationDate
public Date getCreationDate()
Get EPUB file creation date- Returns:
-
getLastModifiedDate
public Date getLastModifiedDate()
Get EPUB file last modified date- Returns:
-
getFormat
public String getFormat()
Get format of file validated (application/octet-stream if not an EPUB)- Returns:
-
getVersion
public String getVersion()
Get EPUB version validated against - EPUBcheck will use the most recent minor release version for the EPUB's major version e.g. for EPUBCheck 4.2.0, all EPUB 2s will be validated against the 2.0.1 spec, all EPUB 3s will be validated against the EPUB 3.2 spec.- Returns:
- version validated as
-
getAllMessages
public List<com.adobe.epubcheck.reporting.CheckMessage> getAllMessages()
Get all messages generated during validation- Returns:
-
getPageCount
public long getPageCount()
Get EPUB page count.- Returns:
-
getCharacterCount
public long getCharacterCount()
Get EPUB character count.- Returns:
-
getLanguage
public String getLanguage()
Get EPUB language.- Returns:
-
getIdentifier
public String getIdentifier()
Get EPUB identifier.- Returns:
-
getTitles
public String[] getTitles()
Get EPUB titles as string array- Returns:
-
getCreators
public String[] getCreators()
Get EPUB creators as string array- Returns:
-
getContributors
public String[] getContributors()
Get EPUB contributors as string array.- Returns:
-
getDate
public String getDate()
Get EPUB publication date- Returns:
-
getPublisher
public String getPublisher()
Get EPUB publisher- Returns:
-
getSubjects
public String[] getSubjects()
Get EPUB subject headings- Returns:
-
getRights
public String[] getRights()
Get EPUB rights statements as string array- Returns:
-
getRefFonts
public Set<String> getRefFonts()
Get EPUB referenced fonts - these fonts are not embedded- Returns:
-
getReferences
public String[] getReferences()
Get all EPUB references - this array includes both referenced and embedded material.- Returns:
-
getResources
public String[] getResources()
Get a list of all EPUB resources - files that are either stored in the EPUB package or else stored outside of the EPUB but used as a key component e.g. embedded video or audio.- Returns:
-
getMediaTypes
public String[] getMediaTypes()
Get list of media types present in the EPUB package- Returns:
-
getErrorCount
public int getErrorCount()
- Specified by:
getErrorCountin interfacecom.adobe.epubcheck.api.Report- Overrides:
getErrorCountin classcom.adobe.epubcheck.api.MasterReport
-
getWarningCount
public int getWarningCount()
- Specified by:
getWarningCountin interfacecom.adobe.epubcheck.api.Report- Overrides:
getWarningCountin classcom.adobe.epubcheck.api.MasterReport
-
getFatalErrorCount
public int getFatalErrorCount()
- Specified by:
getFatalErrorCountin interfacecom.adobe.epubcheck.api.Report- Overrides:
getFatalErrorCountin classcom.adobe.epubcheck.api.MasterReport
-
getUsageCount
public int getUsageCount()
- Specified by:
getUsageCountin interfacecom.adobe.epubcheck.api.Report- Overrides:
getUsageCountin classcom.adobe.epubcheck.api.MasterReport
-
getInfoCount
public int getInfoCount()
- Specified by:
getInfoCountin interfacecom.adobe.epubcheck.api.Report- Overrides:
getInfoCountin classcom.adobe.epubcheck.api.MasterReport
-
generate
public int generate()
-
initialize
public void initialize()
-
-