stop saving duplicate path arrays in witnesses; get rid of relationship
[scpubgit/stemmatology.git] / lib / Text / Tradition / Collation / Relationship.pm
index c2ad3ae..9c6e80e 100644 (file)
@@ -12,19 +12,6 @@ extends 'Graph::Easy::Edge';
 
 enum 'RelationshipType' => qw( spelling orthographic grammatical repetition lexical );
 
-subtype 'RelationshipVector',
-    => as 'ArrayRef',
-    => where { @$_ == 2
-              && $_->[0]->isa( 'Graph::Easy::Node' )
-              && $_->[1]->isa( 'Graph::Easy::Node' )
-            },
-    message { 'Argument should be [ SourceReading, TargetReading ]' };
-
-subtype 'RelationshipTokenVector',
-    => as 'ArrayRef',
-    => where { @$_ == 2 },
-    message { 'Argument should be [ \'source\', \'target\' ]' };
-
 no Moose::Util::TypeConstraints;  ## see comment above
                   
 has 'type' => (
@@ -33,17 +20,6 @@ has 'type' => (
     required => 1,
 );
 
-has 'this_relation' => (
-    is => 'rw',
-    isa => 'RelationshipVector',
-    required => 1,
-);
-
-has 'primary_relation' => (
-    is => 'rw',
-    isa => 'RelationshipTokenVector',
-);
-
 has 'global' => (
     is => 'rw',
     isa => 'Bool',
@@ -82,10 +58,6 @@ sub BUILD {
 
     $self->set_attribute( 'class', 'relationship' );
 
-    unless( $self->primary_relation ) {
-       $self->primary_relation( [ $self->this_relation->[0]->label,
-                                  $self->this_relation->[1]->label ] );
-    }
 }
 
 no Moose;