Ignore:
Timestamp:
2022-10-11T23:44:21+13:00 (17 months ago)
Author:
davidb
Message:

Changes made to align with the needs of the Eurovision SPARQL prepare 02 sript

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/explode_metadata_database.pl

    r34016 r36777  
    225225    }
    226226    }
     227
     228    if (defined $collectdir) {
     229    unshift (@INC, "$collectdir/$collection/perllib/plugins");
     230    }
     231   
    227232    my $plugobj;
    228233    require "$plugin.pm";
     
    269274    my $split_exp = $plugobj->{'split_exp'};
    270275    if (defined $split_exp) {
     276
    271277    # Read in file, and then split and process individual records
    272278
     
    279285    # Split the text into records, using the plugin's split_exp
    280286
    281     my @metadata_records = split(/$split_exp/, $text);
     287    ##my @metadata_records = split(/$split_exp/, $text);
     288    my $metadata_records_ref = $plugobj->split_text_into_segments(\$text);
     289    my @metadata_records = @$metadata_records_ref;
     290   
    282291    my $total_num_records = scalar(@metadata_records);
    283292    print STDERR "Number of records: $total_num_records\n";
     
    445454    if (not defined $document_file) {
    446455
    447     if (defined ($record_number)) {
     456    my $doc_oid = $doc_obj->get_OID();
     457
     458    if (defined ($doc_oid)) {
     459        $document_file = "$doc_oid.nul";
     460    }
     461    elsif (defined ($record_number)) {
    448462        $document_file = sprintf("%8.8d", $record_number) . ".nul";
    449463    }
Note: See TracChangeset for help on using the changeset viewer.