1 package Text::Tradition::Collation::Relationship;
4 use Moose::Util::TypeConstraints;
6 enum 'RelationshipType' => qw( spelling orthographic grammatical meaning lexical
7 collation repetition transposition );
9 enum 'RelationshipScope' => qw( local tradition global );
11 no Moose::Util::TypeConstraints;
15 =item * type - Can be one of spelling, orthographic, grammatical, meaning, lexical, collated, repetition, transposition. All but the last two are only valid relationships between readings that occur at the same point in the text.
17 =item * non_correctable - (Optional) True if the reading would not have been corrected independently.
19 =item * non_independent - (Optional) True if the variant is unlikely to have occurred independently in unrelated witnesses.
21 =item * scope - (Optional) A meta-attribute. Can be one of 'local', 'tradition', or 'global'. Denotes whether the relationship between the two readings holds always, independent of context, either within this tradition or across all traditions.
29 isa => 'RelationshipType',
47 isa => 'RelationshipScope',
51 has 'non_correctable' => (
56 has 'non_independent' => (
61 # A read-only meta-Boolean attribute.
64 return $self->type !~ /^(repetition|transposition)$/;
69 return $self->scope ne 'local';
73 __PACKAGE__->meta->make_immutable;