Tara Andrews > Text-Tradition-1.1 > Text::Tradition::Witness

Download:
Text-Tradition-1.1.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Source   Latest Release: Text-Tradition-1.2_clean

NAME ^

Text::Tradition::Witness - a manuscript witness to a text tradition

SYNOPSIS ^

  use Text::Tradition::Witness;
  my $w = Text::Tradition::Witness->new( 
    'sigil' => 'A',
    'identifier' => 'Oxford MS Ex.1932',
    );  

DESCRIPTION ^

Text::Tradition::Witness is an object representation of a manuscript witness to a text tradition. A manuscript has a sigil (a short code that represents it in the wider tradition), an identifier (e.g. the library ID), and probably a text.

METHODS ^

new

Create a new witness. Options include:

sigil

The sigil by which to identify this manuscript, which must conform to the specification for XML attribute strings (broadly speaking, it must begin with a letter and can have only a few sorts of punctuation characters in it.)

identifier

A freeform name by which to identify the manuscript, which may be longer than the sigil. Defaults to 'Unidentified ms', but will be taken from the TEI msName attribute, or constructed from the settlement and idno if supplied.

settlement

The city, town, etc. where the manuscript is held. Will be read from the TEI msDesc element if supplied.

repository

The institution that holds the manuscript. Will be read from the TEI msDesc element if supplied.

idno

The identification or call number of the manuscript. Will be read from the TEI msDesc element if supplied.

text

An array of strings (words) that contains the text of the manuscript. This should not change after the witness has been instantiated, and the path through the collation should always match it.

layertext

An array of strings (words) that contains the layered text, if any, of the manuscript. This should not change after the witness has been instantiated, and the path through the collation should always match it.

identifier

Accessor method for the witness identifier.

other_info

Accessor method for the general witness description.

has_source

Boolean method that returns a true value if the witness was created with a data source (that is, a file, string, or object to be parsed).

is_layered

Boolean method to note whether the witness has layers (e.g. pre-correction readings) in the collation.

export_as_json

Exports the witness as a JSON structure, with the following keys:

BUGS / TODO ^

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>

syntax highlighting: