Changeset 12203


Ignore:
Timestamp:
2006-07-13T12:46:44+12:00 (18 years ago)
Author:
mdewsnip
Message:

Changed the metadata assigned to be consistent with place references (for building indexes), and improved the error reporting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cic-hcap/perllib/plugins/CICWordPlug.pm

    r12170 r12203  
    8080    my $self = shift(@_);
    8181    my $conv_filename = shift(@_);
     82    my $fail_log_handle = $self->{'failhandle'};
    8283
    8384    my $in_record = 0;
     
    109110        }
    110111
    111         # Error: Could not parse record
     112        # Warning: Could not parse record
    112113        elsif ($line_sans_tags =~ /\w/) {
    113         print "Unknown type: $line";
     114        print STDERR "<ProcessingError n='Bibliography' p='CICWordPlug' r='Could not parse reference: $line'>\n" if ($self->{'gli'});
     115        print STDERR "Warning: Bibliography -- Could not parse reference: $line\n";
     116        print $fail_log_handle "Warning: Bibliography -- Could not parse reference: $line\n";
     117        $num_records++;
     118        $self->add_reference_document($num_records, $line, "", "");
    114119        }
    115120    }
     
    130135    $reference_doc_obj->set_OID("r$reference_id");
    131136    &new_metadata_entry($reference_doc_obj, "DocumentType", "Reference");
    132     &new_metadata_entry($reference_doc_obj, "Author", $reference_author);
    133     &new_metadata_entry($reference_doc_obj, "Title", $reference_title);
     137    &new_metadata_entry($reference_doc_obj, "Reference", $reference);
     138    &new_metadata_entry($reference_doc_obj, "ReferenceAuthor", $reference_author);
     139    &new_metadata_entry($reference_doc_obj, "ReferenceTitle", $reference_title);
    134140
    135     $reference_doc_obj->add_utf8_text($reference_doc_obj->get_top_section(), $reference);
     141    $reference_doc_obj->add_utf8_text($reference_doc_obj->get_top_section(), "Some dummy text.");
    136142    $self->{'processor'}->process($reference_doc_obj);
    137143    $self->{'num_processed'}++;
Note: See TracChangeset for help on using the changeset viewer.