allow for prefix/suffix readings
[scpubgit/stemmatology.git] / lib / Text / Tradition / Collation / Reading.pm
index d1c69f7..907310d 100644 (file)
@@ -118,6 +118,20 @@ has 'rank' => (
     predicate => 'has_rank',
     );
 
+## For prefix/suffix readings
+
+has 'join_prior' => (
+       is => 'ro',
+       isa => 'Bool',
+       default => undef,
+       );
+       
+has 'join_next' => (
+       is => 'ro',
+       isa => 'Bool',
+       default => undef,
+       );
+
 
 around BUILDARGS => sub {
        my $orig = shift;
@@ -226,6 +240,11 @@ sub _stringify {
        return $self->id;
 }
 
+sub TO_JSON {
+       my $self = shift;
+       return $self->text;
+}
+
 no Moose;
 __PACKAGE__->meta->make_immutable;