# an example classifier plugin

package list;

sub new {
    my ($class) = @_;

    return bless {
	'OID'=>"NULL",
	'list'=>[]
	}, $class;
}

sub init {
    my $self = shift (@_);

    $self->{'list'} = [];
}

sub set_OID {
    my $self = shift (@_);
    my ($OID) = @_;

    $self->{'OID'} = $OID;
}

sub get_OID {
    my $self = shift (@_);
    return $self->{'OID'};
}

sub classify {
    my $self = shift (@_);
    my ($doc_obj) = @_;

    my $doc_OID = $doc_obj->get_OID();
    push (@{$self->{'list'}}, $doc_OID);
}

sub output_classify_info {
    my $self = shift (@_);
    my ($handle) = @_;

    print $handle "[$self->{'OID'}]\n";
    print $handle "<doctype>classify\n";
    print $handle "<hastxt>0\n";
    print $handle "<title>Document Listing\n";
    if (scalar (@{$self->{'list'}}) > 0) {
	print $handle "<contains>", join (";", @{$self->{'list'}}), "\n";
    }
    print $handle '-' x 70, "\n";
}


1;
