source: gsdl/trunk/bin/script/export.pl@ 18660

Last change on this file since 18660 was 18660, checked in by kjdon, 12 years ago

we now use gdb instead of ldb/bdb for collection and archives-inf databases. We have a rename step to rename any legacy databases

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 19.4 KB
Line 
1#!/usr/bin/perl -w
2
3###########################################################################
4#
5# export.pl --
6# A component of the Greenstone digital library software
7# from the New Zealand Digital Library Project at the
8# University of Waikato, New Zealand.
9#
10# Copyright (C) 2004 New Zealand Digital Library Project
11#
12# This program is free software; you can redistribute it and/or modify
13# it under the terms of the GNU General Public License as published by
14# the Free Software Foundation; either version 2 of the License, or
15# (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, write to the Free Software
24# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25#
26###########################################################################
27
28
29# This program will export a particular collection into a specific Format (e.g. METS or DSpace)
30
31package export;
32
33BEGIN {
34 die "GSDLHOME not set\n" unless defined $ENV{'GSDLHOME'};
35 die "GSDLOS not set\n" unless defined $ENV{'GSDLOS'};
36 unshift (@INC, "$ENV{'GSDLHOME'}/perllib");
37 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan");
38 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/plugins");
39 unshift (@INC, "$ENV{'GSDLHOME'}/perllib/plugouts");
40
41 if (defined $ENV{'GSDLEXTS'}) {
42 my @extensions = split(/:/,$ENV{'GSDLEXTS'});
43 foreach my $e (@extensions) {
44 my $ext_prefix = "$ENV{'GSDLHOME'}/ext/$e";
45
46 unshift (@INC, "$ext_prefix/perllib");
47 unshift (@INC, "$ext_prefix/perllib/cpan");
48 unshift (@INC, "$ext_prefix/perllib/plugins");
49 unshift (@INC, "$ext_prefix/perllib/plugouts");
50 }
51 }
52}
53
54use strict;
55no strict 'refs'; # allow filehandles to be variables and vice versa
56no strict 'subs'; # allow barewords (eg STDERR) as function arguments
57
58use arcinfo;
59use colcfg;
60use plugin;
61use plugout;
62use manifest;
63use util;
64use scriptutil;
65use FileHandle;
66use gsprintf 'gsprintf';
67use printusage;
68use parse2;
69
70
71my $oidtype_list =
72 [ { 'name' => "hash",
73 'desc' => "{import.OIDtype.hash}" },
74 { 'name' => "assigned",
75 'desc' => "{import.OIDtype.assigned}" },
76 { 'name' => "incremental",
77 'desc' => "{import.OIDtype.incremental}" },
78 { 'name' => "dirname",
79 'desc' => "{import.OIDtype.dirname}" } ];
80
81# what format to export as
82my $saveas_list =
83 [ { 'name' => "GreenstoneMETS",
84 'desc' => "{export.saveas.GreenstoneMETS}"},
85 { 'name' => "FedoraMETS",
86 'desc' => "{export.saveas.FedoraMETS}"},
87 { 'name' => "MARCXML",
88 'desc' => "{export.saveas.MARCXML}"},
89 { 'name' => "DSpace",
90 'desc' => "{export.saveas.DSpace}" }
91 ];
92
93
94# Possible attributes for each argument
95# name: The name of the argument
96# desc: A description (or more likely a reference to a description) for this argument
97# type: The type of control used to represent the argument. Options include: string, int, flag, regexp, metadata, language, enum etc
98# reqd: Is this argument required?
99# hiddengli: Is this argument hidden in GLI?
100# modegli: The lowest detail mode this argument is visible at in GLI
101
102my $saveas_argument =
103 { 'name' => "saveas",
104 'desc' => "{export.saveas}",
105 'type' => "enum",
106 'list' => $saveas_list,
107 'deft' => "GreenstoneMETS",
108 'reqd' => "no",
109 'modegli' => "3" };
110
111
112my $arguments =
113 [
114 $saveas_argument,
115 { 'name' => "exportdir",
116 'desc' => "{export.exportdir}",
117 'type' => "string",
118 'reqd' => "no",
119 'hiddengli' => "yes" },
120 { 'name' => "importdir",
121 'desc' => "{import.importdir}",
122 'type' => "string",
123 'reqd' => "no",
124 'hiddengli' => "yes" },
125 { 'name' => "collectdir",
126 'desc' => "{export.collectdir}",
127 'type' => "string",
128 # parsearg left "" as default
129 #'deft' => &util::filename_cat ($ENV{'GSDLHOME'}, "collect"),
130 'deft' => "",
131 'reqd' => "no",
132 'hiddengli' => "yes" },
133 { 'name' => "site",
134 'desc' => "{import.site}",
135 'type' => "string",
136 'deft' => "",
137 'reqd' => "no",
138 'hiddengli' => "yes" },
139 { 'name' => "manifest",
140 'desc' => "{import.manifest}",
141 'type' => "string",
142 'deft' => "",
143 'reqd' => "no",
144 'hiddengli' => "yes" },
145 { 'name' => "listall",
146 'desc' => "{export.listall}",
147 'type' => "flag",
148 'reqd' => "no" },
149 { 'name' => "debug",
150 'desc' => "{export.debug}",
151 'type' => "flag",
152 'reqd' => "no",
153 'hiddengli' => "yes" },
154 { 'name' => "faillog",
155 'desc' => "{export.faillog}",
156 'type' => "string",
157 'deft' => "",
158 'reqd' => "no",
159 'modegli' => "3" },
160 # does this make sense?
161# { 'name' => "incremental",
162# 'desc' => "{import.incremental}",
163# 'type' => "flag",
164# 'hiddengli' => "yes" },
165 { 'name' => "keepold",
166 'desc' => "{export.keepold}",
167 'type' => "flag",
168 'reqd' => "no",
169 'hiddengli' => "yes" },
170 { 'name' => "removeold",
171 'desc' => "{export.removeold}",
172 'type' => "flag",
173 'reqd' => "no",
174 'modegli' => "3" },
175 { 'name' => "language",
176 'desc' => "{scripts.language}",
177 'type' => "string",
178 'reqd' => "no",
179 'modegli' => "3" },
180 { 'name' => "maxdocs",
181 'desc' => "{export.maxdocs}",
182 'type' => "int",
183 'reqd' => "no",
184 'range' => "1,",
185 'modegli' => "1" },
186 { 'name' => "OIDtype",
187 'desc' => "{import.OIDtype}",
188 'type' => "enum",
189 'list' => $oidtype_list,
190 # parsearg left "" as default
191 #'deft' => "hash",
192 'reqd' => "no",
193 'modegli' => "2" },
194 { 'name' => "OIDmetadata",
195 'desc' => "{import.OIDmetadata}",
196 'type' => "metadata",
197 'deft' => "dc.Identifier",
198 'reqd' => "no",
199 'modegli' => "2" },
200 { 'name' => "out",
201 'desc' => "{export.out}",
202 'type' => "string",
203 'deft' => "STDERR",
204 'reqd' => "no",
205 'hiddengli' => "yes" },
206 { 'name' => "statsfile",
207 'desc' => "{export.statsfile}",
208 'type' => "string",
209 'deft' => "STDERR",
210 'reqd' => "no",
211 'hiddengli' => "yes" },
212 { 'name' => "xsltfile",
213 'desc' => "{BasPlugout.xslt_file}",
214 'type' => "string",
215 'reqd' => "no",
216 'hiddengli' => "yes" },
217 { 'name' => "xslt_txt",
218 'desc' => "{METSPlugout.xslt_txt}",
219 'type' => "string",
220 'reqd' => "no",
221 'hiddengli' => "no" },
222 { 'name' => "xslt_mets",
223 'desc' => "{METSPlugout.xslt_mets}",
224 'type' => "string",
225 'reqd' => "no",
226 'hiddengli' => "no" },
227 { 'name' => "fedora_namespace",
228 'desc' => "{FedoraMETSPlugout.fedora_namespace}",
229 'type' => "string",
230 'deft' => "greenstone",
231 'reqd' => "no",
232 'hiddengli' => "no" },
233 { 'name' => "mapping_file",
234 'desc' => "{MARCXMLPlugout.mapping_file}",
235 'type' => "string",
236 'reqd' => "no",
237 'hiddengli' => "no" },
238 { 'name' => "group_marc",
239 'desc' => "{MARCXMLPlugout.group}",
240 'type' => "flag",
241 'reqd' => "no",
242 'hiddengli' => "no" },
243 { 'name' => "verbosity",
244 'desc' => "{export.verbosity}",
245 'type' => "int",
246 'range' => "0,3",
247 'deft' => "2",
248 'reqd' => "no",
249 'modegli' => "3" },
250 { 'name' => "gli",
251 'desc' => "{scripts.gli}",
252 'type' => "flag",
253 'reqd' => "no",
254 'hiddengli' => "yes" },
255 { 'name' => "xml",
256 'desc' => "{scripts.xml}",
257 'type' => "flag",
258 'reqd' => "no",
259 'hiddengli' => "yes" }
260 ];
261
262my $options = { 'name' => "export.pl",
263 'desc' => "{export.desc}",
264 'args' => $arguments };
265
266my $listall_options = { 'name' => "export.pl",
267 'desc' => "{export.desc}",
268 'args' => [ $saveas_argument ] };
269
270
271&main();
272
273sub main {
274 # params
275 my ($language, $verbosity, $debug,
276 $collectdir, $importdir, $exportdir, $site, $manifest,
277 $incremental, $keepold, $removeold,
278 $saveas,
279 $OIDtype, $OIDmetadata,
280 $maxdocs, $statsfile,
281 $out, $faillog, $gli, $listall,
282 # plugout specific ones
283 $mapping_file, $xsltfile,
284 $xslt_mets, $xslt_txt, $fedora_namespace, $group_marc);
285
286 my $xml = 0;
287
288 # other vars
289 my ($configfilename, $collection, $collectcfg,
290 $expinfo_doc_filename, $export_info,
291 $gs_mode,
292 $processor, $pluginfo);
293
294 my $service = "export";
295
296 my $hashParsingResult = {};
297 # general options available to all plugins
298 my $intArgLeftinAfterParsing = parse2::parse(\@ARGV,$arguments,$hashParsingResult,"allow_extra_options");
299
300 # If parse returns -1 then something has gone wrong
301 if ($intArgLeftinAfterParsing == -1)
302 {
303 &PrintUsage::print_txt_usage($options, "{export.params}");
304 die "\n";
305 }
306
307 foreach my $strVariable (keys %$hashParsingResult)
308 {
309 eval "\$$strVariable = \$hashParsingResult->{\"\$strVariable\"}";
310 }
311
312
313 # these are options used by other things - we just set default values
314 # undef means will be set from config file if there
315 my $gzip = undef;
316
317 # If $language has been specified, load the appropriate resource bundle
318 # (Otherwise, the default resource bundle will be loaded automatically)
319 if ($language && $language =~ /\S/) {
320 &gsprintf::load_language_specific_resource_bundle($language);
321 }
322
323 if ($listall) {
324 if ($xml) {
325 &PrintUsage::print_xml_usage($listall_options);
326 }
327 else
328 {
329 &PrintUsage::print_txt_usage($listall_options,"{export.params}");
330 }
331 die "\n";
332 }
333
334 if ($xml) {
335 &PrintUsage::print_xml_usage($options);
336 die "\n";
337 }
338
339 if ($gli) { # the gli wants strings to be in UTF-8
340 &gsprintf::output_strings_in_UTF8;
341 }
342
343 # now check that we had exactly one leftover arg, which should be
344 # the collection name. We don't want to do this earlier, cos
345 # -xml arg doesn't need a collection name
346 # Or if the user specified -h, then we output the usage also
347 if ($intArgLeftinAfterParsing != 1 || (@ARGV && $ARGV[0] =~ /^\-+h/))
348 {
349 &PrintUsage::print_txt_usage($options, "{export.params}");
350 die "\n";
351 }
352
353 my $close_out = 0;
354 if ($out !~ /^(STDERR|STDOUT)$/i) {
355 open (OUT, ">$out") ||
356 (&gsprintf(STDERR, "{common.cannot_open_output_file}\n", $out) && die);
357 $out = 'export::OUT';
358 $close_out = 1;
359 }
360 $out->autoflush(1);
361
362 # get and check the collection name
363 if (($collection = &colcfg::use_collection($site, @ARGV, $collectdir)) eq "") {
364 &PrintUsage::print_txt_usage($options, "{export.params}");
365 die "\n";
366 }
367 # add collection's perllib dir into include path in
368 # case we have collection specific modules
369 unshift (@INC, "$ENV{'GSDLCOLLECTDIR'}/perllib");
370
371 # check that we can open the faillog
372 if ($faillog eq "") {
373 $faillog = &util::filename_cat($ENV{'GSDLCOLLECTDIR'}, "etc", "fail.log");
374 }
375 open (FAILLOG, ">$faillog") ||
376 (&gsprintf(STDERR, "{export.cannot_open_fail_log}\n", $faillog) && die);
377 my $faillogname = $faillog;
378 $faillog = 'export::FAILLOG';
379 $faillog->autoflush(1);
380
381 # Read in the collection configuration file.
382 ($configfilename, $gs_mode) = &colcfg::get_collect_cfg_name($out);
383
384
385 # Read in the collection configuration file.
386 ($configfilename, $gs_mode) = &colcfg::get_collect_cfg_name($out);
387
388 if ($gs_mode eq "gs2") {
389 $collectcfg = &colcfg::read_collect_cfg ($configfilename);
390 } elsif ($gs_mode eq "gs3") {
391 $collectcfg = &colcfg::read_collection_cfg_xml ($configfilename);
392 }
393
394 if (defined $collectcfg->{'importdir'} && $importdir eq "") {
395 $importdir = $collectcfg->{'importdir'};
396 }
397 if (defined $collectcfg->{'exportdir'} && $exportdir eq "") {
398 $exportdir = $collectcfg->{'exportdir'};
399 }
400
401 # fill in the default import and export directories if none
402 # were supplied, turn all \ into / and remove trailing /
403 $importdir = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "import") if $importdir eq "";
404 $importdir =~ s/[\\\/]+/\//g;
405 $importdir =~ s/\/$//;
406 if (!-e $importdir) {
407 &gsprintf($out, "{import.no_import_dir}\n\n", $importdir);
408 die "\n";
409 }
410
411 $exportdir = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, "export") if $exportdir eq "";
412 $exportdir =~ s/[\\\/]+/\//g;
413 $exportdir =~ s/\/$//;
414
415 my $plugins = [];
416 if (defined $collectcfg->{'plugin'}) {
417 $plugins = $collectcfg->{'plugin'};
418 }
419 # some global options for the plugins
420 my @global_opts = ();
421
422 if ($verbosity !~ /\d+/) {
423 if (defined $collectcfg->{'verbosity'} && $collectcfg->{'verbosity'} =~ /\d+/) {
424 $verbosity = $collectcfg->{'verbosity'};
425 } else {
426 $verbosity = 2; # the default
427 }
428 }
429
430 if (defined $collectcfg->{'gzip'} && !$gzip) {
431 if ($collectcfg->{'gzip'} =~ /^true$/i) {
432 $gzip = 1;
433 }
434 }
435 if ($maxdocs !~ /\-?\d+/) {
436 if (defined $collectcfg->{'maxdocs'} && $collectcfg->{'maxdocs'} =~ /\-?\d+/) {
437 $maxdocs = $collectcfg->{'maxdocs'};
438 } else {
439 $maxdocs = -1; # the default
440 }
441 }
442
443 if (!defined $OIDtype || ($OIDtype !~ /^(hash|incremental|assigned|dirname)$/)) {
444 if (defined $collectcfg->{'OIDtype'} && $collectcfg->{'OIDtype'} =~ /^(hash|incremental|assigned|dirname)$/) {
445 $OIDtype = $collectcfg->{'OIDtype'};
446 } else {
447 $OIDtype = "hash"; # the default
448 }
449 }
450
451 if (defined $collectcfg->{'debug'} && $collectcfg->{'debug'} =~ /^true$/i) {
452 $debug = 1;
453 }
454 if (defined $collectcfg->{'gli'} && $collectcfg->{'gli'} =~ /^true$/i) {
455 $gli = 1;
456 }
457 $gli = 0 unless defined $gli;
458
459 # check keepold and removeold
460 ($removeold, $keepold, $incremental) = &scriptutil::check_removeold_and_keepold($removeold, $keepold, $incremental, "export", $collectcfg);
461
462 print STDERR "<export>\n" if $gli;
463
464 my $manifest_lookup = new manifest();
465 if ($manifest ne "") {
466 my $manifest_filename = $manifest;
467
468 if ($manifest_filename !~ m/^[\\\/]/) {
469 $manifest_filename = &util::filename_cat ($ENV{'GSDLCOLLECTDIR'}, $manifest_filename);
470 }
471
472 $manifest =~ s/[\\\/]+/\//g;
473 $manifest =~ s/\/$//;
474
475 $manifest_lookup->parse($manifest_filename);
476 }
477
478 # load all the plugins
479 $pluginfo = &plugin::load_plugins ($plugins, $verbosity, $out, $faillog, \@global_opts);
480
481 if (scalar(@$pluginfo) == 0) {
482 &gsprintf($out, "{import.no_plugins_loaded}\n");
483 die "\n";
484 }
485
486 # remove the old contents of the export directory if needed
487 if ($removeold && -e $exportdir) {
488 &gsprintf($out, "{export.removing_export}\n");
489 &util::rm_r ($exportdir);
490 }
491
492 # create the export dir if needed
493 &util::mk_all_dir($exportdir);
494
495 # read the export information file
496 # If saveas=DSpace, a "contents" file will be created, otherwise "export.inf"
497
498 # the plugouts should be doing this!!
499 if ($saveas eq "DSpace"){
500 $expinfo_doc_filename = &util::filename_cat ($exportdir, "contents");
501 } elsif ($saveas =~ m/^.*METS$/ || $saveas eq "MARC" ) {
502## $expinfo_doc_filename = &util::filename_cat ($exportdir, "export.inf");
503 my $doc_db = "archiveinf-doc";
504 $expinfo_doc_filename = &util::filename_cat ($exportdir, $doc_db);
505 &util::rename_gdbm_file($expinfo_doc_filename); # ensures gdb in case we have an existing legacy ldb one - can this happen?
506 $expinfo_doc_filename .= ".gdb";
507
508 }
509
510 $export_info = new arcinfo();
511 $export_info -> load_info ($expinfo_doc_filename);
512
513 my ($plugout);
514 if (defined $collectcfg->{'plugout'} && $collectcfg->{'plugout'} =~ /^(.*METS|DSpace|MARCXML)Plugout/) {
515 $plugout = $collectcfg->{'plugout'};
516 }
517 else{
518 if ($saveas !~ /^(.*METS|DSpace|MARCXML)$/) {
519 push @$plugout,"GreenstoneMETSPlugout";
520 }
521 else{
522 push @$plugout,$saveas."Plugout";
523 }
524 }
525
526 my $plugout_name = $plugout->[0];
527
528 push @$plugout,("-output_info",$export_info) if (defined $export_info);
529 push @$plugout,("-verbosity",$verbosity) if (defined $verbosity);
530 push @$plugout,("-debug") if ($debug);
531 push @$plugout,("-gzip_output",$gzip) if (defined $gzip);
532 push @$plugout,("-output_handle",$out) if (defined $out);
533 push @$plugout,("-xslt_file",$xsltfile) if (defined $xsltfile);
534 push @$plugout,("-group") if ($group_marc && $plugout_name =~ m/^MARCXMLPlugout$/);
535 push @$plugout,("-mapping_file",$mapping_file) if (defined $mapping_file && $plugout_name =~ m/^MARCXMLPlugout$/);
536 push @$plugout,("-xslt_mets",$xslt_mets) if (defined $xslt_mets && $plugout_name =~ m/^.*METSPlugout$/);
537 push @$plugout,("-xslt_txt",$xslt_txt) if (defined $xslt_txt && $plugout_name =~ m/^.*METSPlugout$/);
538 push @$plugout,("-fedora_namespace",$fedora_namespace) if (defined $fedora_namespace && $plugout_name eq "FedoraMETSPlugout");
539
540 $processor = &plugout::load_plugout($plugout);
541 $processor->setoutputdir ($exportdir);
542
543 $processor->set_OIDtype ($OIDtype, $OIDmetadata);
544
545 &plugin::begin($pluginfo, $importdir, $processor, $maxdocs, $gli);
546
547 if ($manifest eq "") {
548 # process the import directory
549 my $block_hash = {};
550 my $metadata = {};
551 # gobal blocking pass may set up some metadata
552 &plugin::file_block_read($pluginfo, $importdir, "", $block_hash, $metadata, $gli);
553 &plugin::read ($pluginfo, $importdir, "", $block_hash, $metadata, $processor, $maxdocs, 0, $gli);
554 }
555 else {
556 # process any files marked for exporting
557 foreach my $file (keys %{$manifest_lookup->{'index'}}) {
558 &plugin::read ($pluginfo, $importdir, $file, {}, {}, $processor, $maxdocs, 0, $gli);
559 }
560 }
561
562 if ($saveas eq "FedoraMETS") {
563 # create collection "doc obj" for Fedora that contains
564 # collection-level metadata
565
566 my $doc_obj = new doc($configfilename,"nonindexed_doc");
567 $doc_obj->set_OID("collection");
568
569 my $col_name = undef;
570 my $col_meta = $collectcfg->{'collectionmeta'};
571
572 if (defined $col_meta) {
573
574 store_collectionmeta($col_meta,"collectionname",$doc_obj); # in GS3 this is a collection's name
575 store_collectionmeta($col_meta,"collectionextra",$doc_obj); # in GS3 this is a collection's description
576
577 }
578 $processor->process($doc_obj);
579 }
580
581 &plugin::end($pluginfo, $processor);
582
583 &plugin::deinit($pluginfo, $processor);
584
585 # write out the export information file
586 #$processor->close_file_output() if $groupsize > 1;
587 $processor->close_group_output() if $processor->is_group();
588
589 if (($saveas =~ m/^.*METS$/) || ($saveas eq "MARC")) {
590 # Not all export types need this (e.g. DSpace)
591 $export_info->save_info($expinfo_doc_filename);
592 }
593
594 # write out export stats
595 my $close_stats = 0;
596 if ($statsfile !~ /^(STDERR|STDOUT)$/i) {
597 if (open (STATS, ">$statsfile")) {
598 $statsfile = 'import::STATS';
599 $close_stats = 1;
600 } else {
601 &gsprintf($out, "{import.cannot_open_stats_file}", $statsfile);
602 &gsprintf($out, "{import.stats_backup}\n");
603 $statsfile = 'STDERR';
604 }
605 }
606
607 &gsprintf($out, "\n");
608 &gsprintf($out, "*********************************************\n");
609 &gsprintf($out, "{export.complete}\n");
610 &gsprintf($out, "*********************************************\n");
611
612 &plugin::write_stats($pluginfo, $statsfile, $faillogname, $gli);
613 if ($close_stats) {
614 close STATS;
615 }
616
617 close OUT if $close_out;
618 close FAILLOG;
619}
620
621
622sub store_collectionmeta
623{
624 my ($collectionmeta,$field,$doc_obj) = @_;
625
626 my $section = $doc_obj->get_top_section();
627
628 my $field_hash = $collectionmeta->{$field};
629
630 foreach my $k (keys %$field_hash)
631 {
632 my $val = $field_hash->{$k};
633
634 ### print STDERR "*** $k = $field_hash->{$k}\n";
635
636 my $md_label = "ex.$field";
637
638
639 if ($k =~ m/^\[l=(.*?)\]$/)
640 {
641
642 my $md_suffix = $1;
643 $md_label .= "^$md_suffix";
644 }
645
646
647 $doc_obj->add_utf8_metadata($section,$md_label, $val);
648
649 # see cfgread4gs3.pm: GS2's "collectionextra" is called "description" in GS3,
650 # while "collectionname" in GS2 is called "name" in GS3.
651 # Variable $nameMap variable in cfgread4gs3.pm maps between GS2 and GS3
652 if (($md_label eq "ex.collectionname^en") || ($md_label eq "ex.collectionname"))
653 {
654 $doc_obj->add_utf8_metadata($section,"dc.Title", $val);
655 }
656
657 }
658}
659
660
661
662
Note: See TracBrowser for help on using the repository browser.