Class XmlReportAbstract
java.lang.Object
com.adobe.epubcheck.api.MasterReport
com.adobe.epubcheck.util.XmlReportAbstract
- All Implemented Interfaces:
LocalizableReport, Report
- Direct Known Subclasses:
XmlReportImpl, XmpReportImpl
Abstract class to generate a report in XML.
It collects the information needed for the report and provides helper methods to generate proper XML.
In order to generate a specific XML, the generateReport method should be provided in a derived class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected Stringprivate Elementprotected Stringprivate Documentprotected Stringprotected Stringprotected Stringprotected final List<CheckMessage> protected final List<CheckMessage> protected Stringprotected Stringprotected Stringprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected final List<CheckMessage> protected Stringprotected Stringprotected Stringprivate Stringprotected PrintWriterprotected longprotected Stringprotected final List<CheckMessage> Fields inherited from class MasterReport
allReportedMessageIds -
Constructor Summary
ConstructorsConstructorDescriptionXmlReportAbstract(PrintWriter out, String ePubName, String versionEpubCheck) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPrefixNamespace(String prefix, String uri) protected Stringcapitalize(String in) voidclose()protected static StringcorrectToUtf8(String inputString) Make sure the string contains valid UTF-8 charactersprotected voidendElement(String name) protected static StringfromTime(long time) Transform time into ISO 8601 string.intgenerate()Called to create a report after the checks have been madeprotected voidgenerateElement(String name, String value) protected voidprotected voidabstract intMethod to implement effective report generation.protected StringgetNameFromPath(String path) voidinfo(String resource, FeatureEnum feature, String value) Called when when a feature is found in epub.voidCalled when a report if first createdprivate Attrprivate ElementmakeElement(String name) voidmessage(Message message, EPUBLocation location, Object... args) Called when a violation of the standard is found in epub.voidsetNamespace(String uri) protected voidstartElement(String name) protected voidstartElement(String name, KeyValue<String, String>... attrs) protected voidMethods inherited from class MasterReport
getCustomMessageFile, getDictionary, getEpubFileName, getErrorCount, getFatalErrorCount, getInfoCount, getLocale, getMessages, getReportingLevel, getUsageCount, getWarningCount, message, setCustomMessageFile, setEpubFileName, setLocale, setOverrideFile, setReportingLevel
-
Field Details
-
out
-
epubCheckName
-
epubCheckVersion
-
epubCheckDate
-
generationDate
-
creationDate
-
lastModifiedDate
-
identifier
-
titles
-
creators
-
contributors
-
subjects
-
publisher
-
rights
-
date
-
mediaTypes
-
formatName
-
formatVersion
-
pagesCount
protected long pagesCount -
charsCount
protected long charsCount -
language
-
embeddedFonts
-
refFonts
-
references
-
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
-
errors
-
fatalErrors
-
hints
-
doc
-
currentEl
-
namespaceURI
-
namespaces
-
-
Constructor Details
-
XmlReportAbstract
-
-
Method Details
-
initialize
public void initialize()Description copied from interface:ReportCalled when a report if first created -
close
public void close()- Specified by:
closein interfaceReport- Overrides:
closein classMasterReport
-
message
Description copied from interface:ReportCalled when a violation of the standard is found in epub.- Parameters:
message- The message being reportedlocation- location information for the messageargs- Arguments referenced by the format string for the message.
-
info
Description copied from interface:ReportCalled when when a feature is found in epub.- Parameters:
resource- name of the resource in the epub zip container that has this feature or null if the feature is on the container level.feature- a keyword to know what kind of feature has been foundvalue- value found
-
getNameFromPath
-
generateReport
public abstract int generateReport()Method to implement effective report generation.- Returns:
- errorCode
-
setNamespace
-
addPrefixNamespace
-
generate
public int generate()Description copied from interface:ReportCalled to create a report after the checks have been made -
capitalize
-
makeElement
-
makeAttribute
-
startElement
-
startElement
-
startElement
-
endElement
-
generateElement
-
generateElement
-
generateElement
-
correctToUtf8
-
fromTime
Transform time into ISO 8601 string.
-