1 | ###########################################################################
|
---|
2 | #
|
---|
3 | # List.pm --
|
---|
4 | # A component of the Greenstone digital library software
|
---|
5 | # from the New Zealand Digital Library Project at the
|
---|
6 | # University of Waikato, New Zealand.
|
---|
7 | #
|
---|
8 | # Copyright (C) 1999 New Zealand Digital Library Project
|
---|
9 | #
|
---|
10 | # This program is free software; you can redistribute it and/or modify
|
---|
11 | # it under the terms of the GNU General Public License as published by
|
---|
12 | # the Free Software Foundation; either version 2 of the License, or
|
---|
13 | # (at your option) any later version.
|
---|
14 | #
|
---|
15 | # This program is distributed in the hope that it will be useful,
|
---|
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
18 | # GNU General Public License for more details.
|
---|
19 | #
|
---|
20 | # You should have received a copy of the GNU General Public License
|
---|
21 | # along with this program; if not, write to the Free Software
|
---|
22 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
23 | #
|
---|
24 | ###########################################################################
|
---|
25 |
|
---|
26 | # 12/05/02 Added usage datastructure - John Thompson
|
---|
27 |
|
---|
28 | use BasClas;
|
---|
29 | package Browse;
|
---|
30 |
|
---|
31 | use sorttools;
|
---|
32 |
|
---|
33 | sub BEGIN {
|
---|
34 | @ISA = ('BasClas');
|
---|
35 | }
|
---|
36 |
|
---|
37 | my $options = { 'name' => "Browse",
|
---|
38 | 'desc' => "{Browse.desc}",
|
---|
39 | 'abstract' => "yes",
|
---|
40 | 'inherits' => "yes" };
|
---|
41 |
|
---|
42 |
|
---|
43 | sub new {
|
---|
44 | my $class = shift (@_);
|
---|
45 | my $self = new BasClas($class, @_);
|
---|
46 |
|
---|
47 | # 14-05-02 To allow for proper inheritance of arguments - John Thompson
|
---|
48 | my $option_list = $self->{'option_list'};
|
---|
49 | push( @{$option_list}, $options );
|
---|
50 |
|
---|
51 | if ($self->{'info_only'}) {
|
---|
52 | # created from classinfo.pl - don't need to parse the arguments
|
---|
53 | return bless $self, $class;
|
---|
54 | }
|
---|
55 |
|
---|
56 | # classifier information
|
---|
57 | $self->{'collection'} = $ENV{'GSDLCOLLECTION'};
|
---|
58 |
|
---|
59 | $self->{'title'} = "Browse";
|
---|
60 |
|
---|
61 | return bless $self, $class;
|
---|
62 | }
|
---|
63 |
|
---|
64 | sub init {
|
---|
65 | my $self = shift (@_);
|
---|
66 |
|
---|
67 |
|
---|
68 | }
|
---|
69 |
|
---|
70 | sub classify {
|
---|
71 | my $self = shift (@_);
|
---|
72 |
|
---|
73 | }
|
---|
74 |
|
---|
75 | sub get_classify_info {
|
---|
76 | my $self = shift (@_);
|
---|
77 |
|
---|
78 |
|
---|
79 | # Return the information about the classifier that we'll later want to
|
---|
80 | # use to create macros when the Phind classifier document is displayed.
|
---|
81 | my %classifyinfo = ('thistype'=>'Invisible',
|
---|
82 | 'Title'=>$self->{'title'},
|
---|
83 | 'contains'=>[]);
|
---|
84 |
|
---|
85 | my $collection = $self->{'collection'};
|
---|
86 | my $url = "library?a=br&c=collection";
|
---|
87 | push (@{$classifyinfo{'contains'}}, {'OID'=>$url});
|
---|
88 |
|
---|
89 | return \%classifyinfo;
|
---|
90 |
|
---|
91 |
|
---|
92 | }
|
---|
93 |
|
---|
94 |
|
---|
95 | 1;
|
---|