Add function to expose relationship types from Collation object
Tara L Andrews [Sat, 18 Jan 2014 16:18:02 +0000 (17:18 +0100)]
base/lib/Text/Tradition/Collation.pm

index f1903ce..095f331 100644 (file)
@@ -233,6 +233,12 @@ sub register_relationship_type {
        $self->relations->add_type( %args );
 }
 
+sub get_relationship_type {
+       my( $self, $name ) = @_;
+               return $self->relations->has_type( $name ) 
+                       ? $self->relations->type( $name ) : undef;
+}
+
 ### Reading construct/destruct functions
 
 sub add_reading {