From e985fd247af5c00fb26ec8d86e8f2452170b0e45 Mon Sep 17 00:00:00 2001 From: Ioannis Rosuochatzakis Date: Mon, 23 Feb 2026 01:18:36 +0100 Subject: [PATCH] TEDEFO-4914 Deduplicate schematron rules that apply to all subtypes --- .../sdk/schematron/SchematronGenerator.java | 71 ++++++++++------ .../sdk/schematron/SchematronPattern.java | 71 +++++++++------- .../sdk/schematron/SchematronPhase.java | 8 +- .../eforms/sdk/schematron/SchematronRule.java | 36 +++++--- .../ted/efx/model/rules/AssertRule.java | 4 +- .../efx/model/rules/NoticeSubtypeRange.java | 23 ++++-- .../ted/efx/model/rules/ReportRule.java | 4 +- .../ted/efx/model/rules/ValidationRule.java | 10 +-- .../ted/efx/model/rules/ValidationStage.java | 37 ++++++++- .../ted/efx/sdk2/EfxRulesTranslatorV2.java | 4 +- .../efx/sdk2/EfxRulesTranslatorV2Test.java | 49 +++++++++-- .../dynamic/complete-validation.sch | 25 ++---- .../dynamic/validation-stage-1a-5.sch | 7 -- .../dynamic/validation-stage-1a-E1.sch | 7 -- .../dynamic/validation-stage-1a-E2.sch | 7 -- .../dynamic/validation-stage-1a-X01.sch | 7 -- ...stage-1a-3.sch => validation-stage-1a.sch} | 2 +- .../schematrons.json | 78 +----------------- .../static/complete-validation.sch | 25 ++---- .../static/validation-stage-1a-3.sch | 7 -- .../static/validation-stage-1a-4.sch | 7 -- .../static/validation-stage-1a-5.sch | 7 -- .../static/validation-stage-1a-E1.sch | 7 -- .../static/validation-stage-1a-E2.sch | 7 -- .../static/validation-stage-1a-X01.sch | 7 -- .../validation-stage-1a.sch} | 2 +- .../dynamic/complete-validation.sch | 51 ++++++++++++ .../dynamic/validation-stage-1a-1.sch | 1 - .../dynamic}/validation-stage-1a-2.sch | 1 - .../dynamic/validation-stage-1a.sch | 6 ++ .../input.efx | 13 +++ .../schematrons.json | 41 ++++++++++ .../static/complete-validation.sch | 51 ++++++++++++ .../static/validation-stage-1a-1.sch | 1 - .../static}/validation-stage-1a-2.sch | 1 - .../static/validation-stage-1a.sch | 6 ++ .../dynamic/complete-validation.sch | 82 +++++++++++++++++++ .../dynamic/validation-stage-1a.sch | 13 +++ .../dynamic/validation-stage-1b-1.sch | 9 ++ .../dynamic/validation-stage-1b-2.sch | 6 ++ .../dynamic/validation-stage-1b-3.sch | 6 ++ .../dynamic/validation-stage-2a.sch | 10 +++ .../dynamic/validation-stage-3a.sch | 9 ++ .../schematrons.json | 71 ++++++++++++++++ .../static/complete-validation.sch | 82 +++++++++++++++++++ .../static/validation-stage-1a.sch | 13 +++ .../static/validation-stage-1b-1.sch | 9 ++ .../static/validation-stage-1b-2.sch | 6 ++ .../static/validation-stage-1b-3.sch | 6 ++ .../static/validation-stage-2a.sch | 10 +++ .../static/validation-stage-3a.sch | 9 ++ 51 files changed, 753 insertions(+), 279 deletions(-) delete mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-5.sch delete mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-E1.sch delete mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-E2.sch delete mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-X01.sch rename src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/{validation-stage-1a-3.sch => validation-stage-1a.sch} (77%) delete mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-3.sch delete mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-4.sch delete mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-5.sch delete mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-E1.sch delete mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-E2.sch delete mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-X01.sch rename src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/{dynamic/validation-stage-1a-4.sch => static/validation-stage-1a.sch} (77%) create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/dynamic/complete-validation.sch rename src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/{testInClause_AllNoticeTypes => testInClause_MixedAllAndSpecific}/dynamic/validation-stage-1a-1.sch (79%) rename src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/{testInClause_AllNoticeTypes/static => testInClause_MixedAllAndSpecific/dynamic}/validation-stage-1a-2.sch (79%) create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/dynamic/validation-stage-1a.sch create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/input.efx create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/schematrons.json create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/static/complete-validation.sch rename src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/{testInClause_AllNoticeTypes => testInClause_MixedAllAndSpecific}/static/validation-stage-1a-1.sch (79%) rename src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/{testInClause_AllNoticeTypes/dynamic => testInClause_MixedAllAndSpecific/static}/validation-stage-1a-2.sch (79%) create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/static/validation-stage-1a.sch create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/complete-validation.sch create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-1a.sch create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-1b-1.sch create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-1b-2.sch create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-1b-3.sch create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-2a.sch create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-3a.sch create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/schematrons.json create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/complete-validation.sch create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-1a.sch create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-1b-1.sch create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-1b-2.sch create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-1b-3.sch create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-2a.sch create mode 100644 src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-3a.sch diff --git a/src/main/java/eu/europa/ted/eforms/sdk/schematron/SchematronGenerator.java b/src/main/java/eu/europa/ted/eforms/sdk/schematron/SchematronGenerator.java index 9ba42824..c1736813 100644 --- a/src/main/java/eu/europa/ted/eforms/sdk/schematron/SchematronGenerator.java +++ b/src/main/java/eu/europa/ted/eforms/sdk/schematron/SchematronGenerator.java @@ -151,20 +151,31 @@ public String generatePattern(SchematronPattern pattern, SchematronOutputConfig /** * Transforms validation stages into Schematron patterns. - * Creates one pattern per (stage, noticeType) combination, where each pattern - * only contains the rules/assertions that apply to that specific notice type. + * For each stage, first creates a shared pattern for rules that apply to all subtypes, + * then creates subtype-specific patterns for the remaining rules. */ private void transformStagesToPatterns(List stages, List patterns, Map diagnosticsMap) { for (ValidationStage stage : stages) { - // Get all notice types referenced in this stage - for (String noticeType : SchematronPattern.getNoticeTypesInStage(stage)) { - SchematronPattern pattern = new SchematronPattern(stage, noticeType); + // Create shared pattern for rules that apply to all subtypes + if (stage.containsUniversalRules()) { + SchematronPattern sharedPattern = new SchematronPattern(stage); + if (sharedPattern.hasRules()) { + patterns.add(sharedPattern); + diagnosticsMap.putAll(sharedPattern.getDiagnostics()); + logger.debug("Created shared pattern {} for stage {}", + sharedPattern.getId(), stage.getName()); + } + } + + // Create subtype-specific patterns for remaining rules + for (String noticeSubtype : stage.getNoticeSubtypes()) { + SchematronPattern pattern = new SchematronPattern(stage, noticeSubtype); if (pattern.hasRules()) { patterns.add(pattern); diagnosticsMap.putAll(pattern.getDiagnostics()); - logger.debug("Created pattern {} for stage {} / notice type {}", - pattern.getId(), stage.getName(), noticeType); + logger.debug("Created pattern {} for stage {} / notice subtype {}", + pattern.getId(), stage.getName(), noticeSubtype); } } } @@ -193,7 +204,7 @@ private void addDiagnosticsToSchema(Map diagnostic * @return A map of filename to file content for all generated Schematron files * @throws IOException If an error occurs during file generation */ - private Map generateOutputFiles(List noticeTypeIds, + private Map generateOutputFiles(List noticeSubtypeIds, List patterns, SchematronSchema baseSchema) throws IOException { logger.debug("Generating Schematron output files"); @@ -208,7 +219,7 @@ private Map generateOutputFiles(List noticeTypeIds, try { for (SchematronOutputConfig config : configs) { - generateOutputForConfig(config, noticeTypeIds, patterns, baseSchema, outputFiles, schematronsMetadata); + generateOutputForConfig(config, noticeSubtypeIds, patterns, baseSchema, outputFiles, schematronsMetadata); } // Generate schematrons.json with entries from all configurations @@ -229,7 +240,7 @@ private Map generateOutputFiles(List noticeTypeIds, */ private void generateOutputForConfig( SchematronOutputConfig config, - List noticeTypeIds, + List noticeSubtypeIds, List patterns, SchematronSchema baseSchema, Map outputFiles, @@ -280,13 +291,13 @@ private void generateOutputForConfig( } // Build and add phases to schema - Map> phasesMap = buildPhasesMapForConfig(noticeTypeIds, patterns, config); + Map> phasesMap = buildPhasesMapForConfig(noticeSubtypeIds, patterns, config); for (Map.Entry> entry : phasesMap.entrySet()) { - String noticeTypeId = entry.getKey(); + String noticeSubtypeId = entry.getKey(); List patternIds = entry.getValue(); if (!patternIds.isEmpty()) { - SchematronPhase phase = new SchematronPhase(noticeTypeId); + SchematronPhase phase = new SchematronPhase(noticeSubtypeId); for (String patternId : patternIds) { phase.addActivePattern(patternId); } @@ -314,33 +325,41 @@ private void generateOutputForConfig( } /** - * Builds a map from notice type ID to list of pattern IDs that apply to it, + * Builds a map from notice subtype ID to list of pattern IDs that apply to it, * filtered by the given output configuration. - * Each pattern now applies to exactly one notice type, so this is a simple grouping. - * Pattern order is preserved from the EFX file order. + * Shared patterns (applying to all subtypes) are added to every phase. + * Subtype-specific patterns are added only to their notice subtype's phase. * * @param config The output configuration specifying which rule natures to include - * @return Map of notice type ID to ordered list of pattern IDs + * @return Map of notice subtype ID to ordered list of pattern IDs */ - private Map> buildPhasesMapForConfig(List noticeTypeIds, + private Map> buildPhasesMapForConfig(List noticeSubtypeIds, List patterns, SchematronOutputConfig config) { Map> phasesMap = new LinkedHashMap<>(); - // Initialize map with all valid notice types - for (String noticeTypeId : noticeTypeIds) { - phasesMap.put(noticeTypeId, new ArrayList<>()); + // Initialize map with all valid notice subtypes + for (String noticeSubtypeId : noticeSubtypeIds) { + phasesMap.put(noticeSubtypeId, new ArrayList<>()); } - // Each pattern applies to exactly one notice type for (SchematronPattern pattern : patterns) { // Skip patterns that don't have rules matching this configuration if (!pattern.hasRulesFor(config.ruleNatures())) { continue; } - String noticeType = pattern.getNoticeType(); - List patternList = phasesMap.get(noticeType); - if (patternList != null) { - patternList.add(pattern.getId()); + + if (pattern.isShared()) { + // Shared patterns go into all phases + for (List patternList : phasesMap.values()) { + patternList.add(pattern.getId()); + } + } else { + // Subtype-specific patterns go only into their notice subtype's phase + String noticeSubtype = pattern.getNoticeSubtype(); + List patternList = phasesMap.get(noticeSubtype); + if (patternList != null) { + patternList.add(pattern.getId()); + } } } diff --git a/src/main/java/eu/europa/ted/eforms/sdk/schematron/SchematronPattern.java b/src/main/java/eu/europa/ted/eforms/sdk/schematron/SchematronPattern.java index b31f9e16..9941b080 100644 --- a/src/main/java/eu/europa/ted/eforms/sdk/schematron/SchematronPattern.java +++ b/src/main/java/eu/europa/ted/eforms/sdk/schematron/SchematronPattern.java @@ -15,40 +15,50 @@ import java.util.ArrayList; import java.util.LinkedHashMap; -import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; import eu.europa.ted.efx.model.rules.RuleNature; import eu.europa.ted.efx.model.rules.RuleSet; -import eu.europa.ted.efx.model.rules.ValidationRule; import eu.europa.ted.efx.model.rules.ValidationStage; import eu.europa.ted.efx.model.variables.Variable; /** * Represents a Schematron <pattern> element. - * Each pattern is specific to a stage AND a notice type, containing only - * the assertions that apply to that notice type. + * A pattern can be either subtype-specific (for a single notice subtype) or shared + * (for rules that apply to all notice subtypes). */ public class SchematronPattern { private final String stage; - private final String noticeType; + private final String noticeSubtype; private final List variables; private final List rules; /** - * Creates a pattern for a specific stage and notice type combination. - * Only includes rules/assertions that apply to the given notice type. + * Creates a shared pattern for a stage, containing only rules that apply to all subtypes. * * @param validationStage The validation stage - * @param noticeType The notice type to filter by */ - public SchematronPattern(ValidationStage validationStage, String noticeType) { + public SchematronPattern(ValidationStage validationStage) { this.stage = validationStage.getName(); - this.noticeType = noticeType; + this.noticeSubtype = null; this.variables = collectVariables(validationStage); - this.rules = createRules(validationStage, noticeType); + this.rules = createUniversalRules(validationStage); + } + + /** + * Creates a pattern for a specific stage and notice subtype combination. + * Only includes subtype-specific rules; rules that apply to all subtypes are excluded. + * + * @param validationStage The validation stage + * @param noticeSubtype The notice subtype to filter by + */ + public SchematronPattern(ValidationStage validationStage, String noticeSubtype) { + this.stage = validationStage.getName(); + this.noticeSubtype = noticeSubtype; + this.variables = collectVariables(validationStage); + this.rules = createSubtypeSpecificRules(validationStage, noticeSubtype); } private static List collectVariables(ValidationStage stage) { @@ -64,10 +74,10 @@ private static List collectVariables(ValidationStage stage) { return vars; } - private static List createRules(ValidationStage stage, String noticeType) { + private static List createUniversalRules(ValidationStage stage) { List rules = new ArrayList<>(); for (RuleSet ruleSet : stage.getRuleSets()) { - SchematronRule rule = new SchematronRule(ruleSet, noticeType); + SchematronRule rule = SchematronRule.createUniversalRule(ruleSet); if (rule.hasTests()) { rules.add(rule); } @@ -75,37 +85,36 @@ private static List createRules(ValidationStage stage, String no return rules; } - /** - * Returns all notice types referenced in the given stage. - * Used by SchematronGenerator to determine which patterns to create. - */ - public static Set getNoticeTypesInStage(ValidationStage stage) { - Set types = new LinkedHashSet<>(); + private static List createSubtypeSpecificRules(ValidationStage stage, String noticeSubtype) { + List rules = new ArrayList<>(); for (RuleSet ruleSet : stage.getRuleSets()) { - for (ValidationRule rule : ruleSet) { - if (rule.getNoticeSubtypes() != null) { - types.addAll(rule.getNoticeSubtypes().asList()); - } - } - ValidationRule fallback = ruleSet.getFallbackRule(); - if (fallback != null && fallback.getNoticeSubtypes() != null) { - types.addAll(fallback.getNoticeSubtypes().asList()); + SchematronRule rule = SchematronRule.createSubtypeSpecificRule(ruleSet, noticeSubtype); + if (rule.hasTests()) { + rules.add(rule); } } - return types; + return rules; } /** Used by pattern.ftl */ public String getId() { - return "validation-stage-" + this.stage + "-" + this.noticeType; + if (this.noticeSubtype == null) { + return "validation-stage-" + this.stage; + } + return "validation-stage-" + this.stage + "-" + this.noticeSubtype; } public String getStage() { return this.stage; } - public String getNoticeType() { - return this.noticeType; + public String getNoticeSubtype() { + return this.noticeSubtype; + } + + /** Returns true if this is a shared pattern (applies to all notice subtypes). */ + public boolean isShared() { + return this.noticeSubtype == null; } /** Used by pattern.ftl */ diff --git a/src/main/java/eu/europa/ted/eforms/sdk/schematron/SchematronPhase.java b/src/main/java/eu/europa/ted/eforms/sdk/schematron/SchematronPhase.java index 47b3bca2..bdead8d6 100644 --- a/src/main/java/eu/europa/ted/eforms/sdk/schematron/SchematronPhase.java +++ b/src/main/java/eu/europa/ted/eforms/sdk/schematron/SchematronPhase.java @@ -20,16 +20,16 @@ * Represents a Schematron <phase> element. */ public class SchematronPhase { - private final String noticeType; + private final String noticeSubtype; private final List activePatterns = new ArrayList<>(); - public SchematronPhase(String noticeType) { - this.noticeType = noticeType; + public SchematronPhase(String noticeSubtype) { + this.noticeSubtype = noticeSubtype; } /** Used by complete-validation.ftl */ public String getId() { - return "eforms-" + this.noticeType; + return "eforms-" + this.noticeSubtype; } /** Used by complete-validation.ftl */ diff --git a/src/main/java/eu/europa/ted/eforms/sdk/schematron/SchematronRule.java b/src/main/java/eu/europa/ted/eforms/sdk/schematron/SchematronRule.java index 1a1d3c32..0a3d1c85 100644 --- a/src/main/java/eu/europa/ted/eforms/sdk/schematron/SchematronRule.java +++ b/src/main/java/eu/europa/ted/eforms/sdk/schematron/SchematronRule.java @@ -18,6 +18,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.function.Predicate; import eu.europa.ted.efx.model.Context; import eu.europa.ted.efx.model.rules.RuleNature; @@ -35,12 +36,22 @@ public class SchematronRule { private final Context context; /** - * Creates a SchematronRule containing only tests that apply to the given notice type. - * - * @param ruleSet The source rule set - * @param noticeType The notice type to filter tests by + * Creates a SchematronRule for rules that apply to all notice subtypes (shared pattern). + */ + public static SchematronRule createUniversalRule(RuleSet ruleSet) { + return new SchematronRule(ruleSet, SchematronRule::isUniversal); + } + + /** + * Creates a SchematronRule for rules specific to a single notice subtype. + * Excludes rules that apply to all subtypes (those go into the shared pattern). */ - public SchematronRule(RuleSet ruleSet, String noticeType) { + public static SchematronRule createSubtypeSpecificRule(RuleSet ruleSet, String noticeSubtype) { + return new SchematronRule(ruleSet, + rule -> !isUniversal(rule) && appliesToNoticeSubtype(rule, noticeSubtype)); + } + + private SchematronRule(RuleSet ruleSet, Predicate filter) { this.context = ruleSet.getContext(); List variables = new ArrayList<>(); @@ -51,7 +62,7 @@ public SchematronRule(RuleSet ruleSet, String noticeType) { } for (ValidationRule validationRule : ruleSet) { - if (appliesToNoticeType(validationRule, noticeType)) { + if (filter.test(validationRule)) { if (validationRule instanceof ReportRule) { tests.add(new SchematronReport(validationRule, this.context)); } else { @@ -61,7 +72,7 @@ public SchematronRule(RuleSet ruleSet, String noticeType) { } ValidationRule fallback = ruleSet.getFallbackRule(); - if (fallback != null && appliesToNoticeType(fallback, noticeType)) { + if (fallback != null && filter.test(fallback)) { if (fallback instanceof ReportRule) { tests.add(new SchematronReport(fallback, this.context)); } else { @@ -73,9 +84,14 @@ public SchematronRule(RuleSet ruleSet, String noticeType) { this.tests = tests; } - private static boolean appliesToNoticeType(ValidationRule rule, String noticeType) { - return rule.getNoticeSubtypes() != null - && rule.getNoticeSubtypes().asList().contains(noticeType); + private static boolean isUniversal(ValidationRule rule) { + return rule.getNoticeSubtypeRange() != null + && rule.getNoticeSubtypeRange().isUniversal(); + } + + private static boolean appliesToNoticeSubtype(ValidationRule rule, String noticeSubtype) { + return rule.getNoticeSubtypeRange() != null + && rule.getNoticeSubtypeRange().asList().contains(noticeSubtype); } /** Used by pattern.ftl */ diff --git a/src/main/java/eu/europa/ted/efx/model/rules/AssertRule.java b/src/main/java/eu/europa/ted/efx/model/rules/AssertRule.java index 3c55c2d6..8f373dde 100644 --- a/src/main/java/eu/europa/ted/efx/model/rules/AssertRule.java +++ b/src/main/java/eu/europa/ted/efx/model/rules/AssertRule.java @@ -26,6 +26,6 @@ public AssertRule(ValidationRule other) { this.invertedCondition = other.invertedCondition; this.expression = other.expression; this.invertedConditionOrExpression = other.invertedConditionOrExpression; - this.noticeSubtypes = other.noticeSubtypes; + this.noticeSubtypeRange = other.noticeSubtypeRange; } -} \ No newline at end of file +} diff --git a/src/main/java/eu/europa/ted/efx/model/rules/NoticeSubtypeRange.java b/src/main/java/eu/europa/ted/efx/model/rules/NoticeSubtypeRange.java index bbfd56c3..377c694a 100644 --- a/src/main/java/eu/europa/ted/efx/model/rules/NoticeSubtypeRange.java +++ b/src/main/java/eu/europa/ted/efx/model/rules/NoticeSubtypeRange.java @@ -14,6 +14,7 @@ package eu.europa.ted.efx.model.rules; import java.util.ArrayList; +import java.util.HashSet; import java.util.List; import eu.europa.ted.efx.exceptions.InvalidUsageException; @@ -23,6 +24,7 @@ public class NoticeSubtypeRange implements ParsedEntity, Iterable { private final List noticeSubtypes; + private final boolean universal; public NoticeSubtypeRange(String rangeString, List validNoticeSubtypes) { @@ -33,9 +35,10 @@ public NoticeSubtypeRange(String rangeString, List validNoticeSubtypes) } rangeString = (rangeString == null) ? "" : rangeString.trim(); - + if (rangeString == "*" || rangeString.equalsIgnoreCase("ANY")) { - noticeSubtypes.addAll(validNoticeSubtypes); + this.noticeSubtypes.addAll(validNoticeSubtypes); + this.universal = true; return; } @@ -51,7 +54,7 @@ public NoticeSubtypeRange(String rangeString, List validNoticeSubtypes) if (idx < 0) { throw SymbolResolutionException.unknownNoticeSubtype(parts[0], rangeString); } - noticeSubtypes.add(validNoticeSubtypes.get(idx)); + this.noticeSubtypes.add(validNoticeSubtypes.get(idx)); break; } case 2: { @@ -68,7 +71,7 @@ public NoticeSubtypeRange(String rangeString, List validNoticeSubtypes) } for (int i = startIdx; i <= endIdx; i++) { - noticeSubtypes.add(validNoticeSubtypes.get(i)); + this.noticeSubtypes.add(validNoticeSubtypes.get(i)); } break; } @@ -77,18 +80,24 @@ public NoticeSubtypeRange(String rangeString, List validNoticeSubtypes) } } + this.universal = !validNoticeSubtypes.isEmpty() + && new HashSet<>(this.noticeSubtypes).containsAll(validNoticeSubtypes); + } + + public boolean isUniversal() { + return this.universal; } public List asList() { - return List.copyOf(noticeSubtypes); + return List.copyOf(this.noticeSubtypes); } public int size() { - return noticeSubtypes.size(); + return this.noticeSubtypes.size(); } @Override public java.util.Iterator iterator() { - return noticeSubtypes.iterator(); + return this.noticeSubtypes.iterator(); } } diff --git a/src/main/java/eu/europa/ted/efx/model/rules/ReportRule.java b/src/main/java/eu/europa/ted/efx/model/rules/ReportRule.java index fdd40f45..f38b29c2 100644 --- a/src/main/java/eu/europa/ted/efx/model/rules/ReportRule.java +++ b/src/main/java/eu/europa/ted/efx/model/rules/ReportRule.java @@ -25,6 +25,6 @@ public ReportRule(ValidationRule other) { this.invertedCondition = other.invertedCondition; this.expression = other.expression; this.invertedConditionOrExpression = other.invertedConditionOrExpression; - this.noticeSubtypes = other.noticeSubtypes; + this.noticeSubtypeRange = other.noticeSubtypeRange; } -} \ No newline at end of file +} diff --git a/src/main/java/eu/europa/ted/efx/model/rules/ValidationRule.java b/src/main/java/eu/europa/ted/efx/model/rules/ValidationRule.java index 0c8bf07a..c8df4d68 100644 --- a/src/main/java/eu/europa/ted/efx/model/rules/ValidationRule.java +++ b/src/main/java/eu/europa/ted/efx/model/rules/ValidationRule.java @@ -27,7 +27,7 @@ public class ValidationRule implements ParsedEntity { BooleanExpression invertedCondition; BooleanExpression expression; BooleanExpression invertedConditionOrExpression; - NoticeSubtypeRange noticeSubtypes; + NoticeSubtypeRange noticeSubtypeRange; public void setId(String id) { this.id = id; @@ -85,10 +85,10 @@ public BooleanExpression getInvertedConditionOrExpressionCombination() { return this.invertedConditionOrExpression; } - public void setNoticeSubtypes(NoticeSubtypeRange noticeSubtypes) { - this.noticeSubtypes = noticeSubtypes; + public void setNoticeSubtypeRange(NoticeSubtypeRange noticeSubtypeRange) { + this.noticeSubtypeRange = noticeSubtypeRange; } - public NoticeSubtypeRange getNoticeSubtypes() { - return this.noticeSubtypes; + public NoticeSubtypeRange getNoticeSubtypeRange() { + return this.noticeSubtypeRange; } } diff --git a/src/main/java/eu/europa/ted/efx/model/rules/ValidationStage.java b/src/main/java/eu/europa/ted/efx/model/rules/ValidationStage.java index 244b3251..4892788e 100644 --- a/src/main/java/eu/europa/ted/efx/model/rules/ValidationStage.java +++ b/src/main/java/eu/europa/ted/efx/model/rules/ValidationStage.java @@ -14,7 +14,9 @@ package eu.europa.ted.efx.model.rules; import java.util.ArrayList; +import java.util.LinkedHashSet; import java.util.List; +import java.util.Set; import eu.europa.ted.efx.model.ParsedEntity; import eu.europa.ted.efx.model.variables.Variable; @@ -50,4 +52,37 @@ public List getRuleSets() { public List getVariables() { return this.variables; } -} \ No newline at end of file + + public boolean containsUniversalRules() { + for (RuleSet ruleSet : this.ruleSets) { + for (ValidationRule rule : ruleSet) { + if (rule.getNoticeSubtypeRange() != null && rule.getNoticeSubtypeRange().isUniversal()) { + return true; + } + } + ValidationRule fallback = ruleSet.getFallbackRule(); + if (fallback != null && fallback.getNoticeSubtypeRange() != null + && fallback.getNoticeSubtypeRange().isUniversal()) { + return true; + } + } + return false; + } + + public Set getNoticeSubtypes() { + Set subtypes = new LinkedHashSet<>(); + for (RuleSet ruleSet : this.ruleSets) { + for (ValidationRule rule : ruleSet) { + if (rule.getNoticeSubtypeRange() != null && !rule.getNoticeSubtypeRange().isUniversal()) { + subtypes.addAll(rule.getNoticeSubtypeRange().asList()); + } + } + ValidationRule fallback = ruleSet.getFallbackRule(); + if (fallback != null && fallback.getNoticeSubtypeRange() != null + && !fallback.getNoticeSubtypeRange().isUniversal()) { + subtypes.addAll(fallback.getNoticeSubtypeRange().asList()); + } + } + return subtypes; + } +} diff --git a/src/main/java/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2.java b/src/main/java/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2.java index c85b463c..f117be9a 100644 --- a/src/main/java/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2.java +++ b/src/main/java/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2.java @@ -524,7 +524,7 @@ public void exitForClause(ForClauseContext ctx) { /** * Called when exiting an IN clause. - * The IN clause specifies which notice types the assertion applies to. + * The IN clause specifies which notice subtypes the assertion applies to. */ @Override public void exitInClause(InClauseContext ctx) { @@ -532,7 +532,7 @@ public void exitInClause(InClauseContext ctx) { String compressedList = ctx.noticeTypeList() instanceof AnyNoticeTypesContext ? "*" : ctx.noticeTypeList().getText(); var noticeSubtypes = new NoticeSubtypeRange(compressedList, this.symbols.getAllNoticeSubtypeIds()); - this.stack.peek(ValidationRule.class).setNoticeSubtypes(noticeSubtypes); + this.stack.peek(ValidationRule.class).setNoticeSubtypeRange(noticeSubtypes); this.completeValidation.addNoticeSubtypes(noticeSubtypes.asList()); } diff --git a/src/test/java/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test.java b/src/test/java/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test.java index e758677e..ed21e726 100644 --- a/src/test/java/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test.java +++ b/src/test/java/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test.java @@ -237,7 +237,40 @@ void testInClause_AllNoticeTypes() throws IOException { String testName = "testInClause_AllNoticeTypes"; Map outputFiles = translator.translateRules(readInput(testName)); - assertEquals(19, outputFiles.size(), "Should generate 19 files"); + assertEquals(5, outputFiles.size(), "Should generate 5 files"); + assertAllOutputs(testName, outputFiles); + } + + @Test + void testInClause_MixedAllAndSpecific() throws IOException { + String testName = "testInClause_MixedAllAndSpecific"; + Map outputFiles = translator.translateRules(readInput(testName)); + + // 1 shared + 2 specific per config (dynamic + static) + 2 complete-validation + schematrons.json + assertEquals(9, outputFiles.size(), "Should generate 9 files"); + + // Shared pattern exists (no subtype suffix) + assertTrue(outputFiles.containsKey("dynamic/validation-stage-1a.sch")); + // Subtype-specific patterns exist + assertTrue(outputFiles.containsKey("dynamic/validation-stage-1a-1.sch")); + assertTrue(outputFiles.containsKey("dynamic/validation-stage-1a-2.sch")); + + // Shared pattern should contain R-K7P-M2Q (the IN * rule) + String sharedPattern = outputFiles.get("dynamic/validation-stage-1a.sch"); + assertTrue(sharedPattern.contains("R-K7P-M2Q")); + assertFalse(sharedPattern.contains("R-X3F-N8W"), "Specific rule should not be in shared pattern"); + + // Specific patterns should contain R-X3F-N8W but not R-K7P-M2Q + String specific1 = outputFiles.get("dynamic/validation-stage-1a-1.sch"); + assertTrue(specific1.contains("R-X3F-N8W")); + assertFalse(specific1.contains("R-K7P-M2Q"), "Shared rule should not be in specific pattern"); + + // Complete validation should reference both shared and specific patterns in phases + String completeValidation = outputFiles.get("dynamic/complete-validation.sch"); + String phase1 = extractPhase(completeValidation, "eforms-1"); + assertTrue(phase1.contains("EFORMS-validation-stage-1a\""), "Phase 1 should include shared pattern"); + assertTrue(phase1.contains("EFORMS-validation-stage-1a-1"), "Phase 1 should include specific pattern"); + assertAllOutputs(testName, outputFiles); } @@ -468,19 +501,21 @@ void testOutput_FromSampleRulesFile() throws IOException { Map outputFiles = translator.translateRules(readInput(testName)); assertFalse(outputFiles.isEmpty(), "Output files should not be empty"); - assertEquals(57, outputFiles.size(), "Should generate exactly 57 files"); + assertEquals(15, outputFiles.size(), "Should generate exactly 15 files"); // Verify we have the expected files assertTrue(outputFiles.containsKey("dynamic/complete-validation.sch")); assertTrue(outputFiles.containsKey("static/complete-validation.sch")); assertTrue(outputFiles.containsKey("schematrons.json")); - // Check that patterns exist for each stage - assertTrue(outputFiles.keySet().stream().anyMatch(f -> f.startsWith("dynamic/validation-stage-1a-"))); + // Stages with only IN * rules produce shared patterns (no subtype suffix) + assertTrue(outputFiles.containsKey("dynamic/validation-stage-1a.sch")); + assertTrue(outputFiles.containsKey("dynamic/validation-stage-2a.sch")); + assertTrue(outputFiles.containsKey("dynamic/validation-stage-3a.sch")); + assertTrue(outputFiles.containsKey("static/validation-stage-1a.sch")); + + // Stage 1b has subtype-specific rules assertTrue(outputFiles.keySet().stream().anyMatch(f -> f.startsWith("dynamic/validation-stage-1b-"))); - assertTrue(outputFiles.keySet().stream().anyMatch(f -> f.startsWith("dynamic/validation-stage-2a-"))); - assertTrue(outputFiles.keySet().stream().anyMatch(f -> f.startsWith("dynamic/validation-stage-3a-"))); - assertTrue(outputFiles.keySet().stream().anyMatch(f -> f.startsWith("static/validation-stage-1a-"))); // Verify XML well-formedness for all .sch files for (Map.Entry entry : outputFiles.entrySet()) { diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/complete-validation.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/complete-validation.sch index a0f64303..b6b6f4b8 100644 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/complete-validation.sch +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/complete-validation.sch @@ -18,37 +18,30 @@ - + - + - + - + - + - + - + - + - - - - - - - - + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-5.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-5.sch deleted file mode 100644 index c23456f7..00000000 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-5.sch +++ /dev/null @@ -1,7 +0,0 @@ - - - - rule|text|R-K7P-M2Q - rule|text|R-X3F-N8W - - diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-E1.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-E1.sch deleted file mode 100644 index aa6a5dec..00000000 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-E1.sch +++ /dev/null @@ -1,7 +0,0 @@ - - - - rule|text|R-K7P-M2Q - rule|text|R-X3F-N8W - - diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-E2.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-E2.sch deleted file mode 100644 index 380cc4b3..00000000 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-E2.sch +++ /dev/null @@ -1,7 +0,0 @@ - - - - rule|text|R-K7P-M2Q - rule|text|R-X3F-N8W - - diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-X01.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-X01.sch deleted file mode 100644 index 2b030c92..00000000 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-X01.sch +++ /dev/null @@ -1,7 +0,0 @@ - - - - rule|text|R-K7P-M2Q - rule|text|R-X3F-N8W - - diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-3.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a.sch similarity index 77% rename from src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-3.sch rename to src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a.sch index b98a033d..a09a274b 100644 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-3.sch +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a.sch @@ -1,5 +1,5 @@ - + rule|text|R-K7P-M2Q rule|text|R-X3F-N8W diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/schematrons.json b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/schematrons.json index 64d06370..81228163 100644 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/schematrons.json +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/schematrons.json @@ -4,88 +4,18 @@ "type" : "dynamic", "filename" : "dynamic/complete-validation.sch" }, { - "name" : "validation-stage-1a-1", + "name" : "validation-stage-1a", "type" : "dynamic", "stage" : "1a", - "filename" : "dynamic/validation-stage-1a-1.sch" - }, { - "name" : "validation-stage-1a-2", - "type" : "dynamic", - "stage" : "1a", - "filename" : "dynamic/validation-stage-1a-2.sch" - }, { - "name" : "validation-stage-1a-3", - "type" : "dynamic", - "stage" : "1a", - "filename" : "dynamic/validation-stage-1a-3.sch" - }, { - "name" : "validation-stage-1a-4", - "type" : "dynamic", - "stage" : "1a", - "filename" : "dynamic/validation-stage-1a-4.sch" - }, { - "name" : "validation-stage-1a-5", - "type" : "dynamic", - "stage" : "1a", - "filename" : "dynamic/validation-stage-1a-5.sch" - }, { - "name" : "validation-stage-1a-E1", - "type" : "dynamic", - "stage" : "1a", - "filename" : "dynamic/validation-stage-1a-E1.sch" - }, { - "name" : "validation-stage-1a-E2", - "type" : "dynamic", - "stage" : "1a", - "filename" : "dynamic/validation-stage-1a-E2.sch" - }, { - "name" : "validation-stage-1a-X01", - "type" : "dynamic", - "stage" : "1a", - "filename" : "dynamic/validation-stage-1a-X01.sch" + "filename" : "dynamic/validation-stage-1a.sch" }, { "name" : "complete-validation", "type" : "static", "filename" : "static/complete-validation.sch" }, { - "name" : "validation-stage-1a-1", - "type" : "static", - "stage" : "1a", - "filename" : "static/validation-stage-1a-1.sch" - }, { - "name" : "validation-stage-1a-2", - "type" : "static", - "stage" : "1a", - "filename" : "static/validation-stage-1a-2.sch" - }, { - "name" : "validation-stage-1a-3", - "type" : "static", - "stage" : "1a", - "filename" : "static/validation-stage-1a-3.sch" - }, { - "name" : "validation-stage-1a-4", - "type" : "static", - "stage" : "1a", - "filename" : "static/validation-stage-1a-4.sch" - }, { - "name" : "validation-stage-1a-5", - "type" : "static", - "stage" : "1a", - "filename" : "static/validation-stage-1a-5.sch" - }, { - "name" : "validation-stage-1a-E1", - "type" : "static", - "stage" : "1a", - "filename" : "static/validation-stage-1a-E1.sch" - }, { - "name" : "validation-stage-1a-E2", - "type" : "static", - "stage" : "1a", - "filename" : "static/validation-stage-1a-E2.sch" - }, { - "name" : "validation-stage-1a-X01", + "name" : "validation-stage-1a", "type" : "static", "stage" : "1a", - "filename" : "static/validation-stage-1a-X01.sch" + "filename" : "static/validation-stage-1a.sch" } ] } diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/complete-validation.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/complete-validation.sch index a0f64303..b6b6f4b8 100644 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/complete-validation.sch +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/complete-validation.sch @@ -18,37 +18,30 @@ - + - + - + - + - + - + - + - + - - - - - - - - + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-3.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-3.sch deleted file mode 100644 index b98a033d..00000000 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-3.sch +++ /dev/null @@ -1,7 +0,0 @@ - - - - rule|text|R-K7P-M2Q - rule|text|R-X3F-N8W - - diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-4.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-4.sch deleted file mode 100644 index c5e3e5f5..00000000 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-4.sch +++ /dev/null @@ -1,7 +0,0 @@ - - - - rule|text|R-K7P-M2Q - rule|text|R-X3F-N8W - - diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-5.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-5.sch deleted file mode 100644 index c23456f7..00000000 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-5.sch +++ /dev/null @@ -1,7 +0,0 @@ - - - - rule|text|R-K7P-M2Q - rule|text|R-X3F-N8W - - diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-E1.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-E1.sch deleted file mode 100644 index aa6a5dec..00000000 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-E1.sch +++ /dev/null @@ -1,7 +0,0 @@ - - - - rule|text|R-K7P-M2Q - rule|text|R-X3F-N8W - - diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-E2.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-E2.sch deleted file mode 100644 index 380cc4b3..00000000 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-E2.sch +++ /dev/null @@ -1,7 +0,0 @@ - - - - rule|text|R-K7P-M2Q - rule|text|R-X3F-N8W - - diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-X01.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-X01.sch deleted file mode 100644 index 2b030c92..00000000 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-X01.sch +++ /dev/null @@ -1,7 +0,0 @@ - - - - rule|text|R-K7P-M2Q - rule|text|R-X3F-N8W - - diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-4.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a.sch similarity index 77% rename from src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-4.sch rename to src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a.sch index c5e3e5f5..a09a274b 100644 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-4.sch +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a.sch @@ -1,5 +1,5 @@ - + rule|text|R-K7P-M2Q rule|text|R-X3F-N8W diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/dynamic/complete-validation.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/dynamic/complete-validation.sch new file mode 100644 index 00000000..d35e1ae1 --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/dynamic/complete-validation.sch @@ -0,0 +1,51 @@ + + + + eForms schematron rules + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-1.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/dynamic/validation-stage-1a-1.sch similarity index 79% rename from src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-1.sch rename to src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/dynamic/validation-stage-1a-1.sch index c1aed84a..c7a528bb 100644 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-1.sch +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/dynamic/validation-stage-1a-1.sch @@ -1,7 +1,6 @@ - rule|text|R-K7P-M2Q rule|text|R-X3F-N8W diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-2.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/dynamic/validation-stage-1a-2.sch similarity index 79% rename from src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-2.sch rename to src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/dynamic/validation-stage-1a-2.sch index 15f14dec..9bbf4d9b 100644 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-2.sch +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/dynamic/validation-stage-1a-2.sch @@ -1,7 +1,6 @@ - rule|text|R-K7P-M2Q rule|text|R-X3F-N8W diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/dynamic/validation-stage-1a.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/dynamic/validation-stage-1a.sch new file mode 100644 index 00000000..24d8fce1 --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/dynamic/validation-stage-1a.sch @@ -0,0 +1,6 @@ + + + + rule|text|R-K7P-M2Q + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/input.efx b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/input.efx new file mode 100644 index 00000000..6ac9fc79 --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/input.efx @@ -0,0 +1,13 @@ +// Test: Mixed all-subtypes and specific-subtypes rules in the same stage +// The IN * rule should go into a shared pattern, the IN 1, 2 rule into specific patterns + +---- STAGE 1a ---- + +WITH BT-00-Text + ASSERT BT-00-Text is present + AS ERROR R-K7P-M2Q + FOR BT-00-Text IN * + + ASSERT not(empty(BT-00-Text)) + AS WARNING R-X3F-N8W + FOR BT-00-Text IN 1, 2 diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/schematrons.json b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/schematrons.json new file mode 100644 index 00000000..0e3ad93e --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/schematrons.json @@ -0,0 +1,41 @@ +{ + "schematrons" : [ { + "name" : "complete-validation", + "type" : "dynamic", + "filename" : "dynamic/complete-validation.sch" + }, { + "name" : "validation-stage-1a", + "type" : "dynamic", + "stage" : "1a", + "filename" : "dynamic/validation-stage-1a.sch" + }, { + "name" : "validation-stage-1a-1", + "type" : "dynamic", + "stage" : "1a", + "filename" : "dynamic/validation-stage-1a-1.sch" + }, { + "name" : "validation-stage-1a-2", + "type" : "dynamic", + "stage" : "1a", + "filename" : "dynamic/validation-stage-1a-2.sch" + }, { + "name" : "complete-validation", + "type" : "static", + "filename" : "static/complete-validation.sch" + }, { + "name" : "validation-stage-1a", + "type" : "static", + "stage" : "1a", + "filename" : "static/validation-stage-1a.sch" + }, { + "name" : "validation-stage-1a-1", + "type" : "static", + "stage" : "1a", + "filename" : "static/validation-stage-1a-1.sch" + }, { + "name" : "validation-stage-1a-2", + "type" : "static", + "stage" : "1a", + "filename" : "static/validation-stage-1a-2.sch" + } ] +} diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/static/complete-validation.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/static/complete-validation.sch new file mode 100644 index 00000000..d35e1ae1 --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/static/complete-validation.sch @@ -0,0 +1,51 @@ + + + + eForms schematron rules + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-1.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/static/validation-stage-1a-1.sch similarity index 79% rename from src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-1.sch rename to src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/static/validation-stage-1a-1.sch index c1aed84a..c7a528bb 100644 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/static/validation-stage-1a-1.sch +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/static/validation-stage-1a-1.sch @@ -1,7 +1,6 @@ - rule|text|R-K7P-M2Q rule|text|R-X3F-N8W diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-2.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/static/validation-stage-1a-2.sch similarity index 79% rename from src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-2.sch rename to src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/static/validation-stage-1a-2.sch index 15f14dec..9bbf4d9b 100644 --- a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_AllNoticeTypes/dynamic/validation-stage-1a-2.sch +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/static/validation-stage-1a-2.sch @@ -1,7 +1,6 @@ - rule|text|R-K7P-M2Q rule|text|R-X3F-N8W diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/static/validation-stage-1a.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/static/validation-stage-1a.sch new file mode 100644 index 00000000..24d8fce1 --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testInClause_MixedAllAndSpecific/static/validation-stage-1a.sch @@ -0,0 +1,6 @@ + + + + rule|text|R-K7P-M2Q + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/complete-validation.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/complete-validation.sch new file mode 100644 index 00000000..1504a80a --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/complete-validation.sch @@ -0,0 +1,82 @@ + + + + eForms schematron rules + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PathNode/TextField + ../PathNode/TextField + PathNode/CodeField + ../PathNode/IndicatorField + PathNode/IndicatorField + ../../PathNode/IndicatorField + + + + + + + + + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-1a.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-1a.sch new file mode 100644 index 00000000..8b79b850 --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-1a.sch @@ -0,0 +1,13 @@ + + + + rule|text|R-K7P-M2Q + + + rule|text|R-X3F-N8W + + + rule|text|R-H9T-V5L + rule|text|R-B6J-C4R + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-1b-1.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-1b-1.sch new file mode 100644 index 00000000..0cbf5d69 --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-1b-1.sch @@ -0,0 +1,9 @@ + + + + rule|text|R-Y2N-G7S + + + rule|text|R-D4K-P9M + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-1b-2.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-1b-2.sch new file mode 100644 index 00000000..85ac7dde --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-1b-2.sch @@ -0,0 +1,6 @@ + + + + rule|text|R-D4K-P9M + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-1b-3.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-1b-3.sch new file mode 100644 index 00000000..f1cb2f69 --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-1b-3.sch @@ -0,0 +1,6 @@ + + + + rule|text|R-D4K-P9M + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-2a.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-2a.sch new file mode 100644 index 00000000..c27121c4 --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-2a.sch @@ -0,0 +1,10 @@ + + + + + rule|text|R-F5V-T6B + + + rule|text|R-W1D-J2Y + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-3a.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-3a.sch new file mode 100644 index 00000000..1d6504e9 --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/dynamic/validation-stage-3a.sch @@ -0,0 +1,9 @@ + + + + rule|text|R-M3C-U8N + + + rule|text|R-S9L-R5K + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/schematrons.json b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/schematrons.json new file mode 100644 index 00000000..f22b7b25 --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/schematrons.json @@ -0,0 +1,71 @@ +{ + "schematrons" : [ { + "name" : "complete-validation", + "type" : "dynamic", + "filename" : "dynamic/complete-validation.sch" + }, { + "name" : "validation-stage-1a", + "type" : "dynamic", + "stage" : "1a", + "filename" : "dynamic/validation-stage-1a.sch" + }, { + "name" : "validation-stage-1b-1", + "type" : "dynamic", + "stage" : "1b", + "filename" : "dynamic/validation-stage-1b-1.sch" + }, { + "name" : "validation-stage-1b-2", + "type" : "dynamic", + "stage" : "1b", + "filename" : "dynamic/validation-stage-1b-2.sch" + }, { + "name" : "validation-stage-1b-3", + "type" : "dynamic", + "stage" : "1b", + "filename" : "dynamic/validation-stage-1b-3.sch" + }, { + "name" : "validation-stage-2a", + "type" : "dynamic", + "stage" : "2a", + "filename" : "dynamic/validation-stage-2a.sch" + }, { + "name" : "validation-stage-3a", + "type" : "dynamic", + "stage" : "3a", + "filename" : "dynamic/validation-stage-3a.sch" + }, { + "name" : "complete-validation", + "type" : "static", + "filename" : "static/complete-validation.sch" + }, { + "name" : "validation-stage-1a", + "type" : "static", + "stage" : "1a", + "filename" : "static/validation-stage-1a.sch" + }, { + "name" : "validation-stage-1b-1", + "type" : "static", + "stage" : "1b", + "filename" : "static/validation-stage-1b-1.sch" + }, { + "name" : "validation-stage-1b-2", + "type" : "static", + "stage" : "1b", + "filename" : "static/validation-stage-1b-2.sch" + }, { + "name" : "validation-stage-1b-3", + "type" : "static", + "stage" : "1b", + "filename" : "static/validation-stage-1b-3.sch" + }, { + "name" : "validation-stage-2a", + "type" : "static", + "stage" : "2a", + "filename" : "static/validation-stage-2a.sch" + }, { + "name" : "validation-stage-3a", + "type" : "static", + "stage" : "3a", + "filename" : "static/validation-stage-3a.sch" + } ] +} diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/complete-validation.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/complete-validation.sch new file mode 100644 index 00000000..1504a80a --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/complete-validation.sch @@ -0,0 +1,82 @@ + + + + eForms schematron rules + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PathNode/TextField + ../PathNode/TextField + PathNode/CodeField + ../PathNode/IndicatorField + PathNode/IndicatorField + ../../PathNode/IndicatorField + + + + + + + + + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-1a.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-1a.sch new file mode 100644 index 00000000..8b79b850 --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-1a.sch @@ -0,0 +1,13 @@ + + + + rule|text|R-K7P-M2Q + + + rule|text|R-X3F-N8W + + + rule|text|R-H9T-V5L + rule|text|R-B6J-C4R + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-1b-1.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-1b-1.sch new file mode 100644 index 00000000..0cbf5d69 --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-1b-1.sch @@ -0,0 +1,9 @@ + + + + rule|text|R-Y2N-G7S + + + rule|text|R-D4K-P9M + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-1b-2.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-1b-2.sch new file mode 100644 index 00000000..85ac7dde --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-1b-2.sch @@ -0,0 +1,6 @@ + + + + rule|text|R-D4K-P9M + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-1b-3.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-1b-3.sch new file mode 100644 index 00000000..f1cb2f69 --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-1b-3.sch @@ -0,0 +1,6 @@ + + + + rule|text|R-D4K-P9M + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-2a.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-2a.sch new file mode 100644 index 00000000..c27121c4 --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-2a.sch @@ -0,0 +1,10 @@ + + + + + rule|text|R-F5V-T6B + + + rule|text|R-W1D-J2Y + + diff --git a/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-3a.sch b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-3a.sch new file mode 100644 index 00000000..1d6504e9 --- /dev/null +++ b/src/test/resources/eu/europa/ted/efx/sdk2/EfxRulesTranslatorV2Test/testOutput_FromSampleRulesFile/static/validation-stage-3a.sch @@ -0,0 +1,9 @@ + + + + rule|text|R-M3C-U8N + + + rule|text|R-S9L-R5K + +