Changeset 16698

Show
Ignore:
Timestamp:
11.08.2008 14:06:47 (11 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

Location:
gsdl/trunk/perllib/plugins
Files:
2 modified

Legend:

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

    r16644 r16698  
    6666    # Start the AutoExtractMetadata Constructor 
    6767    my $class = shift (@_); 
    68     my ($pluginlist,$inputargs,$hashArgOptLists) = @_; 
     68    my ($pluginlist,$inputargs,$hashArgOptLists,$auxiliary) = @_; 
    6969    push(@$pluginlist, $class); 
    7070     
     
    7979    new GISExtractor($pluginlist, $inputargs, $hashArgOptLists); 
    8080    new CJKTextSegmenter($pluginlist, $inputargs, $hashArgOptLists); 
    81     my $self = new BasePlugin($pluginlist, $inputargs, $hashArgOptLists); 
     81    my $self = new BasePlugin($pluginlist, $inputargs, $hashArgOptLists,$auxiliary); 
    8282 
    8383    return bless $self, $class; 
  • 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'}) {