A join that only returns false
or true
, treating values that would be uncertain
as true
.
If any nested constraint returns false
, that is the result. Otherwise, the result will be true
.
Optimistic joins can be made conditional by wrapping their constraints in if
blocks.
structure (Business) {
property (address) {
type (viv.geo.Address)
}
// ... more properties ...
// Businesses get merged if their name and addresses match in a fuzzy
// way with an "uncertain" tolerance:
equivalence: optimistic-join {
convertible-concepts
equivalent-values (name)
equivalent-values (address)
}
}
This block demonstrates a conditional constraint:
equivalence: optimistic-join {
equal-values (label)
equivalent-values (performer)
equivalent-values (venue)
if (label == 'SingleEvent') {
equivalent-values (events)
}
}
distance-equality optional | As a special case, we can define equivalence rules for geo.GeoPoint properties using the distance-equality constraint, which returns true if two points are within a specified geographic distance of each other |
equal-concepts optional | Constraint that returns true if two concept instances can be converted to each other: both instances have the same concept type (for example, they are both Business concepts), or if one is a sub-type of the other |
equal-values optional | Constraint that declares that a property must be equal for the equivalence definition to return true |
equivalent-values optional | Constraint that specifies properties to use for testing structure equivalence |
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 |