MCPcopy Create free account
hub / github.com/w3c/epubcheck / doValidate

Method doValidate

src/main/java/com/adobe/epubcheck/api/EpubCheck.java:206–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

204 }
205
206 public int doValidate()
207 {
208 if (!epubFile.exists())
209 {
210 report.message(MessageId.PKG_018, EPUBLocation.of(epubFile));
211 return 2;
212 }
213
214 OCFChecker checker = new OCFChecker(new ValidationContextBuilder().url(URLUtils.toURL(epubFile))
215 .mimetype(MIMEType.EPUB.toString())
216 .resourceProvider(new FileResourceProvider(epubFile)).report(report).profile(profile)
217 .build());
218 checker.check();
219
220 int returnValue = 0;
221 if (report.getFatalErrorCount() != 0) returnValue |= 4;
222 if (report.getErrorCount() != 0) returnValue |= 2;
223 if (report.getWarningCount() != 0) returnValue |= 1;
224 return returnValue;
225 }
226
227}

Callers 2

checkMethod · 0.95
validateFileMethod · 0.80

Calls 15

ofMethod · 0.95
toURLMethod · 0.95
checkMethod · 0.95
existsMethod · 0.80
resourceProviderMethod · 0.80
messageMethod · 0.65
buildMethod · 0.65
getFatalErrorCountMethod · 0.65
getErrorCountMethod · 0.65
getWarningCountMethod · 0.65
profileMethod · 0.45
reportMethod · 0.45

Tested by

no test coverage detected