--- trunk/Estraier.pm 2006/01/04 23:10:48 19 +++ trunk/Estraier.pm 2006/01/05 13:55:06 20 @@ -476,6 +476,43 @@ } +package Search::Estraier::ResultDocument; + +use Carp qw/confess croak/; + +use Search::Estraier; +our @ISA = qw/Search::Estraier/; + +=head1 Search::Estraier::ResultDocument + +=head2 new + + my $doc = new Search::HyperEstraier::ResultDocument( + uri => 'http://localhost/document/uri/42', + attrs => { + foo => 1, + bar => 2, + }, + snippet => 'this is a text of snippet' + keywords => 'this\tare\tkeywords' + ); + +=cut + +sub new { + my $class = shift; + my $self = {@_}; + bless($self, $class); + + foreach my $f (qw/uri attrs snippet keywords/) { + croak "missing $f for ResultDocument" unless defined($self->{$f}); + } + + $self ? return $self : return undef; +} + + + package Search::Estraier::Master; use Carp;