source: main/trunk/greenstone2/perllib/extrabuilder.pm@ 32533

Last change on this file since 32533 was 30517, checked in by ak19, 8 years ago

Fixing incremental-rebuild when the database is gdbm. At this point (see buildcolutils.pm), the code needs to deactivate the collection before calling make_infodatabase(), since otherwise there's a lock on the gdbm database which prevents successful incremental-rebuild and activation.

File size: 3.5 KB
Line 
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
33package extrabuilder;
34
35use strict;
36no strict 'refs'; # allow filehandles to be variables and viceversa
37
38use basebuilder;
39
40sub BEGIN {
41 @extrabuilder::ISA = ('basebuilder');
42}
43
44
45sub 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
56sub initXX {
57 my $self = shift(@_);
58
59 # Override base method to be null to neutral about builderproc indexing
60 return;
61}
62
63sub deinitXX {
64 my $self = shift (@_);
65
66 # Override base method to be null to be neutral about builderproc indexing
67 return;
68}
69
70sub 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
78sub 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
87sub 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
97sub 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
106sub 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
115# for now, orthogonalbuilder subclasses don't support/require make_infodatabase()
116sub supports_make_infodatabase {
117 return 0;
118}
119
120sub 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
128sub 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
1381;
139
Note: See TracBrowser for help on using the repository browser.