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/MetadataXMLPlugin.pm

    r15865 r15872  
    11###########################################################################
    22#
    3 # MetadataXMLPlug.pm --
     3# MetadataXMLPlugin.pm --
    44# A component of the Greenstone digital library software
    55# from the New Zealand Digital Library Project at the
     
    2424###########################################################################
    2525
    26 # MetadataXMLPlug process metadata.xml files in a collection
     26# MetadataXMLPlugin process metadata.xml files in a collection
    2727
    2828# Here's an example of a metadata file that uses three FileSet structures
     
    8585# metadata is explictly overridden later in the import.
    8686
    87 package MetadataXMLPlug;
     87package MetadataXMLPlugin;
    8888
    8989use strict;
    9090no strict 'refs';
    91 use BasPlug;
     91use BasePlugin;
    9292use util;
    9393use metadatautil;
    9494
    9595sub BEGIN {
    96     @MetadataXMLPlug::ISA = ('BasPlug');
     96    @MetadataXMLPlugin::ISA = ('BasePlugin');
    9797    unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan");
    9898}
     
    102102my $arguments = [
    103103      { 'name' => "block_exp",
    104     'desc' => "{BasPlug.block_exp}",
     104    'desc' => "{BasePlugin.block_exp}",
    105105    'type' => "regexp",
    106106    'reqd' => "no",
     
    108108];
    109109
    110 my $options = { 'name'     => "MetadataXMLPlug",
    111         'desc'     => "{MetadataXMLPlug.desc}",
     110my $options = { 'name'     => "MetadataXMLPlugin",
     111        'desc'     => "{MetadataXMLPlugin.desc}",
    112112        'abstract' => "no",
    113113        'inherits' => "yes",
     
    121121    push(@$pluginlist, $class);
    122122
    123     if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
    124     if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
    125 
    126     $self = new BasPlug($pluginlist, $inputargs, $hashArgOptLists);
     123    push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});
     124    push(@{$hashArgOptLists->{"OptList"}},$options);
     125
     126    $self = new BasePlugin($pluginlist, $inputargs, $hashArgOptLists);
    127127
    128128    if ($self->{'info_only'}) {
     
    180180    }
    181181
    182     print STDERR "\n<Processing n='$file' p='MetadataXMLPlug'>\n" if ($gli);
    183     print STDERR "MetadataXMLPlug: processing $file\n" if ($self->{'verbosity'})> 1;
     182    print STDERR "\n<Processing n='$file' p='MetadataXMLPlugin'>\n" if ($gli);
     183    print STDERR "MetadataXMLPlugin: processing $file\n" if ($self->{'verbosity'})> 1;
    184184
    185185    $self->{'metadataref'} = $extrametadata;
Note: See TracChangeset for help on using the changeset viewer.