Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verhalten von "add" und "sum" bei fehlenden Elementen #417

Open
Tracked by #418 ...
edigonzales opened this issue Aug 18, 2024 · 0 comments
Open
Tracked by #418 ...

Verhalten von "add" und "sum" bei fehlenden Elementen #417

edigonzales opened this issue Aug 18, 2024 · 0 comments

Comments

@edigonzales
Copy link
Contributor

edigonzales commented Aug 18, 2024

Gegeben folgender Constraint:


MANDATORY CONSTRAINT CH058902: (
    Gesamtflaechenmass == add(add(sum("SelbstaendigesDauerndesRecht->Flaechenmass"), sum("Bergwerk->Flaechenmass")), sum("Liegenschaft->Flaechenmass")));

Ergibt folgendene Fehlermeldung:

Info: CH058902.xtf: DMAV_Grundstuecke_V1_0.Grundstuecke BID=62127943-3c53-444e-bb8e-65ab7f99ca43
Info:       1 objects in CLASS DMAV_Grundstuecke_V1_0.Grundstuecke.GSNachfuehrung
Info:       2 objects in CLASS DMAV_Grundstuecke_V1_0.Grundstuecke.Grundstueck
Info:       4 objects in CLASS DMAV_Grundstuecke_V1_0.Grundstuecke.Liegenschaft
Error: For input string: "false"
Error:     java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
Error:     java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
Error:     java.base/java.lang.Double.parseDouble(Double.java:792)
Error:     ch.interlis.iox_j.validator.functions.Math.evaluateFunction(Math.java:52)
Error:     ch.interlis.iox_j.validator.Validator.evaluateExpression(Validator.java:1821)
Error:     ch.interlis.iox_j.validator.functions.Math.evaluateFunction(Math.java:37)
Error:     ch.interlis.iox_j.validator.Validator.evaluateExpression(Validator.java:1821)
Error:     ch.interlis.iox_j.validator.Validator.evaluateExpressionToSingleValue(Validator.java:1457)
Error:     ch.interlis.iox_j.validator.Validator.evaluateExpression(Validator.java:1482)
Error:     ch.interlis.iox_j.validator.Validator.evaluateExpression(Validator.java:1650)
Error:     ch.interlis.iox_j.validator.Validator.validateMandatoryConstraint(Validator.java:1420)
Error:     ch.interlis.iox_j.validator.Validator.iterateThroughAllObjects(Validator.java:845)
Error:     ch.interlis.iox_j.validator.Validator.doSecondPass(Validator.java:637)
Error:     org.interlis2.validator.Validator.validate(Validator.java:467)
Error:     org.interlis2.validator.Validator.runValidation(Validator.java:82)
Error:     org.interlis2.validator.Main.main(Main.java:216)
Info: ...validation failed

Es gibt im XTF keine Bergwerke und SelbstRechte, sondern nur Liegenschaften. Wenn ich nur Gesamtflaechenmass ==sum("Liegenschaft->Flaechenmass") verwende, funktioniert der Constraint.

java -jar ilivalidator.jar --config ilidata:DMAV_V1_0_Validierung CH058902.xtf

CH058902.xtf.zip

cc @romefi @Luescher @olivergrimm

@edigonzales edigonzales changed the title Verhalten von "add" und "sum" fehlenden Elementen Verhalten von "add" und "sum" bei fehlenden Elementen Aug 19, 2024
@olivergrimm olivergrimm mentioned this issue Aug 19, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant