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

    r15865 r15872  
    2525###########################################################################
    2626
    27 package OAIPlug;
    28 
    29 use BasPlug;
     27package OAIPlugin;
     28
    3029use unicode;
    3130use util;
     
    3433no strict 'refs'; # allow filehandles to be variables and viceversa
    3534
    36 use XMLPlug;
     35use ReadXMLFile;
    3736
    3837sub BEGIN {
    39     @OAIPlug::ISA = ('XMLPlug');
     38    @OAIPlugin::ISA = ('ReadXMLFile');
    4039}
    4140
     
    4948      ];
    5049
    51 my $options = { 'name'     => "OAIPlug",
    52         'desc'     => "{OAIPlug.desc}",
     50my $options = { 'name'     => "OAIPlugin",
     51        'desc'     => "{OAIPlugin.desc}",
    5352        'abstract' => "no",
    5453        'inherits' => "yes",
     
    6160    push(@$pluginlist, $class);
    6261
    63     if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});}
    64     if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)};
    65 
    66     my $self = new XMLPlug($pluginlist, $inputargs, $hashArgOptLists);
     62    push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});
     63    push(@{$hashArgOptLists->{"OptList"}},$options);
     64
     65    my $self = new ReadXMLFile($pluginlist, $inputargs, $hashArgOptLists);
    6766
    6867    return bless $self, $class;
     
    9897
    9998    my $outhandle = $self->{'outhandle'};
    100     print $outhandle "OAIPlug: processing $self->{'file'}\n" if $self->{'verbosity'} > 1;
    101     print STDERR "<Processing n='$self->{'file'}' p='OAIPlug'>\n" if $self->{'gli'};
     99    print $outhandle "OAIPlugin: processing $self->{'file'}\n" if $self->{'verbosity'} > 1;
     100    print STDERR "<Processing n='$self->{'file'}' p='OAIPlugin'>\n" if $self->{'gli'};
    102101
    103102}
     
    199198    if ($srcdoc_exists)
    200199    {
    201         print $outhandle "OAIPlug: passing metadata on to $url_array->[0]\n"
     200        print $outhandle "OAIPlugin: passing metadata on to $url_array->[0]\n"
    202201        if ($self->{'verbosity'}>1);
    203202       
     
    265264    my $outhandle = $self->{'outhandle'};
    266265
    267     print STDERR "<Processing n='$file' p='OAIPlug'>\n" if ($gli);
    268     print $outhandle "OAIPlug: processing $file\n"
     266    print STDERR "<Processing n='$file' p='OAIPlugin'>\n" if ($gli);
     267    print $outhandle "OAIPlugin: processing $file\n"
    269268    if $self->{'verbosity'} > 1;
    270269
     
    411410
    412411    if ($top_level_prefix !~ /dc$/) {
    413         print $outhandle "Warning: OAIPlug currently only designed for Dublin Core (or variant) metadata\n";
     412        print $outhandle "Warning: OAIPlugin currently only designed for Dublin Core (or variant) metadata\n";
    414413        print $outhandle "         This recorded metadata section '$top_level_prefix' does not appear to match.\n";
    415414        print $outhandle "         Metadata assumed to be in form: <prefix:tag>value</prefix:tag> and will be converted\n";
Note: See TracChangeset for help on using the changeset viewer.