Changeset 15620

Show
Ignore:
Timestamp:
21.05.2008 20:10:00 (11 years ago)
Author:
ak19
Message:

Reads collectionConfig.xml file's collection name and description as collectionmeta for GS3, just as these elements were part of the collectionmeta for Greenstone 2

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/bin/script/export.pl

    r14942 r15620  
    287287    my $val = $field_hash->{$k}; 
    288288 
    289  
    290 ### print STDERR "*** $k = $field_hash->{$k}\n"; 
     289    ### print STDERR "*** $k = $field_hash->{$k}\n"; 
    291290 
    292291    my $md_label = "ex.$field"; 
     
    303302    $doc_obj->add_utf8_metadata($section,$md_label, $val); 
    304303     
     304    # see cfgread4gs3.pm: GS2's "collectionextra" is called "description" in GS3, 
     305    # while "collectionname" in GS2 is called "name" in GS3. 
     306    # Variable $nameMap variable in cfgread4gs3.pm maps between GS2 and GS3 
    305307    if (($md_label eq "ex.collectionname^en") || ($md_label eq "ex.collectionname")) 
    306308    { 
     
    617619        my $doc_obj = new doc($configfilename,"nonindexed_doc"); 
    618620        $doc_obj->set_OID("collection"); 
    619  
     621         
    620622        my $col_name = undef; 
    621623        my $col_meta = $collectcfg->{'collectionmeta'}; 
     624         
    622625        if (defined $col_meta) 
    623626        { 
    624             store_collectionmeta($col_meta,"collectionname",$doc_obj); 
    625             store_collectionmeta($col_meta,"collectioextra",$doc_obj); 
    626  
    627         } 
    628  
     627            store_collectionmeta($col_meta,"collectionname",$doc_obj); # in GS3 this is a collection's name 
     628            store_collectionmeta($col_meta,"collectionextra",$doc_obj); # in GS3 this is a collection's description 
     629             
     630        } 
    629631        $processor->process($doc_obj); 
    630632        }