Merge remote-tracking branch 'origin/branch-1.2.x'

# Conflicts:
#	CHANGELOG.md
#	src/main/java/de/kosit/validationtool/impl/model/BaseScenario.java
This commit is contained in:
Andreas Penski (init) 2020-03-23 11:14:29 +01:00
commit 6aab106075
11 changed files with 307 additions and 75 deletions

View file

@ -1,21 +1,21 @@
package de.kosit.validationtool.api;
/**
* Status der Empfehlung.
* Tri-state describtion of a Recommendation.
*/
public enum AcceptRecommendation {
/**
* Nicht definiert, weil eine Evaluierung nicht durchgeführt wurde, oder nicht durchgeführt werden konnte.
* The evaluation of the overall validation could not be computed.
*/
UNDEFINED,
/**
* Das Dokument ist gemäß Konfiguration valide und kann akzeptiert werden.
* Recommendation is to accept input based on the evaluation of the overall validation.
*/
ACCEPTABLE,
/**
* Das Dokuemnt ist gemäß Konfiguration invalide und sollte NICHT akzeptiert werden.
* Recommendation is to reject input based on the evaluation of the overall validation.
*/
REJECT
}
}

View file

@ -2,6 +2,7 @@ package de.kosit.validationtool.api;
import java.util.List;
import org.oclc.purl.dsdl.svrl.FailedAssert;
import org.oclc.purl.dsdl.svrl.SchematronOutput;
import org.w3c.dom.Document;
@ -9,7 +10,7 @@ import net.sf.saxon.s9api.XdmNode;
/**
* API Rückgabe Objekt des Ergebnisses des Validierungsprozesses.
*
*
* @author Andreas Penski
*/
public interface Result {
@ -17,7 +18,7 @@ public interface Result {
/**
* Zeigt an, ob die Verarbeitung durch den Validator erfolgreich durchlaufen wurde. Diese Funktion macht ausdrücklich
* keine Aussage über die zur Akzeptanz.
*
*
* @return true, wenn die Verarbeitung komplett und erfolgreich durchlaufen wurde
* @see #getAcceptRecommendation()
*/
@ -25,7 +26,7 @@ public interface Result {
/**
* Gibt eine Liste mit Verarbeitungsfehlermeldungen zurück.
*
*
* @return Liste mit Fehlermeldungen
*/
List<String> getProcessingErrors();
@ -36,7 +37,9 @@ public interface Result {
XdmNode getReport();
/**
* Das evaluierte Ergebnis.
* The Recommendation based on the evaluation of this Result.
*
* @return AcceptRecommendation
*/
AcceptRecommendation getAcceptRecommendation();
@ -62,22 +65,36 @@ public interface Result {
/**
* Liefert die Ergebnisse der Schematron-Prüfungen, in der Reihenfolge der Szenario-Konfiguration.
*
*
* @return Liste mit Schematron-Ergebnissen
*/
List<SchematronOutput> getSchematronResult();
/**
* Liefert ein true, wenn keine Schema-Violations vorhanden sind.
* Returns {@link org.oclc.purl.dsdl.svrl.FailedAssert FailedAsserts} of a schematron evaluation.
*
* @return list of {@link org.oclc.purl.dsdl.svrl.FailedAssert FailedAsserts}, if any, empty list otherwise
*/
List<FailedAssert> getFailedAsserts();
/**
* Liefert ein true, wenn keine Schema-Violations vorhanden sind.
*
* @return true wenn Schema-valide
*/
boolean isSchemaValid();
/**
* Liefert ein true, wenn der Prüfling eine well-formed XML-Datei ist.
*
*
* @return true wenn well-formed
*/
boolean isWellformed();
/**
* Returns true, if schematron has been checked and the result does not contain any {@link FailedAssert FailedAsserts}.
*
* @return true, if valid
*/
boolean isSchematronValid();
}