Changeset 19746

Show
Ignore:
Timestamp:
05.06.2009 17:08:45 (10 years ago)
Author:
ak19
Message:

Dr Bainbridge fixed the DSpace problem where the crucial dublin_core.xml file was being blocked when it shouldn't have been which prevented the necessary files from being processed by the DSpacePlugin at all. Now the DSpace to Greenstone tutorial works again.

Files:
1 modified

Legend:

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

    r19493 r19746  
    4747package DSpacePlugin; 
    4848 
    49 use BasePlugin; 
     49use ReadTextFile; 
    5050use plugin; 
    5151use XMLParser; 
     
    5454 
    5555sub BEGIN { 
    56     @DSpacePlugin::ISA = ('BasePlugin'); 
     56    @DSpacePlugin::ISA = ('ReadTextFile'); 
    5757} 
    5858 
     
    104104    push(@{$hashArgOptLists->{"OptList"}},$options); 
    105105 
    106     $self = new BasePlugin($pluginlist, $inputargs, $hashArgOptLists); 
     106    $self = new ReadTextFile($pluginlist, $inputargs, $hashArgOptLists); 
    107107     
    108108    if ($self->{'info_only'}) { 
     
    126126    my $self = shift (@_); 
    127127 
    128     return q^(?i)contents$^; 
     128    return q^(?i)(contents)$^; 
    129129} 
    130130 
     
    133133    my $self = shift (@_); 
    134134     
    135     # Block all files besides contents 
    136     return q^(?i)(handle|dublin_core\.xml|\.tx?t)$^; 
     135    # Block handle and txt files if present. Specifically don't block dublin_core xml 
     136    return q^(?i)(handle|\.tx?t)$^; 
     137} 
     138 
     139sub store_block_files_BACKUP 
     140{ 
     141    # Option of making blocking sensitive to files that are in directory 
     142    # This subroutine is not currently used! (relies on default block expression stopping all handle and .txt files) 
     143 
     144    my $self =shift (@_); 
     145    my ($filename_full_path, $block_hash) = @_; 
     146 
     147    my ($tailname, $contents_basedir, $suffix) = &File::Basename::fileparse($filename_full_path, "\\.[^\\.]+\$"); 
     148    my $handle_filename = &util::filename_cat($contents_basedir,"handle"); 
     149 
     150    $block_hash->{'file_blocks'}->{$handle_filename} = 1 if (-e $handle_filename); 
    137151} 
    138152