Evaluates constraints and determines whether to return false
, uncertain
, or true
, depending on the result.
If any nested constraint returns false
, that is the result. Otherwise, if any nested constraint returns uncertain
, that is the result. (A comparison of structure concepts with any missing properties will return uncertain
; for more details, read about Structure Equivalence.) The result is true
if and only if all the nested constraints return true
.
Joins can be made conditional by wrapping their constraints in if
blocks.
This equivalence
block compares two latitude
and longitude
values in a GeoPoint
, specifying values for equivalence and uncertainty.
structure (GeoPoint) {
...
equivalence: join {
fuzzy-numeric-equality (latitude) {
true-tolerance (0.00005)
uncertain-tolerance (0.005)
}
fuzzy-numeric-equality (longitude) {
true-tolerance (0.00005)
uncertain-tolerance (0.005)
}
}
}
This block demonstrates a conditional constraint:
equivalence: join {
equal-values (label)
equivalent-values (performer)
equivalent-values (venue)
if (label == 'SingleEvent') {
equivalent-values (events)
}
}
fuzzy-numeric-equality optional | Constraint that relaxes the equivalence threshold for float values (primitive type decimal) |
fuzzy-string-equality optional | Constraint that relaxes the equivalence threshold for strings (primitive type name) |
inherit-predicates optional | Inherit the equivalent policy from a parent concept |
never-equivalent optional | Never set types equal to each other |