[24342] | 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 | my $self = new basebuilder (@_);
|
---|
| 49 | $self = bless $self, $class;
|
---|
| 50 |
|
---|
| 51 | return $self;
|
---|
| 52 |
|
---|
| 53 | }
|
---|
| 54 |
|
---|
| 55 | # stuff has been moved here from new, so we can use subclass methods
|
---|
| 56 | sub initXX {
|
---|
| 57 | my $self = shift(@_);
|
---|
| 58 |
|
---|
| 59 | # Override base method to be null to neutral about builderproc indexing
|
---|
| 60 | return;
|
---|
| 61 | }
|
---|
| 62 |
|
---|
| 63 | sub deinitXX {
|
---|
| 64 | my $self = shift (@_);
|
---|
| 65 |
|
---|
| 66 | # Override base method to be null to be neutral about builderproc indexing
|
---|
| 67 | return;
|
---|
| 68 | }
|
---|
| 69 |
|
---|
| 70 | sub generate_index_list {
|
---|
| 71 | my $self = shift (@_);
|
---|
| 72 |
|
---|
| 73 | # needs to be defined, due to being called from basebuilder->init()
|
---|
| 74 |
|
---|
| 75 | return;
|
---|
| 76 | }
|
---|
| 77 |
|
---|
| 78 | sub set_sections_index_document_metadata {
|
---|
| 79 | my $self = shift (@_);
|
---|
| 80 | my ($index) = @_;
|
---|
| 81 |
|
---|
| 82 | # Override base method to null to be neutral about builderproc indexing
|
---|
| 83 | return;
|
---|
| 84 | }
|
---|
| 85 |
|
---|
| 86 |
|
---|
| 87 | sub set_strip_html {
|
---|
| 88 | my $self = shift (@_);
|
---|
| 89 | my ($strip) = @_;
|
---|
| 90 |
|
---|
| 91 | # Override base method to be neutral about builderproc indexing
|
---|
| 92 |
|
---|
| 93 | $self->{'strip_html'} = $strip;
|
---|
| 94 | return;
|
---|
| 95 | }
|
---|
| 96 |
|
---|
| 97 | sub compress_text {
|
---|
| 98 | my $self = shift (@_);
|
---|
| 99 | my ($textindex) = @_;
|
---|
| 100 |
|
---|
| 101 | # Override base method to null to be neutral about builderproc indexing
|
---|
| 102 | return;
|
---|
| 103 | }
|
---|
| 104 |
|
---|
| 105 |
|
---|
| 106 | sub build_indexes {
|
---|
| 107 | my $self = shift (@_);
|
---|
| 108 | my ($indexname) = @_;
|
---|
| 109 | my $outhandle = $self->{'outhandle'};
|
---|
| 110 |
|
---|
| 111 | # Override base method to null to be neutral about builderproc indexing
|
---|
| 112 | return;
|
---|
| 113 | }
|
---|
| 114 |
|
---|
[30517] | 115 | # for now, orthogonalbuilder subclasses don't support/require make_infodatabase()
|
---|
| 116 | sub supports_make_infodatabase {
|
---|
| 117 | return 0;
|
---|
| 118 | }
|
---|
| 119 |
|
---|
[24342] | 120 | sub make_infodatabase {
|
---|
| 121 | my $self = shift (@_);
|
---|
| 122 | my $outhandle = $self->{'outhandle'};
|
---|
| 123 |
|
---|
| 124 | # Override base method to null to be neutral about builderproc indexing
|
---|
| 125 | return;
|
---|
| 126 | }
|
---|
| 127 |
|
---|
| 128 | sub make_auxiliary_files {
|
---|
| 129 | my $self = shift (@_);
|
---|
| 130 | my ($index);
|
---|
| 131 | my $build_cfg = {};
|
---|
| 132 |
|
---|
| 133 | # Override base method to null to be neutral about builderproc indexing
|
---|
| 134 | return;
|
---|
| 135 | }
|
---|
| 136 |
|
---|
| 137 |
|
---|
| 138 | 1;
|
---|
| 139 |
|
---|