Package com.adobe.epubcheck.api
Class MasterReport
- java.lang.Object
-
- com.adobe.epubcheck.api.MasterReport
-
- All Implemented Interfaces:
LocalizableReport,Report
- Direct Known Subclasses:
CheckingReport,DefaultReportImpl,QuietReport,WriterReportImpl,XmlReportAbstract
public abstract class MasterReport extends java.lang.Object implements LocalizableReport
Reports are derived from this so that we can test for message Id coverage as well as have a centralized location for severity reporting level testing.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Set<MessageId>allReportedMessageIds(package private) java.lang.StringcustomMessageFileNameprivate MessageDictionarydictionaryprivate java.lang.StringePubNameprivate interrorCountprivate intfatalErrorCountprivate intinfoCountprivate Messagesmessagesprivate intreportingLevelprivate intusageCountprivate intwarningCount
-
Constructor Summary
Constructors Modifier Constructor Description protectedMasterReport()Creates a report with a newMessagesinstance and sets the locale held inLocaleHolderto the default locale.protectedMasterReport(boolean setLocale)Creates a report with a newMessagesinstance and sets the locale held inLocaleHolderto the default locale only if the given flag istrue.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.lang.StringgetCustomMessageFile()MessageDictionarygetDictionary()java.lang.StringgetEpubFileName()intgetErrorCount()intgetFatalErrorCount()intgetInfoCount()java.util.LocalegetLocale()Gets the locale to use in the report's messagesMessagesgetMessages()intgetReportingLevel()intgetUsageCount()intgetWarningCount()voidmessage(MessageId id, EPUBLocation location, java.lang.Object... args)Called when a violation of the standard is found in epub.private voidreportMessageId(MessageId id)voidsetCustomMessageFile(java.lang.String customMessageFileName)voidsetEpubFileName(java.lang.String value)voidsetLocale(java.util.Locale locale)Sets the locale to use in the report's messagesvoidsetOverrideFile(java.io.File overrideFile)voidsetReportingLevel(int reportingLevel)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adobe.epubcheck.api.Report
generate, info, initialize, message
-
-
-
-
Field Detail
-
allReportedMessageIds
public static java.util.Set<MessageId> allReportedMessageIds
-
errorCount
private int errorCount
-
warningCount
private int warningCount
-
fatalErrorCount
private int fatalErrorCount
-
usageCount
private int usageCount
-
infoCount
private int infoCount
-
reportingLevel
private int reportingLevel
-
ePubName
private java.lang.String ePubName
-
dictionary
private MessageDictionary dictionary
-
messages
private Messages messages
-
customMessageFileName
java.lang.String customMessageFileName
-
-
Constructor Detail
-
MasterReport
protected MasterReport()
Creates a report with a newMessagesinstance and sets the locale held inLocaleHolderto the default locale.
-
MasterReport
protected MasterReport(boolean setLocale)
Creates a report with a newMessagesinstance and sets the locale held inLocaleHolderto the default locale only if the given flag istrue.- Parameters:
setLocale- whether to update the locale held inLocaleHolder
-
-
Method Detail
-
getDictionary
public MessageDictionary getDictionary()
- Specified by:
getDictionaryin interfaceReport
-
setLocale
public void setLocale(java.util.Locale locale)
Description copied from interface:LocalizableReportSets the locale to use in the report's messages- Specified by:
setLocalein interfaceLocalizableReport
-
getLocale
public java.util.Locale getLocale()
Description copied from interface:LocalizableReportGets the locale to use in the report's messages- Specified by:
getLocalein interfaceLocalizableReport
-
getMessages
public Messages getMessages()
-
setOverrideFile
public void setOverrideFile(java.io.File overrideFile)
- Specified by:
setOverrideFilein interfaceReport
-
reportMessageId
private void reportMessageId(MessageId id)
-
message
public void message(MessageId id, EPUBLocation location, java.lang.Object... args)
Description copied from interface:ReportCalled when a violation of the standard is found in epub.
-
setCustomMessageFile
public void setCustomMessageFile(java.lang.String customMessageFileName)
- Specified by:
setCustomMessageFilein interfaceReport
-
getCustomMessageFile
public java.lang.String getCustomMessageFile()
- Specified by:
getCustomMessageFilein interfaceReport
-
getReportingLevel
public int getReportingLevel()
- Specified by:
getReportingLevelin interfaceReport
-
setReportingLevel
public void setReportingLevel(int reportingLevel)
- Specified by:
setReportingLevelin interfaceReport
-
getEpubFileName
public java.lang.String getEpubFileName()
- Specified by:
getEpubFileNamein interfaceReport
-
setEpubFileName
public void setEpubFileName(java.lang.String value)
- Specified by:
setEpubFileNamein interfaceReport
-
getErrorCount
public int getErrorCount()
- Specified by:
getErrorCountin interfaceReport
-
getWarningCount
public int getWarningCount()
- Specified by:
getWarningCountin interfaceReport
-
getFatalErrorCount
public int getFatalErrorCount()
- Specified by:
getFatalErrorCountin interfaceReport
-
getInfoCount
public int getInfoCount()
- Specified by:
getInfoCountin interfaceReport
-
getUsageCount
public int getUsageCount()
- Specified by:
getUsageCountin interfaceReport
-
-