From 36f902b3201800996a1bb2f8e54d66fec2ec3644 Mon Sep 17 00:00:00 2001 From: "Lange, Dr. Herbert" <herbert.lange@uni-hamburg.de> Date: Mon, 16 May 2022 11:22:57 +0200 Subject: [PATCH] call other checkers as part of the refco checker --- .../validation/quest/RefcoChecker.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/main/java/de/uni_hamburg/corpora/validation/quest/RefcoChecker.java b/src/main/java/de/uni_hamburg/corpora/validation/quest/RefcoChecker.java index e1b79029..28dd5c8a 100644 --- a/src/main/java/de/uni_hamburg/corpora/validation/quest/RefcoChecker.java +++ b/src/main/java/de/uni_hamburg/corpora/validation/quest/RefcoChecker.java @@ -709,6 +709,12 @@ public class RefcoChecker extends Checker implements CorpusFunction { if (!props.containsKey("skip-documentation-check") || !props.getProperty("skip-documentation-check").equalsIgnoreCase("true")) report.merge(refcoDocumentationCheck()); + // Generic tier test + props.put("elan-speakers", + criteria.sessions.stream().map((s) -> + s.speakerName).collect(Collectors.joining(","))); + ELANTierStructureChecker etsc = new ELANTierStructureChecker(props); + report.merge(etsc.function(c,false)); // Apply function for each of the supported file. Again merge the reports for (CorpusData cdata : c.getCorpusData()) { //report.merge(function(cdata, fix)); @@ -2379,6 +2385,21 @@ public class RefcoChecker extends Checker implements CorpusFunction { Report report = new Report() ; // Check for ELAN data if (cd instanceof ELANData) { + // Generic checks + try { + // Part of ELANValidatorCheckes + // XsdChecker xc = new XsdChecker(props); + // report.merge(xc.function(cd, false)); + ELANValidatorChecker evc = new ELANValidatorChecker(props); + report.merge(evc.function(cd,false)); + } + catch (Exception e){ + report.addCritical(getFunction(), + ReportItem.newParamMap(new String[]{"function","filename","description", "exception"}, + new Object[]{getFunction(), cd.getFilename(), "Exception encountered when calling " + + "validation checker ", e})); + } + // Check the transcription // but parameter allows skipping if (!props.containsKey("skip-transcription-check") || -- GitLab