1 | ###########################################################################
|
---|
2 | #
|
---|
3 | # extrauilder.pm -- inherited from basebuilder, to provide a netural
|
---|
4 | # layer upon which to base extra extension buliders.
|
---|
5 | # A component of the Greenstone digital library software
|
---|
6 | # from the New Zealand Digital Library Project at the
|
---|
7 | # University of Waikato, New Zealand.
|
---|
8 | #
|
---|
9 | # Copyright (C) 1999 New Zealand Digital Library Project
|
---|
10 | #
|
---|
11 | # This program is free software; you can redistribute it and/or modify
|
---|
12 | # it under the terms of the GNU General Public License as published by
|
---|
13 | # the Free Software Foundation; either version 2 of the License, or
|
---|
14 | # (at your option) any later version.
|
---|
15 | #
|
---|
16 | # This program is distributed in the hope that it will be useful,
|
---|
17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | # GNU General Public License for more details.
|
---|
20 | #
|
---|
21 | # You should have received a copy of the GNU General Public License
|
---|
22 | # along with this program; if not, write to the Free Software
|
---|
23 | # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
---|
24 | #
|
---|
25 | ###########################################################################
|
---|
26 |
|
---|
27 | # With Greenstone extensions increasingly working with multimedia indexing
|
---|
28 | # this package has been devised to provide a layer that is more neutral to
|
---|
29 | # the indexing steps performed. It does this by overriding several methods
|
---|
30 | # in basebulider.pm that as specific to text-indexing
|
---|
31 |
|
---|
32 |
|
---|
33 | package extrabuilder;
|
---|
34 |
|
---|
35 | use strict;
|
---|
36 | no strict 'refs'; # allow filehandles to be variables and viceversa
|
---|
37 |
|
---|
38 | use basebuilder;
|
---|
39 |
|
---|
40 | sub BEGIN {
|
---|
41 | @extrabuilder::ISA = ('basebuilder');
|
---|
42 | }
|
---|
43 |
|
---|
44 |
|
---|
45 | sub new {
|
---|
46 | my $class = shift(@_);
|
---|
47 |
|
---|
48 | print STDERR "***** extrabuilder calling new basebuilder()\n";
|
---|
49 |
|
---|
50 | my $self = new basebuilder (@_);
|
---|
51 | $self = bless $self, $class;
|
---|
52 |
|
---|
53 | return $self;
|
---|
54 |
|
---|
55 | }
|
---|
56 |
|
---|
57 | # stuff has been moved here from new, so we can use subclass methods
|
---|
58 | sub initXX {
|
---|
59 | my $self = shift(@_);
|
---|
60 |
|
---|
61 | # Override base method to be null to neutral about builderproc indexing
|
---|
62 | return;
|
---|
63 | }
|
---|
64 |
|
---|
65 | sub deinitXX {
|
---|
66 | my $self = shift (@_);
|
---|
67 |
|
---|
68 | # Override base method to be null to be neutral about builderproc indexing
|
---|
69 | return;
|
---|
70 | }
|
---|
71 |
|
---|
72 | sub generate_index_list {
|
---|
73 | my $self = shift (@_);
|
---|
74 |
|
---|
75 | # needs to be defined, due to being called from basebuilder->init()
|
---|
76 |
|
---|
77 | return;
|
---|
78 | }
|
---|
79 |
|
---|
80 | sub set_sections_index_document_metadata {
|
---|
81 | my $self = shift (@_);
|
---|
82 | my ($index) = @_;
|
---|
83 |
|
---|
84 | # Override base method to null to be neutral about builderproc indexing
|
---|
85 | return;
|
---|
86 | }
|
---|
87 |
|
---|
88 |
|
---|
89 | sub set_strip_html {
|
---|
90 | my $self = shift (@_);
|
---|
91 | my ($strip) = @_;
|
---|
92 |
|
---|
93 | # Override base method to be neutral about builderproc indexing
|
---|
94 |
|
---|
95 | $self->{'strip_html'} = $strip;
|
---|
96 | return;
|
---|
97 | }
|
---|
98 |
|
---|
99 | sub compress_text {
|
---|
100 | my $self = shift (@_);
|
---|
101 | my ($textindex) = @_;
|
---|
102 |
|
---|
103 | # Override base method to null to be neutral about builderproc indexing
|
---|
104 | return;
|
---|
105 | }
|
---|
106 |
|
---|
107 |
|
---|
108 | sub build_indexes {
|
---|
109 | my $self = shift (@_);
|
---|
110 | my ($indexname) = @_;
|
---|
111 | my $outhandle = $self->{'outhandle'};
|
---|
112 |
|
---|
113 | # Override base method to null to be neutral about builderproc indexing
|
---|
114 | return;
|
---|
115 | }
|
---|
116 |
|
---|
117 | sub make_infodatabase {
|
---|
118 | my $self = shift (@_);
|
---|
119 | my $outhandle = $self->{'outhandle'};
|
---|
120 |
|
---|
121 | # Override base method to null to be neutral about builderproc indexing
|
---|
122 | return;
|
---|
123 | }
|
---|
124 |
|
---|
125 | sub make_auxiliary_files {
|
---|
126 | my $self = shift (@_);
|
---|
127 | my ($index);
|
---|
128 | my $build_cfg = {};
|
---|
129 |
|
---|
130 | # Override base method to null to be neutral about builderproc indexing
|
---|
131 | return;
|
---|
132 | }
|
---|
133 |
|
---|
134 |
|
---|
135 | 1;
|
---|
136 |
|
---|