Changeset 37179


Ignore:
Timestamp:
2023-01-24T11:45:02+13:00 (11 days ago)
Author:
davidb
Message:

Only want to get OIDMetadata if OIDtype is assigned. Also adjusted full_id so it is more obivous that the ID that is being built does not have dots '.' in it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/SplitTextFile.pm

    r36885 r37179  
    11###########################################################################
    22#
    3 # SplitTextFile.pm - a plugin for splitting input files into segments that
    4               will then be individually processed.
    5 #
     3# SplitTextFile.pm
     4-- A plugin for splitting input files into segments that will then
     5#     be individually processed.
    66#
    77# Copyright 2000 Gordon W. Paynter (gwp@cs.waikato.ac.nz)
     
    335335    my ($doc_obj) = @_;
    336336
    337     my $identifier = $doc_obj->get_metadata_element ($doc_obj->get_top_section(), $self->{'OIDmetadata'});
    338     # print STDERR "**** get_baseOID identifier = $identifier\n";
     337    if ($self->{'OIDtype'} eq "assigned") {
     338    my $identifier = $doc_obj->get_metadata_element ($doc_obj->get_top_section(), $self->{'OIDmetadata'});
     339    # print STDERR "**** get_base_OID() assigned identifier = $identifier\n";
     340    }
    339341   
    340342    $self->SUPER::add_OID($doc_obj);
     
    346348    my ($doc_obj, $id, $segment) = @_;
    347349
    348     my $full_id = $id . "s" . $segment;
     350    my $full_id = "${id}s${segment}";
    349351    if ($self->{'OIDtype'} eq "assigned") {
    350352    my $identifier = $doc_obj->get_metadata_element ($doc_obj->get_top_section(), $self->{'OIDmetadata'});
Note: See TracChangeset for help on using the changeset viewer.