Ignore:
Timestamp:
2008-06-05T09:29:32+12:00 (16 years ago)
Author:
kjdon
Message:

plugin overhaul: plugins renamed to xxPlugin, and in some cases the names are made more sensible. They now use the new base plugins. Hopefully we have better code reuse. Some of the plugins still need work done as I didn't want to spend another month doing this before committing it. Alos, I haven't really tested anything yet...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/ReferPlugin.pm

    r15865 r15872  
    11###########################################################################
    22#
    3 # ReferPlug.pm - a plugin for bibliography records in Refer format
     3# ReferPlugin.pm - a plugin for bibliography records in Refer format
    44#
    55# A component of the Greenstone digital library software
     
    2626###########################################################################
    2727
    28 # ReferPlug reads bibliography files in Refer format.
     28# ReferPlugin reads bibliography files in Refer format.
    2929#
    3030# by Gordon W. Paynter ([email protected]), November 2000
     
    3636#
    3737#
    38 # ReferPlug creates a document object for every reference in the file.
    39 # It is a subclass of SplitPlug, so if there are multiple records, all
     38# ReferPlugin creates a document object for every reference in the file.
     39# It is a subclass of SplitTextFile, so if there are multiple records, all
    4040# are read.
    4141#
     
    6161#
    6262
    63 # 12/05/02 Added usage datastructure - John Thompson
    64 
    65 package ReferPlug;
    66 
    67 use SplitPlug;
     63package ReferPlugin;
     64
     65use SplitTextFile;
    6866use strict;
    6967no strict 'refs'; # allow filehandles to be variables and viceversa
    7068
    71 # ReferPlug is a sub-class of BasPlug.
     69# ReferPlugin is a sub-class of BasePlugin.
    7270sub BEGIN {
    73     @ReferPlug::ISA = ('SplitPlug');
     71    @ReferPlugin::ISA = ('SplitTextFile');
    7472}
    7573
    7674my $arguments =
    7775    [ { 'name' => "process_exp",
    78     'desc' => "{BasPlug.process_exp}",
     76    'desc' => "{BasePlugin.process_exp}",
    7977    'type' => "regexp",
    8078    'deft' => &get_default_process_exp(),
    8179    'reqd' => "no" },
    8280      { 'name' => "split_exp",
    83     'desc' => "{SplitPlug.split_exp}",
     81    'desc' => "{SplitTextFile.split_exp}",
    8482    'type' => "regexp",
    8583    'reqd' => "no",
     
    8785      ];
    8886
    89 my $options = { 'name'     => "ReferPlug",
    90         'desc'     => "{ReferPlug.desc}",
     87my $options = { 'name'     => "ReferPlugin",
     88        'desc'     => "{ReferPlugin.desc}",
    9189        'abstract' => "no",
    9290        'inherits' => "yes",
     
    109107    push(@$pluginlist, $class);
    110108
    111     if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
    112     if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
    113 
    114     my $self = new SplitPlug($pluginlist, $inputargs, $hashArgOptLists);
     109    push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});
     110    push(@{$hashArgOptLists->{"OptList"}},$options);
     111
     112    my $self = new SplitTextFile($pluginlist, $inputargs, $hashArgOptLists);
    115113
    116114    return bless $self, $class;
     
    130128    my $cursection = $doc_obj->get_top_section();
    131129    # Report that we're processing the file
    132     print STDERR "<Processing n='$file' p='ReferPlug'>\n" if ($gli);
    133     print $outhandle "ReferPlug: processing $file\n"
     130    print STDERR "<Processing n='$file' p='ReferPlugin'>\n" if ($gli);
     131    print $outhandle "ReferPlugin: processing $file\n"
    134132    if ($self->{'verbosity'}) > 1;
    135133
Note: See TracChangeset for help on using the changeset viewer.