Ignore:
Timestamp:
2008-08-11T14:06:47+12:00 (16 years ago)
Author:
kjdon
Message:

added auxiliary parameter to new - needed if you want to do new without parsing the arguments - ie want to inherit from a plugin to get the methods and arguments, but its not in the direct inheritance line

File:
1 edited

Legend:

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

    r16643 r16698  
    7777
    7878push(@{$encoding_plus_auto_list},@{$encoding_list});
     79
     80our $oidtype_list =
     81    [ { 'name' => "hash",
     82        'desc' => "{import.OIDtype.hash}" },
     83      { 'name' => "assigned",
     84        'desc' => "{import.OIDtype.assigned}" },
     85      { 'name' => "incremental",
     86        'desc' => "{import.OIDtype.incremental}" },
     87      { 'name' => "dirname",
     88        'desc' => "{import.OIDtype.dirname}" } ];
    7989
    8090my $arguments =
     
    101111    'type' => "string",
    102112    'reqd' => "no" },
    103       { 'name' => "use_as_doc_identifier",
    104     'desc' => "{BasePlugin.use_as_doc_identifier}",
    105     'type' => "string",
    106     'reqd' => "no" ,
    107     'deft' => "" } ,
     113      { 'name' => "OIDtype",
     114    'desc' => "{import.OIDtype}",
     115    'type' => "enum",
     116    'list' => $oidtype_list,
     117    # parsearg left "" as default
     118    #'deft' => "hash",
     119    'reqd' => "no",
     120    'modegli' => "2" },
     121      { 'name' => "OIDmetadata",
     122    'desc' => "{import.OIDmetadata}",
     123    'type' => "metadata",
     124    'deft' => "dc.Identifier",
     125    'reqd' => "no",
     126    'modegli' => "2" },
     127
     128#      { 'name' => "use_as_doc_identifier",
     129#   'desc' => "{BasePlugin.use_as_doc_identifier}",
     130#   'type' => "string",
     131#   'reqd' => "no" ,
     132#   'deft' => "" } ,
    108133     { 'name' => "no_cover_image",
    109134    'desc' => "{BasePlugin.no_cover_image}",
     
    136161
    137162    my ($class) = shift (@_);
    138     my ($pluginlist,$inputargs,$hashArgOptLists) = @_;
     163    my ($pluginlist,$inputargs,$hashArgOptLists,$auxiliary) = @_;
    139164    push(@$pluginlist, $class);
    140165
     
    142167    push(@{$hashArgOptLists->{"OptList"}},$options);
    143168
    144     my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists);
     169    my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists,$auxiliary);
    145170   
    146171    if ($self->{'info_only'}) {
Note: See TracChangeset for help on using the changeset viewer.