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

    r15865 r15872  
    11###########################################################################
    22#
    3 # METSPlug.pm
     3# METSPlugin.pm
    44# A component of the Greenstone digital library software
    55# from the New Zealand Digital Library Project at the
     
    3030
    3131
    32 package METSPlug;
     32package METSPlugin;
    3333
    3434use ghtml;
     
    3737no strict 'refs'; # allow filehandles to be variables and viceversa
    3838
    39 use XMLPlug;
     39use ReadXMLFile;
    4040use XML::XPath;
    4141use XML::XPath::XMLParser;
    4242
    4343sub BEGIN {
    44     @METSPlug::ISA = ('XMLPlug');
     44    @METSPlugin::ISA = ('ReadXMLFile');
    4545}
    4646
    4747my $arguments = [
    4848         ];
    49 my $options = { 'name'     => "METSPlug",
    50         'desc'     => "{METSPlug.desc}",
     49my $options = { 'name'     => "METSPlugin",
     50        'desc'     => "{METSPlugin.desc}",
    5151        'abstract' => "no",
    5252        'inherits' => "yes" };
     
    6464    push(@$pluginlist, $class);
    6565
    66     if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
    67     if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
    68 
    69     my $self = new XMLPlug($pluginlist, $inputargs, $hashArgOptLists);
     66    # have no args - do we still want this?
     67    #push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});
     68    push(@{$hashArgOptLists->{"OptList"}},$options);
     69
     70    my $self = new ReadXMLFile($pluginlist, $inputargs, $hashArgOptLists);
    7071
    7172    $self->{'section'} = "";
     
    117118    }
    118119    my $outhandle = $self->{'outhandle'};
    119     print $outhandle "METSPlug: processing $self->{'file'}\n" if $self->{'verbosity'} > 1;
    120     print STDERR "<Processing n='$self->{'file'}' p='METSPlug'>\n" if ($self->{'gli'});
     120    print $outhandle "METSPlugin: processing $self->{'file'}\n" if $self->{'verbosity'} > 1;
     121    print STDERR "<Processing n='$self->{'file'}' p='METSPlugin'>\n" if ($self->{'gli'});
    121122
    122123}
Note: See TracChangeset for help on using the changeset viewer.