Changeset 20651
- Timestamp:
- 2009-09-21T13:35:55+12:00 (15 years ago)
- Location:
- gsdl/trunk/perllib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/expinfo.pm
r15894 r20651 105 105 sub add_info { 106 106 my $self = shift (@_); 107 my ($OID, $doc_file, $ sortmeta) = @_;107 my ($OID, $doc_file, $index_status, $sortmeta) = @_; 108 108 $sortmeta = "" unless defined $sortmeta; 109 109 … … 112 112 return undef; 113 113 } 114 $self->delete_info ($OID); 115 $self->{'info'}->{$OID} = [$doc_file]; 114 115 print STDERR "**** adding info $OID\n"; 116 117 if (defined $self->{'info'}->{$OID}) { 118 # test to see if we are in a reindex situation 119 120 my $existing_status_info = $self->get_status_info($OID); 121 122 if ($existing_status_info eq "D") { 123 # yes, we're in a reindexing situation 124 $self->delete_info ($OID); 125 126 127 # force setting to "reindex" 128 $index_status = "R"; 129 130 } 131 else { 132 # some other, possibly erroneous, situation has arisen 133 # where the document already seems to exist 134 print STDERR "Warning: $OID already exists with index status $existing_status_info\n"; 135 print STDERR " Deleting previous version\n"; 136 137 $self->delete_info ($OID); 138 } 139 } 140 141 $self->{'info'}->{$OID} = [$doc_file,$index_status]; 116 142 push (@{$self->{'order'}}, [$OID, $sortmeta]); 117 143 } -
gsdl/trunk/perllib/plugouts/BasePlugout.pm
r20320 r20651 722 722 my $working_info = $self->{'output_info'}; 723 723 my $doc_info = $working_info->get_info($oid); 724 724 725 my ($doc_file,$index_status) = @$doc_info; 725 726 … … 736 737 $collect_dir,$oid_files,$reverse_lookups); 737 738 738 # *******739 # foreach my $assoc_file_rec (@{$doc_obj->get_assoc_files()}) {740 # my $real_filename = $assoc_file_rec->[0];741 # my $full_afile = $assoc_file_rec->[1];742 #743 # # for some reasons the image associate file has / before the full path744 # $real_filename =~ s/^\\(.*)/$1/i;745 # if (-e $real_filename) {746 #747 # if (defined $collect_dir) {748 # my $collect_dir_re_safe = $collect_dir;749 # $collect_dir_re_safe =~ s/\\/\\\\/g;750 # $collect_dir_re_safe =~ s/\./\\./g;751 #752 # $real_filename =~ s/^$collect_dir_re_safe//;753 # }754 #755 # $reverse_lookups->{$real_filename} = 1;756 #757 # push(@{$oid_files->{'assoc-file'}},$full_afile);758 # }759 # else {760 # print STDERR "Warning: archiveinf_gdbm()\n $real_filename does not appear to be on the file system\n";761 # }762 # }763 739 764 740 $self->archiveinf_files_to_field($doc_obj->get_meta_files(),"meta-file", … … 773 749 my $doc_db = &util::filename_cat($output_dir,"archiveinf-doc.gdb"); 774 750 my $src_db = &util::filename_cat($output_dir,"archiveinf-src.gdb"); 775 776 # my $doc_db_text = "";777 # $doc_db_text .= "<doc-file>$oid_files->{'doc-file'}\n";778 # $doc_db_text .= "<index-status>$oid_files->{'index-status'}\n";779 # $doc_db_text .= "<src-file>$oid_files->{'src-file'}\n";780 781 # foreach my $af (@{$oid_files->{'assoc-file'}}) {782 # $doc_db_text .= "<assoc-file>$af\n";783 # }784 785 # foreach my $mf (@{$oid_files->{'meta-file'}}) {786 # $doc_db_text .= "<meta-file>$mf\n";787 # }788 789 # chomp($doc_db_text); # remove trailing \n790 751 791 752 ##print STDERR "*** To set in db: \n\t$doc_db\n\t$oid\n\t$doc_db_text\n"; -
gsdl/trunk/perllib/plugouts/MARCXMLPlugout.pm
r20321 r20651 100 100 } 101 101 102 102 $self->process_metafiles_metadata ($doc_obj); 103 103 104 my $output_dir = $self->get_output_dir(); 104 105 &util::mk_all_dir ($output_dir) unless -e $output_dir; … … 117 118 $self->output_xml_footer($outhandler,"MARCXML"); 118 119 $self->close_xslt_pipe(); 119 120 121 $self->{'short_doc_file'} = util::filename_cat ($doc_dir, "marc.xml"); 122 123 $self->store_output_info_reference($doc_obj); 120 124 } 121 125
Note:
See TracChangeset
for help on using the changeset viewer.