Ignore:
Timestamp:
2010-01-27T20:54:06+13:00 (14 years ago)
Author:
ak19
Message:
  1. Minor changes for when when fedora uses Greenstone 3's tomcat: Only for GS3 in this case, don't need the file gsdl.xml since the file greenstone3.xml in GS3's tomcat already contains the necessary information. 2. In g2futil.pm: When writing out the file gsdl.xml, tries for 1 x 20 seconds to see whether the fedora server has started up again.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugouts/FedoraMETSPlugout.pm

    r20414 r21687  
    543543    $gsdl_href =~ s/^$collectparent(\/|\\)?//; # remove the collectparent path in gsdl_href and any trailing slash
    544544    $gsdl_href =~ s/\\/\//g;                   # make sure we have url paths (which only use / not \)
    545     $gsdl_href = "/gsdl/$gsdl_href";           # prepend gsdl
     545    my $localfedora = &util::filename_cat($ENV{'GSDL3SRCHOME'}, "packages", "tomcat", "conf", "Catalina", "localhost", "fedora.xml");
     546    if($ENV{'GSDL3SRCHOME'} && -e $localfedora) {                   # prepend gsdl
     547        $gsdl_href = "/greenstone3/sites/localsite/$gsdl_href";     # Fedora uses Greenstone's tomcat
     548    } else {
     549        $gsdl_href = "/gsdl/$gsdl_href";
     550    }
    546551
    547552    my $fserver = $ENV{'FEDORA_HOSTNAME'};
     
    550555    my $fdomain = "http://$fserver:$fport";
    551556    $xlink_href  = "$fdomain$gsdl_href";
    552     }
    553    
     557#ERROR: $xlink_href  = "$fname";
     558    }
    554559
    555560    return $xlink_href;
     
    674679           $gsdl_href =~ s/^$collectparent(\/|\\)?//; # remove the collectparent path in gsdl_href and any trailing slash
    675680           $gsdl_href =~ s/\\/\//g;                   # make sure we have url paths (which only use / not \)
    676            $gsdl_href = "/gsdl/$gsdl_href";           # prepend gsdl
     681           my $localfedora = &util::filename_cat($ENV{'GSDL3SRCHOME'}, "packages", "tomcat", "conf", "Catalina", "localhost", "fedora.xml");
     682           if($ENV{'GSDL3SRCHOME'} && -e $localfedora) {                   # prepend gsdl
     683           $gsdl_href = "/greenstone3/sites/localsite/$gsdl_href";     # Fedora uses Greenstone's tomcat
     684           } else {
     685           $gsdl_href = "/gsdl/$gsdl_href";
     686           }
    677687
    678688           my $fserver = $ENV{'FEDORA_HOSTNAME'};
     
    681691           my $fdomain = "http://$fserver:$fport";
    682692           $xlink_href = "xlink:href=\"$fdomain$gsdl_href\"";
     693#ERROR: $xlink_href = "xlink:href=\"$assfilePath\"";
    683694       }
    684695       
Note: See TracChangeset for help on using the changeset viewer.