From c78501107ddbcd55229c33e1b0fcfaf0f252d8cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20L=C3=BCthi?= Date: Thu, 12 Oct 2023 14:24:58 +0200 Subject: [PATCH 1/8] Add ValidatorTestHelper --- .../iox_j/validator/ValidatorTestHelper.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/test/java/ch/interlis/iox_j/validator/ValidatorTestHelper.java diff --git a/src/test/java/ch/interlis/iox_j/validator/ValidatorTestHelper.java b/src/test/java/ch/interlis/iox_j/validator/ValidatorTestHelper.java new file mode 100644 index 00000000..c612c916 --- /dev/null +++ b/src/test/java/ch/interlis/iox_j/validator/ValidatorTestHelper.java @@ -0,0 +1,27 @@ +package ch.interlis.iox_j.validator; + +import ch.interlis.ili2c.Ili2cFailure; +import ch.interlis.ili2c.config.Configuration; +import ch.interlis.ili2c.config.FileEntry; +import ch.interlis.ili2c.config.FileEntryKind; +import ch.interlis.ili2c.metamodel.TransferDescription; +import org.junit.Assert; + +import static org.junit.Assert.assertNotNull; + +public class ValidatorTestHelper { + public static TransferDescription compileIliFile(String filename) { + Configuration ili2cConfig = new Configuration(); + FileEntry fileEntry = new FileEntry(filename, FileEntryKind.ILIMODELFILE); + ili2cConfig.addFileEntry(fileEntry); + TransferDescription td = null; + try { + td = ch.interlis.ili2c.Ili2c.runCompiler(ili2cConfig); + } catch (Ili2cFailure e) { + Assert.fail("Could not compile ili file <" + filename + ">: " + e.getMessage()); + } + assertNotNull(td); + + return td; + } +} From f2d3df0e57f6c3042151765ba51e88d9f895fd30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20L=C3=BCthi?= Date: Thu, 12 Oct 2023 15:19:07 +0200 Subject: [PATCH 2/8] Extend LogCollector with clear option --- src/test/java/ch/interlis/iox_j/validator/LogCollector.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/java/ch/interlis/iox_j/validator/LogCollector.java b/src/test/java/ch/interlis/iox_j/validator/LogCollector.java index f528c709..d2a1105f 100644 --- a/src/test/java/ch/interlis/iox_j/validator/LogCollector.java +++ b/src/test/java/ch/interlis/iox_j/validator/LogCollector.java @@ -42,4 +42,10 @@ public ArrayList getWarn() { public ArrayList getInfo() { return info; } + + public void clear() { + errs.clear(); + warn.clear(); + info.clear(); + } } From a3a52355779884fc42d82f2983bc807844661a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20L=C3=BCthi?= Date: Thu, 12 Oct 2023 15:20:16 +0200 Subject: [PATCH 3/8] Add tests for domains with constraints ili24 --- src/test/data/validator/DomainDef.ili | 22 ++++ .../iox_j/validator/DomainDef24Test.java | 123 ++++++++++++++++++ 2 files changed, 145 insertions(+) create mode 100644 src/test/data/validator/DomainDef.ili create mode 100644 src/test/java/ch/interlis/iox_j/validator/DomainDef24Test.java diff --git a/src/test/data/validator/DomainDef.ili b/src/test/data/validator/DomainDef.ili new file mode 100644 index 00000000..125bf6b6 --- /dev/null +++ b/src/test/data/validator/DomainDef.ili @@ -0,0 +1,22 @@ +INTERLIS 2.4; + +MODEL ModelA AT "http://www.interlis.ch/ili2c/tests/" VERSION "1" = + TOPIC TopicA = + DOMAIN + DomainText = TEXT*30; + DomainTextRestrictedThis = TEXT*30 CONSTRAINTS Values : THIS == "SomeConstant"; + DomainConstraintThisFunction = TEXT*30 CONSTRAINTS Length : INTERLIS.len(THIS) > 20; + DomainMultiConstraintsNumeric = 0 .. 200 CONSTRAINTS Min : THIS > 10, Max100 : THIS <= 100; + DomainExtends EXTENDS DomainMultiConstraintsNumeric = 0 .. 150 CONSTRAINTS Max50 : THIS <= 50; + + + CLASS ObjectUnderTest = + DomainText : DomainText; + DomainTextRestrictedThis : DomainTextRestrictedThis; + DomainConstraintThisFunction : DomainConstraintThisFunction; + DomainMultiConstraintsNumeric : DomainMultiConstraintsNumeric; + DomainExtends : DomainExtends; + END ObjectUnderTest; + + END TopicA; +END ModelA. \ No newline at end of file diff --git a/src/test/java/ch/interlis/iox_j/validator/DomainDef24Test.java b/src/test/java/ch/interlis/iox_j/validator/DomainDef24Test.java new file mode 100644 index 00000000..c2b54cc9 --- /dev/null +++ b/src/test/java/ch/interlis/iox_j/validator/DomainDef24Test.java @@ -0,0 +1,123 @@ +package ch.interlis.iox_j.validator; + +import ch.ehi.basics.settings.Settings; +import ch.interlis.ili2c.metamodel.TransferDescription; +import ch.interlis.iom_j.Iom_jObject; +import ch.interlis.iox_j.EndBasketEvent; +import ch.interlis.iox_j.EndTransferEvent; +import ch.interlis.iox_j.ObjectEvent; +import ch.interlis.iox_j.PipelinePool; +import ch.interlis.iox_j.StartBasketEvent; +import ch.interlis.iox_j.StartTransferEvent; +import ch.interlis.iox_j.logging.LogEventFactory; +import org.junit.Before; +import org.junit.Test; + +import java.util.UUID; + +import static ch.interlis.iox_j.validator.LogCollectorAssertions.*; + +public class DomainDef24Test { + private TransferDescription td = null; + private Validator validator; + private LogCollector logger = null; + + @Before + public void setUp() throws Exception { + td = ValidatorTestHelper.compileIliFile("src/test/data/validator/DomainDef.ili"); + + ValidationConfig modelConfig = new ValidationConfig(); + logger = new LogCollector(); + LogEventFactory errFactory = new LogEventFactory(); + Settings settings = new Settings(); + validator = new Validator(td, modelConfig, logger, errFactory, new PipelinePool(), settings); + } + + @Test + public void domainText() { + final String domainText = "DomainText"; + validateObjectUnderTest(domainText, "This String has 24 chars"); + AssertContainsError(domainText, 0, logger); + + logger.clear(); + validateObjectUnderTest("DomainText", "This String has over 30 characters."); + AssertContainsError(domainText, 1, logger); + + } + + @Test + public void domainTextRestrictedThis() { + final String domainTextRestrictedThis = "DomainTextRestrictedThis"; + validateObjectUnderTest(domainTextRestrictedThis, "SomeConstant"); + AssertContainsError(domainTextRestrictedThis, 0, logger); + + logger.clear(); + validateObjectUnderTest(domainTextRestrictedThis, "Not the required Constant"); + AssertContainsError(domainTextRestrictedThis, 1, logger); + } + + @Test + public void domainConstraintThisFunction() { + final String domainConstraintThisFunction = "DomainConstraintThisFunction"; + validateObjectUnderTest(domainConstraintThisFunction, "This String has 24 chars"); + AssertContainsError(domainConstraintThisFunction, 0, logger); + + logger.clear(); + validateObjectUnderTest(domainConstraintThisFunction, "Too few chars"); + AssertContainsError(domainConstraintThisFunction, 1, logger); + } + + @Test + public void domainMultiConstraintsNumeric() { + final String domainMultiConstraintsNumeric = "DomainMultiConstraintsNumeric"; + validateObjectUnderTest(domainMultiConstraintsNumeric, "20"); + AssertContainsError(domainMultiConstraintsNumeric, 0, logger); + + logger.clear(); + validateObjectUnderTest(domainMultiConstraintsNumeric, "9"); + AssertContainsError(domainMultiConstraintsNumeric, 1, logger); + + logger.clear(); + validateObjectUnderTest(domainMultiConstraintsNumeric, "101"); + AssertContainsError(domainMultiConstraintsNumeric, 1, logger); + + logger.clear(); + validateObjectUnderTest(domainMultiConstraintsNumeric, "201"); + AssertContainsError(domainMultiConstraintsNumeric, 2, logger); + } + + @Test + public void domainExtends() { + final String domainExtends = "DomainExtends"; + validateObjectUnderTest(domainExtends, "20"); + AssertContainsError(domainExtends, 0, logger); + + logger.clear(); + validateObjectUnderTest(domainExtends, "9"); + AssertContainsError(domainExtends, 1, logger); + + logger.clear(); + validateObjectUnderTest(domainExtends, "51"); + AssertContainsError(domainExtends, 1, logger); + + logger.clear(); + validateObjectUnderTest(domainExtends, "101"); + AssertContainsError(domainExtends, 2, logger); + + logger.clear(); + validateObjectUnderTest(domainExtends, "151"); + AssertContainsError(domainExtends, 3, logger); + } + + private void validateObjectUnderTest(String attributeName, String attributeValue) { + Iom_jObject iomObj = new Iom_jObject("ModelA.TopicA.ObjectUnderTest", UUID.randomUUID().toString()); + iomObj.setattrvalue(attributeName, attributeValue); + + validator.validate(new StartTransferEvent()); + validator.validate(new StartBasketEvent("ModelA.TopicA", UUID.randomUUID().toString())); + validator.validate(new ObjectEvent(iomObj)); + validator.validate(new EndBasketEvent()); + validator.validate(new EndTransferEvent()); + } + +} From 8cb934f3c3c72d8e24f918fa93ba149b36cdcb04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20L=C3=BCthi?= Date: Mon, 16 Oct 2023 10:25:58 +0200 Subject: [PATCH 4/8] Add evaluation for ValueRefThis in context of domain constraints --- .../interlis/iox_j/validator/Validator.java | 32 +++++++++++++++++-- .../validator/ValidatorMessages.properties | 1 + .../iox_j/validator/DomainDef24Test.java | 24 ++++++++------ 3 files changed, 44 insertions(+), 13 deletions(-) diff --git a/src/main/java/ch/interlis/iox_j/validator/Validator.java b/src/main/java/ch/interlis/iox_j/validator/Validator.java index 321f7bf6..1e1706a7 100644 --- a/src/main/java/ch/interlis/iox_j/validator/Validator.java +++ b/src/main/java/ch/interlis/iox_j/validator/Validator.java @@ -17,6 +17,8 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import ch.interlis.ili2c.generator.Interlis2Generator; +import ch.interlis.ili2c.metamodel.DomainConstraint; +import ch.interlis.ili2c.metamodel.ValueRefThis; import com.vividsolutions.jts.geom.Coordinate; import ch.ehi.basics.logging.EhiLogger; import ch.ehi.basics.settings.Settings; @@ -1753,7 +1755,11 @@ public Value evaluateExpression(IomObject parentObject, String validationKind, S Value listOfIomObjectsValue = new Value(listOfIomObjects); functions.put(expression, listOfIomObjectsValue); return listOfIomObjectsValue; - } else if(expression instanceof ParameterValue) { + } else if (expression instanceof ValueRefThis) { + Domain domain = (Domain) td.getElement(iomObj.getobjecttag()); + String value = iomObj.getattrvalue("Value"); + return new Value(domain.getType(), value); + } else if(expression instanceof ParameterValue) { ParameterValue paramValue=(ParameterValue)expression; String paramName=paramValue.getParameter().getScopedName(); String value=(String)td.getActualRuntimeParameter(paramName); @@ -4094,9 +4100,29 @@ private void validateAttrValue(Viewable eleClass,IomObject iomObj, AttributeDef } } } + if (attr.getDomain() instanceof TypeAlias) { + Domain domain = ((TypeAlias) attr.getDomain()).getAliasing(); + String rootDomainName = domain.getScopedName(null); + + while (domain != null) { + Iterator iterator = domain.iterator(); + while (iterator.hasNext()){ + DomainConstraint constraint = iterator.next(); + Iom_jObject iomValueObject = new Iom_jObject(rootDomainName, null); + iomValueObject.setattrvalue("Value", iomObj.getattrprim(attrName, structi)); + + Value result = evaluateExpression(null, constraint.getScopedName(), rootDomainName, iomValueObject, constraint.getCondition(), null); + + if (!result.isTrue()){ + logMsg(validateType, rsrc.getString("validateAttrValue.attributeXDoesNotSatisfyTheDomainConstraintY"), attrPath, constraint.getScopedName()); + } + } + domain = domain.getExtending(); + } + } } - } - } + } + } static private Cardinality getCardinality(AttributeDef attr) { // move to ili2c Type type=attr.getDomainOrDerivedDomain(); diff --git a/src/main/resources/ch/interlis/iox_j/validator/ValidatorMessages.properties b/src/main/resources/ch/interlis/iox_j/validator/ValidatorMessages.properties index 854c2f30..255290e1 100644 --- a/src/main/resources/ch/interlis/iox_j/validator/ValidatorMessages.properties +++ b/src/main/resources/ch/interlis/iox_j/validator/ValidatorMessages.properties @@ -99,6 +99,7 @@ validateAttrValue.attributeXHasAnUnexpectedTypeY=Attribute {0} has an unexpected validateAttrValue.valueXIsNotAValidOidInAttributeY=value <{0}> is not a valid OID in attribute {1} validateAttrValue.attributeXHasAInvalidValueY=Attribute <{0}> has a invalid value <{1}> validateAttrValue.valueXIsAOutOfRangeInAttributeY=Value <{0}> is a out of range in attribute <{1}> +validateAttrValue.attributeXDoesNotSatisfyTheDomainConstraintY=Attribute {0} does not satisfy the domain constraint {1} validateTextType.attributeXIsLengthRestrictedToY=Attribute {0} is length restricted to {1} validateTextType.attributeXMustNotContainControlCharacters=Attribute {0} must not contain control characters validateTextType.attributeXHasAnUnexpectedTypeY=Attribute {0} has an unexpected type {1} diff --git a/src/test/java/ch/interlis/iox_j/validator/DomainDef24Test.java b/src/test/java/ch/interlis/iox_j/validator/DomainDef24Test.java index c2b54cc9..462fbed4 100644 --- a/src/test/java/ch/interlis/iox_j/validator/DomainDef24Test.java +++ b/src/test/java/ch/interlis/iox_j/validator/DomainDef24Test.java @@ -41,7 +41,7 @@ public void domainText() { logger.clear(); validateObjectUnderTest("DomainText", "This String has over 30 characters."); - AssertContainsError(domainText, 1, logger); + AssertContainsError("Attribute DomainText is length restricted to 30", 1, logger); } @@ -53,7 +53,7 @@ public void domainTextRestrictedThis() { logger.clear(); validateObjectUnderTest(domainTextRestrictedThis, "Not the required Constant"); - AssertContainsError(domainTextRestrictedThis, 1, logger); + AssertContainsError("Attribute DomainTextRestrictedThis does not satisfy the domain constraint ModelA.TopicA.DomainTextRestrictedThis.Values", 1, logger); } @Test @@ -64,7 +64,7 @@ public void domainConstraintThisFunction() { logger.clear(); validateObjectUnderTest(domainConstraintThisFunction, "Too few chars"); - AssertContainsError(domainConstraintThisFunction, 1, logger); + AssertContainsError("Attribute DomainConstraintThisFunction does not satisfy the domain constraint ModelA.TopicA.DomainConstraintThisFunction.Length", 1, logger); } @Test @@ -75,15 +75,16 @@ public void domainMultiConstraintsNumeric() { logger.clear(); validateObjectUnderTest(domainMultiConstraintsNumeric, "9"); - AssertContainsError(domainMultiConstraintsNumeric, 1, logger); + AssertContainsError("Attribute DomainMultiConstraintsNumeric does not satisfy the domain constraint ModelA.TopicA.DomainMultiConstraintsNumeric.Min", 1, logger); logger.clear(); validateObjectUnderTest(domainMultiConstraintsNumeric, "101"); - AssertContainsError(domainMultiConstraintsNumeric, 1, logger); + AssertContainsError("Attribute DomainMultiConstraintsNumeric does not satisfy the domain constraint ModelA.TopicA.DomainMultiConstraintsNumeric.Max100", 1, logger); logger.clear(); validateObjectUnderTest(domainMultiConstraintsNumeric, "201"); - AssertContainsError(domainMultiConstraintsNumeric, 2, logger); + AssertContainsError("value 201 is out of range in attribute DomainMultiConstraintsNumeric", 1, logger); + AssertContainsError("Attribute DomainMultiConstraintsNumeric does not satisfy the domain constraint ModelA.TopicA.DomainMultiConstraintsNumeric.Max100", 1, logger); } @Test @@ -94,19 +95,22 @@ public void domainExtends() { logger.clear(); validateObjectUnderTest(domainExtends, "9"); - AssertContainsError(domainExtends, 1, logger); + AssertContainsError("Attribute DomainExtends does not satisfy the domain constraint ModelA.TopicA.DomainMultiConstraintsNumeric.Min", 1, logger); logger.clear(); validateObjectUnderTest(domainExtends, "51"); - AssertContainsError(domainExtends, 1, logger); + AssertContainsError("Attribute DomainExtends does not satisfy the domain constraint ModelA.TopicA.DomainExtends.Max50", 1, logger); logger.clear(); validateObjectUnderTest(domainExtends, "101"); - AssertContainsError(domainExtends, 2, logger); + AssertContainsError("Attribute DomainExtends does not satisfy the domain constraint ModelA.TopicA.DomainExtends.Max50", 1, logger); + AssertContainsError("Attribute DomainExtends does not satisfy the domain constraint ModelA.TopicA.DomainMultiConstraintsNumeric.Max100", 1, logger); logger.clear(); validateObjectUnderTest(domainExtends, "151"); - AssertContainsError(domainExtends, 3, logger); + AssertContainsError("value 151 is out of range in attribute DomainExtends", 1, logger); + AssertContainsError("Attribute DomainExtends does not satisfy the domain constraint ModelA.TopicA.DomainExtends.Max50", 1, logger); + AssertContainsError("Attribute DomainExtends does not satisfy the domain constraint ModelA.TopicA.DomainMultiConstraintsNumeric.Max100", 1, logger); } private void validateObjectUnderTest(String attributeName, String attributeValue) { From d5e207e22e119cb0b714498997e4e5f4e7cd5bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20L=C3=BCthi?= Date: Tue, 17 Oct 2023 17:02:04 +0200 Subject: [PATCH 5/8] Indent using spaces --- src/main/java/ch/interlis/iox_j/validator/Validator.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/ch/interlis/iox_j/validator/Validator.java b/src/main/java/ch/interlis/iox_j/validator/Validator.java index 1e1706a7..95b65632 100644 --- a/src/main/java/ch/interlis/iox_j/validator/Validator.java +++ b/src/main/java/ch/interlis/iox_j/validator/Validator.java @@ -1756,10 +1756,10 @@ public Value evaluateExpression(IomObject parentObject, String validationKind, S functions.put(expression, listOfIomObjectsValue); return listOfIomObjectsValue; } else if (expression instanceof ValueRefThis) { - Domain domain = (Domain) td.getElement(iomObj.getobjecttag()); - String value = iomObj.getattrvalue("Value"); - return new Value(domain.getType(), value); - } else if(expression instanceof ParameterValue) { + Domain domain = (Domain) td.getElement(iomObj.getobjecttag()); + String value = iomObj.getattrvalue("Value"); + return new Value(domain.getType(), value); + } else if(expression instanceof ParameterValue) { ParameterValue paramValue=(ParameterValue)expression; String paramName=paramValue.getParameter().getScopedName(); String value=(String)td.getActualRuntimeParameter(paramName); From cd01babb8786a944b623e98d043450f9e2f45015 Mon Sep 17 00:00:00 2001 From: Patrick Ackermann Date: Tue, 14 Nov 2023 10:16:08 +0100 Subject: [PATCH 6/8] Fix build failure after merge --- src/main/java/ch/interlis/iox_j/validator/Validator.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/ch/interlis/iox_j/validator/Validator.java b/src/main/java/ch/interlis/iox_j/validator/Validator.java index cb83f6de..c5f15dc1 100644 --- a/src/main/java/ch/interlis/iox_j/validator/Validator.java +++ b/src/main/java/ch/interlis/iox_j/validator/Validator.java @@ -4241,8 +4241,7 @@ private void validateAttrValue(Viewable eleClass,IomObject iomObj, AttributeDef } } } - if (attr.getDomain() instanceof TypeAlias) { - Domain domain = ((TypeAlias) attr.getDomain()).getAliasing(); + if (domain != null) { String rootDomainName = domain.getScopedName(null); while (domain != null) { From fb35cf7f081fb41ca1d04f8adf97fab125869396 Mon Sep 17 00:00:00 2001 From: Patrick Ackermann Date: Tue, 14 Nov 2023 10:21:16 +0100 Subject: [PATCH 7/8] Create constant for ValueRefThis Iom_Object attribute name --- src/main/java/ch/interlis/iox_j/validator/Validator.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/interlis/iox_j/validator/Validator.java b/src/main/java/ch/interlis/iox_j/validator/Validator.java index c5f15dc1..811e31e3 100644 --- a/src/main/java/ch/interlis/iox_j/validator/Validator.java +++ b/src/main/java/ch/interlis/iox_j/validator/Validator.java @@ -139,6 +139,7 @@ public class Validator implements ch.interlis.iox.IoxValidator { private static final String ENUM_TREE_VALUES = "ENUM_TREE_VALUES"; + private static final String VALUE_REF_THIS = "Value"; public static final String ALL_OBJECTS_ACCESSIBLE="allObjectsAccessible"; public static final String REGEX_FOR_ID_VALIDATION = "^[0-9a-zA-Z_][0-9a-zA-Z\\_\\.\\-]*"; public static final String REGEX_FOR_TEXTOID_VALIDATION = "^[a-zA-Z_][0-9a-zA-Z\\_\\.\\-]*"; @@ -1893,7 +1894,7 @@ public Value evaluateExpression(IomObject parentObject, String validationKind, S return listOfIomObjectsValue; } else if (expression instanceof ValueRefThis) { Domain domain = (Domain) td.getElement(iomObj.getobjecttag()); - String value = iomObj.getattrvalue("Value"); + String value = iomObj.getattrvalue(VALUE_REF_THIS); return new Value(domain.getType(), value); } else if(expression instanceof ParameterValue) { ParameterValue paramValue=(ParameterValue)expression; @@ -4249,7 +4250,7 @@ private void validateAttrValue(Viewable eleClass,IomObject iomObj, AttributeDef while (iterator.hasNext()){ DomainConstraint constraint = iterator.next(); Iom_jObject iomValueObject = new Iom_jObject(rootDomainName, null); - iomValueObject.setattrvalue("Value", iomObj.getattrprim(attrName, structi)); + iomValueObject.setattrvalue(VALUE_REF_THIS, iomObj.getattrprim(attrName, structi)); Value result = evaluateExpression(null, constraint.getScopedName(), rootDomainName, iomValueObject, constraint.getCondition(), null); From 4a5e891f25c8036c7a7c7c617f61cf7868559a8b Mon Sep 17 00:00:00 2001 From: Patrick Ackermann Date: Wed, 15 Nov 2023 10:52:30 +0100 Subject: [PATCH 8/8] Use validator from constructor in Text functions Text functions evaluated its arguments with a new instance of the Validator class that was missing the td to evaluate THIS in domain constraints. --- src/main/java/ch/interlis/iox_j/validator/functions/Text.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/ch/interlis/iox_j/validator/functions/Text.java b/src/main/java/ch/interlis/iox_j/validator/functions/Text.java index e81dbe65..1c0605ef 100644 --- a/src/main/java/ch/interlis/iox_j/validator/functions/Text.java +++ b/src/main/java/ch/interlis/iox_j/validator/functions/Text.java @@ -25,8 +25,6 @@ public Text(Validator validator, TransferDescription td, ch.interlis.iox.IoxVali public Value evaluateFunction(Function currentFunction, FunctionCall functionCallObj, IomObject parentObject, String validationKind, String usageScope, IomObject iomObj, TextType texttype, RoleDef firstRole) { - Validator validator = new Validator(); - if (currentFunction.getScopedName(null).equals("Text.compareToIgnoreCase") || currentFunction.getScopedName(null).equals("Text.compareToIgnoreCaseM")) { Evaluable[] arguments = functionCallObj.getArguments();