| Summary | Package variables | Synopsis | Description | General documentation | Methods |
| Summary | Top |
| Clair::Polisci::Graf - An object representing a hansard graf |
| Package variables | Top |
| No package variables defined. |
| Included modules | Top |
| Clair::Document |
| Synopsis | Top |
my $speaker = Clair::Polisci::Speaker->new( ... ); |
| Description | Top |
| This is a Graf object used to represent a generic graf from a hansard. A graf is the smallest unit of speech in a hansard. An ordered list of grafs makes up a record. Each graf must have a source, an index, some content, and a speaker. |
| Methods | Top |
| new | Description | Code |
| to_document | Description | Code |
| new | code | next | Top |
my $graf = Clair::Polisci::Graf->new( |
| to_document | code | prev | next | Top |
use Clair::Document; |
| new | description | prev | next | Top |
sub new
{
my $self = shift;
my %args = @_;
die "Graf source must be defined" unless defined $args{source};
die "Graf index must be defined" unless defined $args{index};
die "Graf content must be defined" unless defined $args{content};
die "Graf speaker must be defined" unless defined $args{speaker};
$self =\% args;
return bless($self);} |
| to_document | description | prev | next | Top |
sub to_document
{
my $self = shift;
my $doc = Clair::Document->new(
string => $self->{content},
type => "text"
);
return $doc;} |
| AUTHOR | Top |
| Tony Fader afader@umich.edu |