(wip) Rückgabe von Informationen für den Fehlerfall

This commit is contained in:
Andreas Penski (init) 2019-06-24 15:39:50 +02:00 committed by Andreas Penski
parent dc3f62670c
commit 88b3f01276
3 changed files with 34 additions and 6 deletions

View file

@ -49,10 +49,17 @@ public class DefaultResult implements Result {
@Getter
private List<XmlError> schemaViolations = new ArrayList<>();
@Getter
private List<String> processingErrors = new ArrayList<>();
@Getter
@Setter(AccessLevel.PACKAGE)
private List<SchematronOutput> schematronResult;
@Getter
@Setter
private boolean processingSuccessful;
public DefaultResult(final XdmNode report, final AcceptRecommendation recommendation, final ContentRepository repository) {
this.report = report;
this.acceptRecommendation = recommendation;
@ -76,10 +83,9 @@ public class DefaultResult implements Result {
*/
@Override
public boolean isAcceptable() {
return AcceptRecommendation.ACCEPTABLE.equals(this.acceptRecommendation);
return isProcessingSuccessful() && AcceptRecommendation.ACCEPTABLE.equals(this.acceptRecommendation);
}
public List<String> extractHtmlAsString() {
return extractHtml().stream().map(DefaultResult::convertToString).collect(Collectors.toList());
}