projects
/
scpubgit/stemmatology.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
4a5f514
)
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
patch
|
blob
|
blame
|
history
diff --git
a/base/lib/Text/Tradition/Collation.pm
b/base/lib/Text/Tradition/Collation.pm
index
f1903ce
..
095f331
100644
(file)
--- a/
base/lib/Text/Tradition/Collation.pm
+++ b/
base/lib/Text/Tradition/Collation.pm
@@
-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 {