use BasClas;
package AllList;

sub BEGIN {
    @ISA = ('BasClas');
}

my $arguments = 
    [
     ];

my $options = { 'name'     => "AllList",
	        'abstract' => "no",
	        'inherits' => "yes" };

sub new {
    my $class = shift (@_);
    my $self  = new BasClas($class, @_);

    $self->{'list'} = [];
    $self->{'title'} = "All Documents";

    return bless $self, $class;
}

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

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

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

    return;
}

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

    my %classifyinfo = ('childtype'   =>'VList',
			'Title'       =>$self->{'title'},
			'contains'    =>[],
			'classifyOID' =>"oai");
    $classifyinfo{'thistype'} = 'Invisible';
    @list = @{$self->{'list'}};

    my $seqNo = 0;
    foreach $OID (@list) {
	my $hashref={};
	$hashref->{'OID'}=$OID;
       
	my %tempinfo=('childtype'=>'VList',
		      'Title'=>$self->{'title'},
		      'classifyOID' =>"oai.$seqNo",
		      'contains'    =>[]);

	push (@{$tempinfo{'contains'}}, $hashref);

	push (@{$classifyinfo{'contains'}}, \%tempinfo);
	$seqNo ++;
    }

    return \%classifyinfo;
}
