For CTS URNs, the logic of URN comparison is determined by the comparison of the two independent hierarchical components identifying work and passage. The comparison of each component involves comparing each hierarchical element in the component for the first URN to the corresponding component in the second URN.
>
, >=
, <
and <=
)For two CTS URNs, u1
and u2
:
u1.passageComponent
contains u2.passageComponent
IFF every element of u2.passageComponent
has the same value as the corresponding element of u1.passageComponent
.u1.workComponent
contains u2.workComponent
IFF every element of u2.workComponent
has the same value as the corresponding element of u1.workComponent
.u1 > u2
IFF u1.passageComponent
contains u2.passageComponent
AND u1.workComponent
contains u2.workComponent
.u1 >= u2
if u1.passageComponent
contains u2.passageComponent
AND u1.workComponent
contains u2.workComponent
OR u1
== u2
u1 < u2
IFF u2.passageComponent
contains u1.passageComponent
AND u2.workComponent
contains u1.workComponent
.u1 <= u2
if u2.passageComponent
contains u1.passageComponent
AND u2.workComponent
contains u1.workComponent
OR u1
== u2
~~
function)u1.workComponent ~~ u2.workComponent
if:
u1.workComponent
contains u2.workComponent
ORu2.workComponent
contains u1.workComponent
u1.passageComponent ~~ u2.passageComponent
if:
u1.passageComponent
contains u2.passageComponent
ORu2.passageComponent
contains u1.passageComponent
u1 ~~ u2
IFF u1.passageComponent ~~ u2.passageComponent
AND u1.workComponent ~~ u2.workComponent
Note that the similarity operation is commutative: (u1 ~~ u2) == (u2 ~~ u1)
.
><
)The exclusion boolean function ><
is the complement of the two containment functions: it is true when both >
and <
are false.
The exclusion function is true when:
u1.passageComponent
and u2.passageComponent
has different values for u1
and u2
ORu1.workComponent
and u2.workComponent
has different values for u1
and u2
Containment relations for two CTS URNs u1
and u2
may be summarized as follows:
Passage component | Work component | ~~ |
>< |
> |
< |
---|---|---|---|---|---|
u1.passageComponent > u2.passageComponent |
u1.workComponent > u2.workComponent |
true | false | true | false |
u1.passageComponent > u2.passageComponent |
u1.workComponent < u2.workComponent |
true | false | false | false |
u1.passageComponent < u2.passageComponent |
u1.workComponent > u2.workComponent |
true | false | false | false |
u1.passageComponent < u2.passageComponent |
u1.workComponent < u2.workComponent |
true | false | false | true |
Similarity relations for two CTS URNs u1
and u2
may be summarized as follows:
Passage component | Work component | ~~ |
>< |
---|---|---|---|
u1.passageComponent ~~ u2.passageComponent |
u1.workComponent ~~ u2.workComponent |
true | false |
u1.passageComponent ~~ u2.passageComponent |
u1.workComponent >< u2.workComponent |
false | true |
u1.passageComponent >< u2.passageComponent |
u1.workComponent ~~ u2.workComponent |
false | true |
u1.passageComponent >< u2.passageComponent |
u1.workComponent >< u2.workComponent |
false | true |