NAME

Text::Tradition::Directory - a KiokuDB interface for storing and retrieving traditions

SYNOPSIS

use Text::Tradition::Directory;
my $d = Text::Tradition::Directory->new( 
  'dsn' => 'dbi:SQLite:mytraditions.db',
  'extra_args' => { 'create' => 1 },
);

my $tradition = Text::Tradition->new( @args );
my $stemma = $tradition->add_stemma( dotfile => $dotfile ); 
$d->save_tradition( $tradition );

foreach my $id ( $d->traditions ) {
	print $d->tradition( $id )->name;
}
  

DESCRIPTION

Text::Tradition::Directory is an interface for storing and retrieving text traditions and all their data, including an associated stemma hypothesis. It is an instantiation of a KiokuDB::Model, storing traditions and associated stemmas by UUID.

METHODS

new

Returns a Directory object.

tradition_ids

Returns the ID of all traditions in the database.

tradition( $id )

Returns the Text::Tradition object of the given ID.

save( $tradition )

Writes the given tradition to the database, returning its ID.

LICENSE

This package is free software and is provided "as is" without express or implied warranty. You can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Tara L Andrews <aurum@cpan.org>