Ignore:
Timestamp:
2005-08-10T16:19:17+12:00 (19 years ago)
Author:
kjdon
Message:

made a base builder class, adn moved lots of the code to it. hoe I haven't stuffed anything up :-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/lucenebuilder.pm

    r10158 r10468  
    4444    $self = bless $self, $class;
    4545
    46     # load up the document processor for building
    47     # if a buildproc class has been created for this collection, use it
    48     # otherwise, use the lucene buildproc
    49     my ($buildprocdir, $buildproctype);
    50     if (-e "$ENV{'GSDLCOLLECTDIR'}/perllib/${collection}buildproc.pm") {
    51     $buildprocdir = "$ENV{'GSDLCOLLECTDIR'}/perllib";
    52     $buildproctype = "${collection}buildproc";
    53     } else {
    54     $buildprocdir = "$ENV{'GSDLHOME'}/perllib";
    55     $buildproctype = "lucenebuildproc";
    56     }
    57     require "$buildprocdir/$buildproctype.pm";
    58 
    59     eval("\$self->{'buildproc'} = new $buildproctype(\$collection, " .
    60      "\$source_dir, \$build_dir, \$keepold, \$verbosity, \$outhandle)");
    61     die "$@" if $@;
    62 
    6346    $self->{'buildtype'} = "lucene";
    6447
    6548    return $self;
     49}
     50
     51sub default_buildproc {
     52    my $self  = shift (@_);
     53
     54    return "lucenebuildproc";
    6655}
    6756
     
    188177}
    189178
    190 
    191 
    192 
    193 
    194179sub build_index {
    195180    my $self = shift (@_);
Note: See TracChangeset for help on using the changeset viewer.