Last change
on this file since 8852 was 8716, checked in by kjdon, 20 years ago |
added some changes made by Emanuel Dejanu (Simple Words)
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.2 KB
|
Line | |
---|
1 | use BasClas;
|
---|
2 | package AllList;
|
---|
3 |
|
---|
4 | sub BEGIN {
|
---|
5 | @AllList::ISA = ('BasClas');
|
---|
6 | }
|
---|
7 |
|
---|
8 | my $arguments =
|
---|
9 | [
|
---|
10 | ];
|
---|
11 |
|
---|
12 | my $options = { 'name' => "AllList",
|
---|
13 | 'abstract' => "no",
|
---|
14 | 'inherits' => "yes" };
|
---|
15 |
|
---|
16 | sub new {
|
---|
17 | my $class = shift (@_);
|
---|
18 | my $self = new BasClas($class, @_);
|
---|
19 |
|
---|
20 | $self->{'list'} = [];
|
---|
21 | $self->{'title'} = "All Documents";
|
---|
22 |
|
---|
23 | return bless $self, $class;
|
---|
24 | }
|
---|
25 |
|
---|
26 | sub init {
|
---|
27 | my $self = shift (@_);
|
---|
28 | }
|
---|
29 |
|
---|
30 | sub classify {
|
---|
31 | my $self = shift (@_);
|
---|
32 | my ($doc_obj) = @_;
|
---|
33 |
|
---|
34 | my $doc_OID = $doc_obj->get_OID();
|
---|
35 |
|
---|
36 | push (@{$self->{'list'}}, $doc_OID);
|
---|
37 |
|
---|
38 | return;
|
---|
39 | }
|
---|
40 |
|
---|
41 | sub get_classify_info {
|
---|
42 | my $self = shift(@_);
|
---|
43 | my ($no_thistype) = @_;
|
---|
44 |
|
---|
45 | my %classifyinfo = ('childtype' =>'VList',
|
---|
46 | 'Title' =>$self->{'title'},
|
---|
47 | 'contains' =>[],
|
---|
48 | 'classifyOID' =>"oai");
|
---|
49 | $classifyinfo{'thistype'} = 'Invisible';
|
---|
50 | @list = @{$self->{'list'}};
|
---|
51 |
|
---|
52 | my $seqNo = 0;
|
---|
53 | foreach $OID (@list) {
|
---|
54 | my $hashref={};
|
---|
55 | $hashref->{'OID'}=$OID;
|
---|
56 |
|
---|
57 | my %tempinfo=('childtype'=>'VList',
|
---|
58 | 'Title'=>$self->{'title'},
|
---|
59 | 'classifyOID' =>"oai.$seqNo",
|
---|
60 | 'contains' =>[]);
|
---|
61 |
|
---|
62 | push (@{$tempinfo{'contains'}}, $hashref);
|
---|
63 |
|
---|
64 | push (@{$classifyinfo{'contains'}}, \%tempinfo);
|
---|
65 | $seqNo ++;
|
---|
66 | }
|
---|
67 |
|
---|
68 | return \%classifyinfo;
|
---|
69 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.