Changeset 15191

Show
Ignore:
Timestamp:
14.04.2008 16:20:45 (11 years ago)
Author:
dmn
Message:

updating branch from trunk

Location:
greenstone3/branches/customizingGreenstone3
Files:
1 removed
29 modified
14 copied

Legend:

Unmodified
Added
Removed
  • greenstone3/branches/customizingGreenstone3/README.txt

    r13856 r15191  
    2121See 'Installing from a Source Distribution' section below for extra notes about installing from Source. 
    2222 
    23 See the README-CVS.txt file for extra notes about installing from CVS. 
     23See the README-SVN.txt file for extra notes about installing directly from SVN. 
    2424 
    2525Running Greenstone: 
    2626--------------------------------------------------------- 
    2727 
    28 To start up Greenstone, select Greenstone 2 Digital Library from the Start menu (Windows), or run gs3-server.sh/bat. This launches a small server program, which starts up Tomcat and launches a browser. A small window pops up which allows you to chnage some settings for your library and restart the Tomcat server. Closing this program will stop Tomcat running. 
     28To start up Greenstone, select Greenstone3 Digital Library from the Start menu (Windows), or run gs3-server.sh/bat. This launches a small server program, which starts up Tomcat and launches a browser. A small window pops up which allows you to chnage some settings for your library and restart the Tomcat server. Closing this program will stop Tomcat running. 
    2929 
    3030Alternatively, you can start Tomcat directly through using Ant. 'ant start', 'ant restart' and 'ant stop' starts, restarts and shuts down Tomcat, respectively. This will only start/stop a local server (one installed by Greenstone). You will need to manually start/stop an external Tomcat (see below for notes about using a version of Tomcat external to Greenstone). 
     
    3939You need to have Perl installed and on your PATH. Perl is included as part of  
    4040the Windows binary distribution. 
    41 run  'ant gli", or cd to greenstone3/gli and run gli4gs3.sh/bat. This is a  
    42 graphical tool for building collections. Once you have created and built a  
    43 collection, you can see it by clicking 'Preview collection' on the Build panel. 
     41You can build collections using the Greenstone Librarian Interface (GLI). To start GLI, run  'ant gli", or cd to greenstone3/gli and run gli4gs3.sh/bat.  
     42Once you have created and built a collection, you can see it by clicking 'Preview collection' on the Build panel. 
    4443 
    4544Note that GLI doesn't start up the Greenstone Tomcat server so you should  
     
    141140Download the greenstone-3.xx-src.tar.gz package from sourceforge.net/projects/greenstone3, and unpack it. 
    142141In the greenstone3 directory, edit the build.properties file and run  
    143 ant prepare install 
     142ant install 
    144143 
    145144Tomcat will be installed as part of the prepare process. To stop this set the tomcat.installed.path to be the root of an existing Tomcat installation.  
     
    181180To recompile your Greenstone3 installation, in the top level greenstone3 directory, run: 
    182181 
     182ant clean (use distclean instead if you want to regenerate the C++ Makefiles) 
    183183ant configure 
    184184ant configure-c++ 
    185 ant clean 
    186185ant compile 
    187186 
  • greenstone3/branches/customizingGreenstone3/bin/script/convert_coll_from_gs2.pl

    r13917 r15191  
    128128    my $collwriter = new XML::Writer(OUTPUT => $colloutput, NEWLINES => 1); 
    129129     
    130     $collwriter->startTag('collectionConfig', 'xmlns:gsf'=>"http://www.greenstone.org/greenstone3/schema/ConfigFormat", 'xmlns:xsl'=>'http://www.w3.org/1999/XSL/Transform'); 
     130    $collwriter->startTag('CollectionConfig', 'xmlns:gsf'=>"http://www.greenstone.org/greenstone3/schema/ConfigFormat", 'xmlns:xsl'=>'http://www.w3.org/1999/XSL/Transform'); 
    131131     
    132132    #output the collection metadata to the collectionConfig file 
     
    134134     
    135135    my $creator = $collectcfg->{'creator'}; 
    136     &output_metadata($collwriter, 'creator', $creator); 
     136    &output_metadata($collwriter,'default', 'creator', $creator); 
    137137    my $public =$collectcfg->{'public'}; 
    138     &output_metadata($collwriter, 'public', $public); 
     138    &output_metadata($collwriter,'default', 'public', $public); 
     139     
    139140    $collwriter->endTag('metadataList'); 
    140141 
     
    169170    my $numdocs = $buildcfg->{'numdocs'}; 
    170171    $buildwriter->startTag('metadataList'); 
    171     &output_metadata($buildwriter, 'numDocs', $numdocs); 
    172     &output_metadata($buildwriter, 'buildType', $buildtype); 
     172    &output_metadata($buildwriter,'', 'numDocs', $numdocs); 
     173    &output_metadata($buildwriter,'', 'buildType', $buildtype); 
    173174    $buildwriter->endTag('metadataList'); 
    174175     
     
    191192        $indexmap->{$k} = $v; 
    192193        push @indexlist, $k; 
    193         if ($first) { 
    194         $defaultindex = $v; 
     194        if ($first == 1) { 
     195        $defaultindex = $k; 
    195196        $first = 0; 
    196197        }    
     
    202203    if (defined $collectcfg->{'defaultindex'}) { 
    203204    $defaultindex = $collectcfg->{'defaultindex'}; 
    204     $defaultindex = $indexmap->{$defaultindex}; 
     205    #$defaultindex = $indexmap->{$defaultindex}; 
    205206    } 
    206207     
     
    209210    my @levellist = (); 
    210211    my $default_search_level = ""; 
     212    my $default_search_level_shortname = ""; 
    211213    my $default_retrieve_level = "Sec"; 
    212214    $first = 1; 
     
    219221        push @levellist, $k; 
    220222        if ($first) { 
    221             $default_search_level = $v; 
     223            $default_search_level = $k; 
     224            $default_search_level_shortname = $v; 
    222225            $first = 0; 
    223226        } 
     
    227230    if (defined $collectcfg->{'defaultlevel'}) { 
    228231        $default_search_level = $collectcfg->{'defaultlevel'}; 
    229         $default_search_level = $levelmap->{$default_search_level}; 
     232        #$default_search_level = $levelmap->{$default_search_level}; 
     233        $default_search_level_shortname = $levelmap->{$default_search_level}; 
    230234    } 
    231235    if (defined $buildcfg->{'textlevel'}) { 
     
    237241 
    238242    #output the search stuff to coll cfg 
    239     $collwriter->startTag('search'); 
     243    $collwriter->startTag('search','type'=>$buildtype); 
    240244    foreach my $i (keys %$indexmap) { 
    241245    $collwriter->startTag('index', 'name'=>$i); 
     
    244248    foreach my $lang (keys %{$collectionmeta->{$indexdisplay}}) { 
    245249        my $value = $collectionmeta->{$indexdisplay}->{$lang}; 
    246         output_display($collwriter, 'name', $lang, $value); 
     250        output_display($collwriter, 'name', $lang, $i); 
    247251    } 
    248252    $collwriter->endTag('index'); 
     253    } 
     254 
     255    #output the defaultIndex to coll cfg 
     256    $collwriter->emptyTag('defaultIndex','name'=>$defaultindex); 
     257 
     258    #indexSubcollection 
     259    my $indexsubcollections = $collectcfg->{'indexsubcollections'}; 
     260    
     261    if (defined $indexsubcollections) { 
     262    my $indexsubcollections_t= $collectcfg->{'indexsubcollections'}; 
     263    foreach my $i ( @$indexsubcollections_t) { 
     264        $collwriter->startTag('indexSubcollection', 'name'=>$i); 
     265        &output_display($collwriter, 'name', $defaultlang, $i); 
     266        $collwriter->endTag('indexSubcollection'); 
     267    } 
     268    }  
     269 
     270    #subcollection 
     271    my $subcollection = $collectcfg->{'subcollection'}; 
     272    if (defined $subcollection){ 
     273    foreach my $entry (keys %$subcollection){ 
     274        my $value = $subcollection->{$entry}; 
     275        $collwriter->emptyTag('subcollection','filter'=>$value,'name'=>$entry); 
     276    } 
     277    } 
     278 
     279    #indexlanguage 
     280    my $languages = $collectcfg->{'languages'}; 
     281    if (defined $languages){ 
     282    my $languages_t = $collectcfg->{'languages'}; 
     283    foreach my $i (@$languages_t){ 
     284        $collwriter->startTag('indexLanguage','name'=>$i); 
     285         &output_display($collwriter, 'name', $defaultlang, $i); 
     286        $collwriter->endTag('indexLanguage'); 
     287    } 
    249288    } 
    250289 
     
    261300        $collwriter->endTag('level'); 
    262301    } 
    263     } 
     302    $collwriter->emptyTag('defaultLevel', 'name'=>$default_search_level); 
     303    } 
     304     
     305    # add in the search type  
     306    if (defined $format->{'SearchTypes'}){ 
     307    $collwriter->startTag('format', 'name'=>"searchType"); 
     308    $collwriter->charactersXML($format->{'SearchTypes'}); 
     309    $collwriter->endTag('format'); 
     310    } 
     311 
    264312    # add in the format stuff 
    265313    if (defined $format->{'SearchVList'}) { 
     
    276324     
    277325    $collwriter->endTag('search'); 
    278      
     326 
     327    # import plugins 
     328   
     329    my $plugins = $collectcfg->{'plugin'}; 
     330     
     331    if (defined $plugins){ 
     332    $collwriter->startTag('import'); 
     333    $collwriter->startTag('pluginList'); 
     334    foreach my $pl (@$plugins) { 
     335        my ($pluginname) = @$pl[0]; 
     336        $collwriter->startTag('plugin','name'=>$pluginname); 
     337 
     338        for (my $i=1; $i<scalar(@$pl); $i++) { 
     339        my $arg =@$pl[$i]; 
     340        if ($arg =~ /^-/){ 
     341            my $option_name=@$pl[$i]; 
     342            my $option_value=@$pl[$i+1]; 
     343            if (defined $option_value){ 
     344            if ($option_value =~ /^-/){ 
     345                $collwriter->startTag('option','name'=>$option_name);  
     346                $collwriter->endTag('option'); 
     347            }else{ 
     348                $collwriter->startTag('option','name'=>$option_name,'value'=>$option_value);  
     349                $collwriter->endTag('option'); 
     350            } 
     351            } 
     352        } 
     353        } 
     354        $collwriter->endTag('plugin'); 
     355    } 
     356    $collwriter->endTag('pluginList'); 
     357    $collwriter->endTag('import'); 
     358    } 
     359 
    279360    $buildwriter->startTag('serviceRackList'); 
    280361     
     
    288369    } 
    289370 
     371 #indexSubcollectionList 
     372 
     373    my $subcollectionmap = $buildcfg->{'subcollectionmap'}; 
     374    my $firstsubcollection = 1; 
     375    my $defaultsubcollection = ""; 
     376    my @subcollist; 
     377    my $subcolmap = {}; 
     378 
     379    if (defined $buildcfg->{'subcollectionmap'}) { 
     380    my $subcolmap_t = $buildcfg->{'subcollectionmap'}; 
     381 
     382    foreach my $l (@$subcolmap_t) { 
     383        my @pair = split(/->/, $l); 
     384        $subcolmap->{$pair[0]} = $pair[1]; 
     385        push @subcollist, $pair[0]; 
     386        if ($firstsubcollection==1) { 
     387        $defaultsubcollection = $pair[1]; 
     388        $firstsubcollection = 0; 
     389        }    
     390    } 
     391 
     392    } 
     393 
     394 
    290395    #do the retrieve service 
    291396    $buildwriter->startTag('serviceRack', 'name'=>"GS2".$service_type."Retrieve"); 
     
    294399    } elsif ($buildtype eq "mg") { 
    295400    $buildwriter->emptyTag('defaultIndex', 'shortname'=>$defaultindex); 
    296      
    297     } 
     401    } 
     402     
     403    if ((defined $defaultsubcollection) && ($defaultsubcollection ne "")) { 
     404    $buildwriter->emptyTag('defaultIndexSubcollection', 'shortname'=>$defaultsubcollection); 
     405    } 
     406 
    298407    if (defined $indexstem) { 
    299408    $buildwriter->emptyTag('indexStem', 'name'=>$indexstem); 
     
    362471        if ($horizontalAtTop) { 
    363472        $buildwriter->emptyTag('classifier', 'name'=>$name, 'content'=>$content, 'horizontalAtTop'=>'true'); 
     473 
    364474        } else { 
    365475        $buildwriter->emptyTag('classifier', 'name'=>$name, 'content'=>$content); 
     
    367477         
    368478         
    369         $collwriter->startTag('classifier', 'name'=>$name); 
     479       # $collwriter->startTag('classifier', 'name'=>$name); 
     480        $collwriter->startTag('classifier', 'name'=>$classname); 
     481        for (my $i=1; $i<scalar(@$cl); $i++) { 
     482        my $arg =@$cl[$i]; 
     483        if ($arg =~ /^-/){ 
     484            my $option_name=@$cl[$i]; 
     485            my $option_value=@$cl[$i+1]; 
     486            if (defined $option_value){ 
     487            if ($option_value=~ /^-/){ 
     488                $collwriter->startTag('option','name'=>$option_name);  
     489                $collwriter->endTag('option'); 
     490            }else{ 
     491                $collwriter->startTag('option','name'=>$option_name,'value'=>$option_value);  
     492                $collwriter->endTag('option'); 
     493            } 
     494            } 
     495        } 
     496        } 
     497 
    370498        my $vlist = $name."VList"; 
    371499        my $hlist = $name."HList"; 
     
    411539    # do the search service 
    412540    $buildwriter->startTag('serviceRack', 'name'=>'GS2'.$service_type.'Search'); 
    413     $buildwriter->emptyTag('defaultIndex', 'shortname'=>$defaultindex); 
     541    #$buildwriter->emptyTag('defaultIndex', 'shortname'=>$defaultindex); 
    414542    $buildwriter->startTag('indexList'); 
    415543    #for each index 
     
    444572         
    445573    # level info 
    446     $buildwriter->emptyTag('defaultLevel', 'shortname'=>$default_search_level); 
     574    $buildwriter->emptyTag('defaultLevel', 'shortname'=>$default_search_level_shortname); 
    447575    $buildwriter->emptyTag('defaultGDBMLevel', 'shortname'=>$default_retrieve_level); 
    448576    $buildwriter->startTag('levelList'); 
     
    474602    }  
    475603     
    476  
    477      
     604    #indexLanguageList 
     605    my $indexlanguages = $collectcfg->{'languages'}; 
     606    my $firstindexlanguage = 1; 
     607    my $defaultindexlanguage_shortname; 
     608    if (defined $indexlanguages){ 
     609    $buildwriter->startTag('indexLanguageList'); 
     610    my $languages_t = $collectcfg->{'languages'}; 
     611    foreach my $i (@$languages_t){ 
     612        $buildwriter->startTag('indexLanguage','name'=>$i); 
     613         &output_display($buildwriter, 'name', $i, $i); 
     614        $buildwriter->endTag('indexLanguage'); 
     615        if ($firstindexlanguage==1){ 
     616        $defaultindexlanguage_shortname = $i; 
     617        $firstindexlanguage=0; 
     618        } 
     619    } 
     620    $buildwriter->endTag('indexLanguageList'); 
     621    $buildwriter->startTag('defaultIndexLanguage', 'name'=>$defaultindexlanguage_shortname,'shortname'=>$defaultindexlanguage_shortname); 
     622    $buildwriter->endTag('defaultIndexLanguage'); 
     623    } 
     624 
     625  #  my $defaultsubcollection = ""; 
     626   # my @subcollist; 
     627 
     628    if (scalar(@subcollist)>0){ 
     629 
     630    $buildwriter->startTag('indexSubcollectionList'); 
     631    foreach my $i (keys %$subcolmap){ 
     632        my $short_name = $subcolmap->{$i}; 
     633        $buildwriter->emptyTag('indexSubcollection', 'name'=>$i, 'shortname'=>$short_name); 
     634    } 
     635 
     636    $buildwriter->endTag('indexSubcollectionList'); 
     637    $buildwriter->emptyTag('defaultIndexSubcollection', 'shortname'=>$defaultsubcollection); 
     638    } 
     639 
     640    
    478641    $buildwriter->endTag('serviceRack'); 
    479642     
     
    484647    # collection 
    485648    $collwriter->emptyTag('replaceListRef', 'id'=>'gs2-standard'); 
    486     $collwriter->endTag('collectionConfig'); 
     649    $collwriter->endTag('CollectionConfig'); 
    487650    $collwriter->end(); 
    488651    $buildwriter->end(); 
     
    494657 
    495658sub output_metadata { 
    496     my ($writer, $metaname,  $metavalue) = @_; 
    497     $writer->startTag('metadata',  'name'=>$metaname); 
     659    my ($writer, $lang, $metaname,  $metavalue) = @_; 
     660    $lang = 'en' if $lang eq 'default'; 
     661    if ($lang ne ""){ 
     662    $writer->startTag('metadata', 'lang'=>$lang, 'name'=>$metaname); 
     663    }else{ 
     664    $writer->startTag('metadata', 'name'=>$metaname); 
     665    } 
    498666    $writer->characters($metavalue); 
    499667    $writer->endTag('metadata'); 
     
    506674    ($lang) = $lang =~ /\[l=(.*)\]/; 
    507675    } 
     676 
    508677    $writer->startTag('displayItem', 'name'=>$name, 'lang'=>$lang); 
    509678    $writer->characters($value); 
  • greenstone3/branches/customizingGreenstone3/build.properties

    r13615 r15191  
    5050## Mac OS X specific stuff 
    5151# set the path to your GDBM here 
    52 gdbm.installed.path= 
     52#install.gdbm=true 
     53#gdbm.installed.path=${gdbm.home} 
     54 
     55##Flax stuff## 
     56##uncomment if you want to install flax 
     57#install.flax=true 
  • greenstone3/branches/customizingGreenstone3/build.xml

    r15038 r15191  
    11<?xml version="1.0"?> 
    2  
    32<!-- ======================================================================  
    43     March 2005                                                     
    54 
    65     Greenstone3 build and install script 
    7                     
     6                   
    87     kjdon                                                                 
    98     ====================================================================== --> 
    109<project name="greenstone3" default="usage" basedir="."> 
    1110 
    12     <!-- ============ classpath =================== --> 
    13     <path id="project.classpath"> 
    14        <fileset dir="lib/java"> 
    15           <include name="**/*.jar"/> 
    16        </fileset> 
    17     </path> 
    18  
    19     <!-- ============ self defined tasks =================== --> 
    20  
    21     <taskdef name="mysetproxy" classname="org.greenstone.anttasks.MySetProxy" classpath="${basedir}/lib/java/anttasks.jar"/> 
    22     <taskdef name="getuserandpassword" classname="org.greenstone.anttasks.MyGetUserAndPassword" classpath="${basedir}/lib/java/anttasks.jar"/> 
    23     <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/> 
    24     <taskdef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpath="${basedir}/lib/java/anttasks.jar"/> 
    25  
    26 <!-- ===================== Property Definitions =========================== --> 
    27  
    28 <!-- 
     11  <!-- ============ classpath =================== --> 
     12  <path id="project.classpath"> 
     13    <fileset dir="lib/java"> 
     14      <include name="**/*.jar"/> 
     15    </fileset> 
     16  </path> 
     17   
     18  <!-- ============ self defined tasks =================== --> 
     19  <taskdef name="mysetproxy" classname="org.greenstone.anttasks.MySetProxy" classpathref="project.classpath"/> 
     20  <taskdef name="getuserandpassword" classname="org.greenstone.anttasks.MyGetUserAndPassword" classpathref="project.classpath"/> 
     21  <taskdef name="svn" classname="org.tigris.subversion.svnant.SvnTask" classpathref="project.classpath"/> 
     22  <taskdef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/> 
     23  <taskdef name="if" classname="ise.antelope.tasks.IfTask" classpathref="project.classpath"/> 
     24  <taskdef name="try" classname="ise.antelope.tasks.TryTask" classpathref="project.classpath"/> 
     25   
     26  <!-- ===================== Property Definitions =========================== --> 
     27   
     28  <!-- 
    2929 
    3030  Each of the following properties are used in the build script. 
     
    3535 
    3636  * Definitions from a "build.properties" file in the top level 
    37     source directory of this application. 
     37  source directory of this application. 
    3838 
    3939  * Definitions from a "build.properties" file in the user's 
    40     home directory. 
     40  home directory. 
    4141 
    4242  * Default definitions in this build.xml file. 
     
    4848  "build.properties" files as well as in the "build.xml" script. 
    4949 
    50 --> 
    51  
     50  --> 
     51 
     52   
     53  <!--the first two properties have to be put on the top to be used by build.properties--> 
     54  <property name="src.packages.home" value="${basedir}/src/packages"/> 
     55  <property name="gdbm.home" value="${src.packages.home}/gdbm-1.8.3"/> 
    5256  <property file="build.properties"/> 
    5357  <property file="${user.home}/build.properties"/> 
     
    5559  <!-- get properties from the environment --> 
    5660  <property environment="env"/> 
     61 
     62     
     63  <!-- version properties for external packages --> 
     64  <property name="tomcat.version" value="apache-tomcat-5.5.25"/> 
     65  <property name="axis.zip.version" value="axis-bin-1_2_1.zip"/> 
     66  <property name="axis.dir.version" value="axis-1_2_1"/> 
     67  <property name="gdbm.version" value="gdbm-1.8.3"/> 
     68 
    5769  <property name="build.home" value="${basedir}/build"/> 
    5870  <property name="src.home" value="${basedir}/src/java"/> 
    59   <property name="src.packages.home" value="${basedir}/src/packages"/> 
    6071  <property name="packages.home" value="${basedir}/packages"/> 
    6172  <!-- this may be set in build.properties, eg if you move the web dir to  
     
    6879  <!-- other files needed by the servlet go here --> 
    6980  <property name="web.classes" value="${web.home}/WEB-INF/classes"/> 
     81  <!--- flax: the WordNet home --> 
     82  <property name="wn.home" value="${web.home}/WEB-INF/classes/flax/WordNet"/> 
     83 
    7084  <!-- jni libraries and java wrappers go here --> 
    7185  <property name="lib.jni" value="${basedir}/lib/jni"/> 
    72      
     86   
    7387  <property name="javadocs" value="${basedir}/docs/javadoc"/> 
    7488 
     
    7791 
    7892 
    79   <!-- version number stuff --> 
    80  
    81   <!-- app.version defaults to trunk --> 
    82   <condition property="app.version" value="trunk"> 
    83     <not><isset property="app.version"/></not> 
    84   </condition> 
    85  
    86     <!-- determine the 'branch path' --> 
    87   <condition property="branch.path" value="trunk"> 
    88     <equals arg1="${app.version}" arg2="trunk" /> 
    89   </condition> 
    90   <condition property="branch.path" value="branches/${app.version}"> 
    91     <not><equals arg1="${app.version}" arg2="trunk" /></not> 
    92   </condition> 
    93  
    94  
     93  <!-- defaults - set these on the command line or in build.properties or they will take these default values--> 
     94  <property name="app.version" value="trunk"/> 
     95  <property name="branch.path" value="trunk"/> 
     96  <property name="branch.revision" value="HEAD"/> 
     97 
     98  <!--constants --> 
    9599  <property name="flax.svn.root" value="http://svn.greenstone.org/flax"/> 
    96  
    97100  <property name="svn.root" value="http://svn.greenstone.org"/> 
    98 <!--  <property name="cvs.root" value=":pserver:cvs_anon@cvs.scms.waikato.ac.nz:2402/usr/local/global-cvs/gsdl-src"/> --> 
     101 
     102  <!--  <property name="cvs.root" value=":pserver:cvs_anon@cvs.scms.waikato.ac.nz:2402/usr/local/global-cvs/gsdl-src"/> --> 
    99103  <!-- catalina home is set to tomcat basedir is already installed, otherwise 
    100104  use greenstone's tomcat --> 
     
    159163    <isset property="disable.collection.building"/> 
    160164  </condition> 
    161      
     165 
     166  <!-- where is search4j tool --> 
     167  <condition property="search4j.exec" value="bin/search4j.exe">  
     168    <isset property="current.os.iswindows"/> 
     169  </condition> 
     170  <property name="search4j.exec" value="bin/search4j"/> 
     171 
     172   
    162173  <!-- ============= Base dirs for each package and component ============ --> 
    163174  <property name="src.applet.home" value="${src.home}/org/greenstone/applet"/> 
     
    167178  <property name="gli.home" value="${basedir}/gli"/> 
    168179  <property name="javagdbm.home" value="${src.packages.home}/javagdbm"/> 
    169   <property name="gdbm.home" value="${src.packages.home}/gdbm-1.8.3"/> 
    170  
     180   
    171181  <!--<property name="indexers.home" value="${basedir}/src/packages/indexers">--> 
    172182  <condition property="indexers.home" value="${basedir}/src/packages/indexers"> 
     
    184194 
    185195 
    186 <!--  ==================== Compilation Control Options ==================== --> 
    187  
    188 <!-- 
     196  <!--  ==================== Compilation Control Options ==================== --> 
     197 
     198  <!-- 
    189199 
    190200  These properties control option settings on the Javac compiler when it 
     
    197207  compile.optimize     Should compilation include the optimize option? 
    198208 
    199 --> 
     209  --> 
    200210 
    201211  <property name="compile.debug"       value="true"/> 
     
    203213  <property name="compile.optimize"    value="true"/> 
    204214 
    205 <!-- 
     215  <!-- 
    206216 
    207217  Rather than relying on the CLASSPATH environment variable, Ant includes 
     
    212222  that you explicitly added. 
    213223 
    214 --> 
     224  --> 
    215225 
    216226  <path id="compile.classpath"> 
     
    228238    <!-- Include the axis jar files --> 
    229239    <!--<fileset dir="${basedir}/comms/soap/axis/lib"> 
    230       <include name="*.jar"/> 
    231     </fileset>--> 
     240    <include name="*.jar"/> 
     241  </fileset>--> 
    232242     
    233243    <!-- include the jar files from the source packages --> 
     
    265275    <pathelement path="${env.PATH}"/> 
    266276    <pathelement path="${env.Path}"/> 
     277    <pathelement path="${wn.home}/bin"/> 
    267278  </path> 
    268279 
     
    275286    <echo>os.unix: ${os.unix}</echo> 
    276287  </target> 
    277 <!-- ==================== Primary and Global Targets ============================= --> 
     288  <!-- ==================== Primary and Global Targets ============================= --> 
    278289 
    279290  <!-- add comments about using xxx-core, xxx-packages if only want certain parts?? --> 
    280291 
    281   <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections,prepare-gdbm" 
     292  <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections,prepare-gdbm, prepare-flax" 
    282293    description="Use this when you first checkout the code: 'ant prepare install'. This will do some additional subversion checkouts and downloads, so you need to be online to run this."> 
    283 <!--  <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections" 
     294    <!--  <target name="prepare" depends="accept-properties,init,prepare-core,prepare-packages,prepare-gs2building,prepare-tomcat,prepare-axis,prepare-web,prepare-collections" 
    284295    description="Use this when you first checkout the code: 'ant prepare install'. This will do some additional cvs checkouts and downloads, so you need to be online to run this.">--> 
    285296 
     
    293304    description="Install Greenstone 3. Use this when you first checkout the code: 'ant prepare install'."/> 
    294305   
    295 <!--  <target name="cvsupdate" depends="init,cvsupdate-packages,cvsupdate-core,cvsupdate-gs2building,cvsupdate-web" 
    296     description="Do a cvs update for all sources. Doesn't recompile the code. You need to be online to run this."/>--> 
     306  <!--  <target name="cvsupdate" depends="init,cvsupdate-packages,cvsupdate-core,cvsupdate-gs2building,cvsupdate-web" 
     307  description="Do a cvs update for all sources. Doesn't recompile the code. You need to be online to run this."/>--> 
    297308  <target name="svnupdate" depends="init,svnupdate-packages,svnupdate-core,svnupdate-gs2building,svnupdate-web" 
    298309    description="Do a `svn update` for all sources. Doesn't recompile the code. You need to be online to run this."/> 
     
    305316    description="Configure the installation. Includes setting up config files. Should be re-run if you change the build.properties file."/> 
    306317 
    307   <target name="clean" depends="init,clean-gdbm,clean-packages,clean-core,clean-gs2building" 
     318  <target name="clean" depends="init,clean-packages,clean-core,clean-gs2building,clean-gdbm" 
    308319    description="Remove all old compiled code. Includes core, packages and gs2building if necessary"/> 
     320   
     321  <target name="distclean" depends="init,distclean-packages,clean-core,distclean-gs2building,distclean-gdbm" 
     322    description="Remove all compiled code and also any Makefiles etc generated during configure-c++. Includes core, packages, gs2building as necessary"/> 
    309323   
    310324  <target name="compile" depends="init,compile-web,compile-packages,compile-core,compile-gs2building" 
    311325    description="Compile all the source code, includes core, packages and gs2building if necessary. Copy jar files and executables to their correct places."/> 
    312      
     326   
    313327  <target name="update" depends="init,svnupdate,clean,configure,configure-c++,compile"  
    314     description="Update (thru Subversion) all the source (including core, packages and gs2building), then clean, configure and recompile."/> 
     328    description="Update (thru Subversion) all the source (including core, packages and gs2building), then clean, configure and recompile. To do this without any SVN updates, run it like 'ant -Dnosvn.mode=yes update'"/> 
    315329 
    316330  <target name="start" depends="init,start-tomcat" 
    317331    description="Startup the Tomcat server." > 
    318     <echo>${app.name} (${app.version}) server running using Apache Tomcat and Java</echo>  
    319     <echo>Tomcat:   ${catalina.home}</echo>  
    320     <echo>Java: ${java.home}</echo> 
    321         <echo>URL:  http://${tomcat.server}:${tomcat.port}${app.path}/</echo> 
    322         <!-- assuming that index.html is not needed here -->    
     332    <echo>${app.name} (${app.version}) server running using Apache Tomcat and Java</echo>  
     333    <echo>Tomcat:   ${catalina.home}</echo>  
     334    <echo>Java: ${java.home}</echo> 
     335    <echo>URL:  http://${tomcat.server}:${tomcat.port}${app.path}/</echo> 
     336    <!-- assuming that index.html is not needed here -->    
    323337  </target> 
    324338 
     
    329343 
    330344 
    331 <!-- =========== Help targets ===================================  --> 
     345  <!-- =========== Help targets ===================================  --> 
    332346   
    333347  <property name="install-command" value="ant [options] prepare install"/> 
     
    337351    <echo message="  Execute 'ant -help' for Ant help."/> 
    338352    <echo>To install Greenstone3, run '${install-command}'.  
    339 There are properties defined in build.properties. The install process will ask you if these properties are set correctly. To avoid this prompt, use the '-Dproperties.accepted=yes' option. 
    340 To log the output, use the '-logfile build.log' option. 
    341 The README.txt file has more information about the ant targets and install process. 
     353      There are properties defined in build.properties. The install process will ask you if these properties are set correctly. To avoid this prompt, use the '-Dproperties.accepted=yes' option. 
     354      To log the output, use the '-logfile build.log' option. 
     355      The README.txt file has more information about the ant targets and install process. 
    342356    </echo> 
    343357  </target> 
     
    349363  </target> 
    350364 
    351 <!-- ====== initialization and setup targets ================== --> 
     365  <!-- ====== initialization and setup targets ================== --> 
    352366 
    353367  <target name="accept-properties" unless="properties.accepted"> 
    354368    <input addproperty="properties.ok" validargs="y,n">The following properties (among others) are being used from a build.properties file found in this directory: 
    355 tomcat.server=${tomcat.server} 
    356 tomcat.port=${tomcat.port}  
    357 tomcat.installed.path=${tomcat.installed.path} (this is the location of Tomcat's base dir if it is already installed) 
    358 proxy.host=${proxy.host} 
    359 proxy.port=${proxy.port} 
    360 If these are not acceptable, please change them and rerun this target. Continue [y/n]? /> 
     369      tomcat.server=${tomcat.server} 
     370      tomcat.port=${tomcat.port}  
     371      tomcat.installed.path=${tomcat.installed.path} (this is the location of Tomcat's base dir if it is already installed) 
     372      proxy.host=${proxy.host} 
     373      proxy.port=${proxy.port} 
     374      If these are not acceptable, please change them and rerun this target. Continue [y/n]? /> 
    361375    </input> 
    362376    <condition property="do.abort">  
     
    366380  </target> 
    367381 
    368 <!--  <target name="check-cvsroot"> 
    369     <condition property="svnroot.notset"> 
    370       <or> 
    371             <not> 
    372               <isset property="env.CVSROOT"/> 
    373             </not> 
    374             <equals arg1="" arg2="${env.CVSROOT}"/> 
    375       </or> 
    376     </condition> 
    377     <fail if="cvsroot.notset" message="You need to set the CVSROOT variable"/> 
    378   </target> --> 
    379382 
    380383  <!-- this sets up some initial properties --> 
     
    403406    </condition> 
    404407     
    405       <echo>tomcat.port = ${tomcat.port}</echo> 
    406       <echo>gli.present = ${gli.present}</echo>  
    407       <echo>gs2build.present = ${gs2build.present}</echo> 
    408       <echo>gsdl2.installed.path = ${gsdl2.installed.path}</echo> 
    409      <!-- gsdl2.installed.path appears not to be set? --> 
     408    <echo>tomcat.port = ${tomcat.port}</echo> 
     409    <echo>gli.present = ${gli.present}</echo>  
     410    <echo>gs2build.present = ${gs2build.present}</echo> 
     411    <echo>gsdl2.installed.path = ${gsdl2.installed.path}</echo> 
     412    <!-- gsdl2.installed.path appears not to be set? --> 
    410413 
    411414    <condition property="proxy.present"> 
     
    438441    <mysetproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/> 
    439442  </target> 
    440       
    441  <!-- ========== Web app Targets ================================ --> 
     443   
     444  <!-- ========== Web app Targets ================================ --> 
    442445   
    443446  <target name="prepare-web" depends="init,configure-java-version"> 
     
    446449  </target> 
    447450   
    448   <!-- if we are using java 1.5, we need the xalan.jar file in web/WEB-INF/lib,  but if we are using java 1.4, we can't have it there --> 
     451  <!-- if we are using java 1.5+, we need the xalan.jar file in web/WEB-INF/lib,  but if we are using java 1.4, we can't have it there --> 
    449452  <target name="configure-java-version" depends="init" 
    450     description="Run this target if you have changed the default version of java since installing greenstone3"> 
     453    description="Activates or deactivates some jar libraries as needed depending on your java version"> 
     454 
     455    <available property="have.xalan.jar" file="${web.lib}/xalan.jar"/> 
    451456    <condition property="need.xalan.jar"> 
    452       <equals arg1="1.5" arg2="${ant.java.version}"/> 
     457      <or> 
     458    <equals arg1="1.5" arg2="${ant.java.version}"/> 
     459    <equals arg1="1.6" arg2="${ant.java.version}"/> 
     460      </or> 
    453461    </condition> 
    454     <antcall target="activate-xalan-jar"/> 
    455     <antcall target="deactivate-xalan-jar"/> 
    456   </target> 
    457    
    458   <target name="activate-xalan-jar" if="need.xalan.jar"> 
     462 
     463    <!-- if they have xalan.jar but dont need it --> 
     464    <if> 
     465      <bool> 
     466    <and> 
     467      <isset property="have.xalan.jar"/> 
     468      <not><isset property="need.xalan.jar"/></not> 
     469    </and> 
     470      </bool> 
     471      <antcall target="deactivate-xalan-jar"/> 
     472    </if> 
     473 
     474    <!-- if they need xalan.jar but dont have it --> 
     475    <if> 
     476      <bool> 
     477    <and> 
     478      <not><isset property="have.xalan.jar"/></not> 
     479      <isset property="need.xalan.jar"/> 
     480    </and> 
     481      </bool> 
     482      <antcall target="activate-xalan-jar"/> 
     483    </if> 
     484 
     485  </target> 
     486   
     487  <target name="activate-xalan-jar"> 
     488    <echo>activating xalan.jar</echo> 
    459489    <copy file="${web.lib}/xalan.jar.tmp" tofile="${web.lib}/xalan.jar"/> 
    460     <antcall target="copy-xalan-for-mac" /> 
    461   </target> 
    462  
    463   <target name="copy-xalan-for-mac" if="current.os.ismac"> 
    464        <copy file="${web.lib}/xalan.jar.tmp" tofile="${tomcat.installed.path}/common/endorsed/xalan.jar"/>  
    465   </target> 
    466  
    467   <target name="deactivate-xalan-jar" unless="need.xalan.jar"> 
     490    <if><bool><isset property="current.os.ismac"/></bool> 
     491      <copy file="${web.lib}/xalan.jar.tmp" tofile="${catalina.home}/common/endorsed/xalan.jar"/>  
     492    </if> 
     493  </target> 
     494 
     495  <!-- to delete --> 
     496  <target name="copy-xalan-for-mac"></target> 
     497 
     498  <target name="deactivate-xalan-jar"> 
     499    <echo>deactivating xalan.jar</echo> 
    468500    <delete file="${web.lib}/xalan.jar"/> 
    469501  </target> 
    470502 
     503<target name="prepare-collections" depends="init"> 
     504    <property name="collect.dir" value="${web.home}/sites/localsite/collect"/> 
     505<echo message="installing collections..."/> 
     506<antcall target="gs2mgdemo-install"/> 
     507<antcall target="gs2mgppdemo-install"/> 
     508<antcall target="gberg-install"/> 
     509 
     510</target> 
     511 
     512<target name="gs2mgdemo-prepare" if="collect.dir"> 
     513 <property name="gs2mgdemo.dir" value="${collect.dir}/gs2mgdemo"/> 
     514 <property name="gs2mgdemo.import.zip" value="${gs2mgdemo.dir}/import.zip"/> 
     515  <property name="gs2mgdemo.metadata.zip" value="${gs2mgdemo.dir}/metadata.zip"/> 
     516  <property name="gs2mgdemo.index.zip" value="${gs2mgdemo.dir}/index.zip"/> 
     517 
     518<fileset id="gs2mgdemofiles" dir="${gs2mgdemo.dir}"> 
     519    <include name="${gs2mgdemo.import.zip}"/> 
     520    <include name="${gs2mgdemo.metadata.zip}"/> 
     521    <include name="${gs2mgdemo.index.zip}"/> 
     522</fileset> 
     523 
     524<condition property="gs2mgdemo.present"> 
     525    <and> 
     526    <available file="${gs2mgdemo.import.zip}"/> 
     527    <available file="${gs2mgdemo.metadata.zip}"/> 
     528        <available file="${gs2mgdemo.index.zip}"/> 
     529    </and> 
     530  </condition> 
     531</target> 
     532 
     533<target name="gs2mgdemo-install" if="gs2mgdemo.present"  depends="gs2mgdemo-prepare"> 
     534<echo> installing gs2mgdemo</echo> 
     535<unzip dest="${gs2mgdemo.dir}"> 
     536    <fileset refid="gs2mgdemofiles"/> 
     537</unzip> 
     538<delete> 
     539    <fileset refid="gs2mgdemofiles"/> 
     540</delete> 
     541<echo>collection gs2mgdemo installed</echo> 
     542</target> 
     543 
     544<target name="gs2mgppdemo-prepare" if="collect.dir"> 
     545 <property name="gs2mgppdemo.dir" value="${collect.dir}/gs2mgppdemo"/> 
     546 <property name="gs2mgppdemo.import.zip" value="${gs2mgppdemo.dir}/import.zip"/> 
     547  <property name="gs2mgppdemo.metadata.zip" value="${gs2mgppdemo.dir}/metadata.zip"/> 
     548  <property name="gs2mgppdemo.index.zip" value="${gs2mgppdemo.dir}/index.zip"/> 
     549 
     550<fileset id="gs2mgppdemofiles" dir="${gs2mgppdemo.dir}"> 
     551        <include name="${gs2mgppdemo.import.zip}"/> 
     552        <include name="${gs2mgppdemo.metadata.zip}"/> 
     553        <include name="${gs2mgppdemo.index.zip}"/> 
     554</fileset> 
     555 
     556<condition property="gs2mgppdemo.present"> 
     557    <and> 
     558        <available file="${gs2mgppdemo.import.zip}"/> 
     559        <available file="${gs2mgppdemo.metadata.zip}"/> 
     560        <available file="${gs2mgppdemo.index.zip}"/> 
     561    </and> 
     562  </condition> 
     563</target> 
     564 
     565<target name="gs2mgppdemo-install" if="gs2mgppdemo.present" depends="gs2mgppdemo-prepare"> 
     566<unzip dest="${gs2mgppdemo.dir}"> 
     567        <fileset refid="gs2mgppdemofiles"/> 
     568</unzip> 
     569<delete> 
     570        <fileset refid="gs2mgppdemofiles"/> 
     571</delete> 
     572<echo>collection gs2mgppdemo installed</echo> 
     573</target>     
     574 
     575<target name="gberg-prepare" if="collect.dir"> 
     576 <property name="gberg.dir" value="${collect.dir}/gberg"/> 
     577 <property name="gberg.index.zip" value="${gberg.dir}/index.zip"/> 
     578 
     579<fileset id="gbergfiles" dir="${gberg.dir}"> 
     580        <include name="${gberg.index.zip}"/> 
     581</fileset> 
     582<available file="${gberg.index.zip}" property="gberg.present"/> 
     583</target> 
     584 
     585<target name="gberg-install" if="gberg.present" depends="gberg-prepare"> 
     586<unzip dest="${gberg.dir}"> 
     587        <fileset refid="gbergfiles"/> 
     588</unzip> 
     589<delete> 
     590        <fileset refid="gbergfiles"/> 
     591</delete> 
     592<echo>collection gberg installed</echo> 
     593</target> 
     594 
     595 
     596 
     597 
     598 
     599 
     600 
     601 
     602 
     603 
     604 
     605 
     606 
     607 
     608 
     609 
     610 
     611<!-- 
    471612  <target name="prepare-collections" depends="init"> 
    472613    <property name="collect.dir" value="${web.home}/sites/localsite/collect"/> 
    473     <!-- gs2mgdemo --> 
     614    
    474615    <unzip src="${collect.dir}/gs2mgdemo/import.zip"  
    475616      dest="${collect.dir}/gs2mgdemo"/> 
     
    481622    <delete file="${collect.dir}/gs2mgdemo/metadata.zip"/> 
    482623    <delete file="${collect.dir}/gs2mgdemo/index/index.zip"/> 
    483     <!-- gs2mgppdemo --> 
     624    
    484625    <unzip src="${collect.dir}/gs2mgppdemo/import.zip"  
    485626      dest="${collect.dir}/gs2mgppdemo"/> 
     
    491632    <delete file="${collect.dir}/gs2mgppdemo/metadata.zip"/> 
    492633    <delete file="${collect.dir}/gs2mgppdemo/index/index.zip"/> 
    493     <!-- gberg --> 
     634   
    494635    <unzip src="${collect.dir}/gberg/index/index.zip"  
    495636      dest="${collect.dir}/gberg/index"/> 
    496637    <delete file="${collect.dir}/gberg/index/index.zip"/> 
    497638  </target> 
    498  
     639--> 
    499640   
    500641  <target name="configure-web" depends="init" 
     
    526667  </target> 
    527668 
    528     <target name="svnupdate-web" unless="nosvn.mode"> 
    529         <svn> 
    530             <update dir="${web.home}"/> 
    531         </svn> 
    532     </target> 
     669  <target name="svnupdate-web" unless="nosvn.mode"> 
     670    <svn> 
     671      <update dir="${web.home}"/> 
     672    </svn> 
     673  </target> 
    533674 
    534675  <target name="update-web" depends="init,svnupdate-web,configure-web" 
     
    536677 
    537678 
    538 <!-- ======================= Tomcat Targets ========================== --> 
     679  <!-- ======================= Tomcat Targets ========================== --> 
    539680   
    540681  <!-- this target downloads and installs Tomcat --> 
     
    544685    <!-- check that packages dir is there --> 
    545686    <mkdir dir="${packages.home}"/> 
    546     <get src="http://www.greenstone.org/gs3files/apache-tomcat-5.5.25.zip" 
    547       dest="${packages.home}/apache-tomcat-5.5.25.zip" 
     687    <get src="http://www.greenstone.org/gs3files/${tomcat.version}.zip" 
     688      dest="${packages.home}/${tomcat.version}.zip" 
    548689      usetimestamp="true"/> 
    549     <unzip src="${packages.home}/apache-tomcat-5.5.25.zip"  
     690    <unzip src="${packages.home}/${tomcat.version}.zip"  
    550691      dest="${packages.home}"/> 
    551     <get src="http://www.greenstone.org/gs3files/apache-tomcat-5.5.25-compat.zip" 
    552       dest="${packages.home}/apache-tomcat-5.5.25-compat.zip" 
     692    <get src="http://www.greenstone.org/gs3files/${tomcat.version}-compat.zip" 
     693      dest="${packages.home}/${tomcat.version}-compat.zip" 
    553694      usetimestamp="true"/> 
    554     <unzip src="${packages.home}/apache-tomcat-5.5.25-compat.zip"  
     695    <unzip src="${packages.home}/${tomcat.version}-compat.zip"  
    555696      dest="${packages.home}"/> 
    556697    <!-- delete any existing tomcat --> 
    557698    <delete dir="${packages.home}/tomcat"/> 
    558699    <move todir="${packages.home}/tomcat"> 
    559       <fileset dir="${packages.home}/apache-tomcat-5.5.25"/> 
     700      <fileset dir="${packages.home}/${tomcat.version}"/> 
    560701    </move> 
    561702    <copy file="${basedir}/resources/tomcat/setclasspath.bat" 
     
    592733    <!-- need to edit the config file, or do we get the user to do this???--> 
    593734  </target> 
    594      
    595   <target name="start-tomcat" description="Startup only Tomcat" depends="init" if="tomcat.islocal"> 
    596    <property name="tomcat.classpath" refid="local.tomcat.classpath"/> 
     735   
     736  <target name="start-tomcat" description="Startup only Tomcat" depends="init,configure-java-version" if="tomcat.islocal"> 
     737    <property name="tomcat.classpath" refid="local.tomcat.classpath"/> 
    597738    <property name="tomcat.path" refid="local.tomcat.path"/> 
    598739    <property name="catalina.opts" value="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DPATH=$PATH -Xmx400M"/> 
     
    606747      <env key="LD_LIBRARY_PATH" path="${env.LD_LIBRARY_PATH}:${lib.jni}"/> 
    607748      <env key="DYLD_LIBRARY_PATH" path="${env.DYLD_LIBRARY_PATH}:${lib.jni}:${gdbm.installed.path}/lib"/> <!-- for mac os --> 
     749      <env key="WNHOME" path="${wn.home}"/> 
    608750    </exec> 
    609751    <exec executable="${catalina.home}/bin/startup.bat" os="${os.windows}" dir="${catalina.home}/bin" spawn="true"> 
     
    660802 
    661803 
    662 <!-- ======================= ant Targets ============================ -->  
     804  <!-- ======================= ant Targets ============================ -->  
    663805  <target name="prepare-ant" depends="init"> 
    664806    <get src="http://www.greenstone.org/gs3files/apache-ant-1.7.0-bin.zip" 
     
    672814  </target> 
    673815 
    674 <!-- ======================= Axis Targets ============================ -->  
     816  <!-- ======================= Axis Targets ============================ -->  
    675817 
    676818  <target name="prepare-axis" depends="init"> 
    677     <get src="http://www.greenstone.org/gs3files/axis-bin-1_2_1.zip" 
    678       dest="${packages.home}/axis-bin-1_2_1.zip" 
     819    <get src="http://www.greenstone.org/gs3files/${axis.zip.version}" 
     820      dest="${packages.home}/${axis.zip.version}" 
    679821      usetimestamp="true"/> 
    680     <unzip src="${packages.home}/axis-bin-1_2_1.zip" 
     822    <unzip src="${packages.home}/${axis.zip.version}" 
    681823      dest="${packages.home}"/> 
    682824    <move todir="${packages.home}/axis"> 
    683       <fileset dir="${packages.home}/axis-1_2_1"/> 
     825      <fileset dir="${packages.home}/${axis.dir.version}"/> 
    684826    </move> 
    685827    <!-- install axis into greenstone web app --> 
     
    752894      </and> 
    753895    </condition> 
    754    </target>  
     896  </target>  
    755897 
    756898  <target name="create-deployment-files" depends="get-sitename,get-siteuri,check-deployment-files"  
     
    761903      tofile="${basedir}/resources/soap/${axis.sitename}.wsdd" 
    762904      filtering="true"/> 
    763      <copy file="${basedir}/resources/soap/undeploy-site.wsdd.template" 
     905    <copy file="${basedir}/resources/soap/undeploy-site.wsdd.template" 
    764906      tofile="${basedir}/resources/soap/undeploy-${axis.sitename}.wsdd" 
    765907      filtering="true"/> 
     
    780922    <copy file="${build.home}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class" tofile="${web.classes}/org/greenstone/gsdl3/SOAPServer${axis.sitename}.class" /> 
    781923  </target> 
    782      
    783  
    784 <!-- ====================== Core targets ============================== --> 
    785 <!-- core targets refer to the core gsdl3 java src --> 
    786    
    787   <target name="prepare-core" unless="nocvs.mode"> 
     924   
     925 
     926  <!-- ====================== Core targets ============================== --> 
     927  <!-- core targets refer to the core gsdl3 java src --> 
     928   
     929  <target name="prepare-core" unless="nosvn.mode"> 
    788930    <!-- just get rid of empty directories--> 
    789931    <svn> 
    790         <update dir="."/> 
    791     </svn> 
     932      <update dir="."/> 
     933    </svn> 
    792934  </target> 
    793935   
     
    797939    description="Update only the Greenstone core" /> 
    798940   
    799   <target name="svnupdate-core" unless="nocvs.mode"> 
    800  
    801     <svn> 
    802         <update dir="." recurse="false"/> 
    803     </svn> 
    804  
    805    <svn> 
    806         <update dir="bin"/> 
    807         <update dir="comms"/> 
    808         <update dir="dist-resources"/> 
    809         <update dir="docs"/> 
    810         <update dir="lib"/> 
    811         <update dir="resources"/> 
    812         <update dir="src"/> 
    813         <update dir="winutil"/> 
    814     </svn> 
     941  <target name="svnupdate-core" unless="nosvn.mode"> 
     942 
     943    <svn> 
     944      <update dir="." recurse="false"/> 
     945    </svn> 
     946 
     947    <svn> 
     948      <update dir="bin"/> 
     949      <update dir="comms"/> 
     950      <update dir="dist-resources"/> 
     951      <update dir="docs"/> 
     952      <update dir="lib"/> 
     953      <update dir="resources"/> 
     954      <update dir="src"/> 
     955      <update dir="winutil"/> 
     956    </svn> 
    815957 
    816958  </target> 
     
    821963  </target> 
    822964 
    823    <target name="compile-core" depends="init"  
     965  <target name="compile-core" depends="init"  
    824966    description="Compile only the Greenstone core"> 
    825967    <mkdir dir="${build.home}"/> 
     
    855997      </manifest> 
    856998    </jar> 
    857        
     999     
    8581000    <jar destfile="${build.home}/phind.jar"> 
    8591001      <fileset dir="${build.home}"> 
     
    8981040    <copy file="${build.home}/server.jar" todir="${basedir}"/> 
    8991041  </target> 
    900   
    901 <!-- ================== Packages targets ================================ --> 
     1042   
     1043  <!-- ================== Packages targets ================================ --> 
    9021044  <!-- these targets refer to the greenstone source packages - these need  
    9031045  updating less often, so are in  separate targets to the core --> 
    9041046  <target name="prepare-packages" depends="init,prepare-indexers"/> 
    9051047   
    906   <target name="checkout-indexers" depends="init" if="independent-indexers" unless="nocvs.mode"> 
    907 <!--  <target name="checkout-indexers" depends="check-svnroot,init" if="independent-indexers" unless="nocvs.mode"> --> 
     1048  <target name="checkout-indexers" depends="init" if="independent-indexers" unless="nosvn.mode"> 
    9081049    <svn> 
    909         <checkout url="${svn.root}/indexers/${branch.path}" dest="${src.packages.home}/indexers"/> 
    910     </svn> 
     1050      <checkout url="${svn.root}/indexers/${branch.path}" dest="${src.packages.home}/indexers" revision="${branch.revision}"/> 
     1051    </svn> 
    9111052  </target> 
    9121053   
     
    9181059    description="Update only the source packages"/> 
    9191060 
    920   <target name="svnupdate-packages" unless="nocvs.mode">  
    921    <svn> 
    922         <update dir="${src.packages.home}"/> 
    923     </svn> 
    924   </target> 
    925    
    926   <target name="configure-packages" depends="init,configure-gdbm,configure-javagdbm,configure-indexers"  
     1061  <target name="svnupdate-packages" unless="nosvn.mode">  
     1062    <svn> 
     1063      <update dir="${src.packages.home}"/> 
     1064    </svn> 
     1065  </target> 
     1066   
     1067  <target name="configure-packages" depends="init,configure-javagdbm,configure-indexers"  
    9271068    description="Configure only the packages."/> 
    9281069   
     
    9401081      <arg value="--prefix=${basedir}"/> 
    9411082      <arg value="--libdir=${lib.jni}"/> 
    942      <arg value="--with-gdbm=${gdbm.installed.path}"/> 
     1083      <arg value="--with-gdbm=${gdbm.installed.path}"/> 
    9431084    </exec>     
    9441085  </target> 
    9451086 
    946 <!-- Message from oran. I removed the condition from this line becuase it meant 
    947     the indexers would only be configured if collection building was DISabled. 
    948     Shouldn't they be configured when collection building is ENabled? --> 
    949  
    950 <!--    <target name="configure-indexers" depends="init" if="independent-indexers"> --> 
    951 <target name="configure-indexers" depends="init"> 
    952         <echo>Configuring Indexers</echo> 
    953         <exec executable="${indexers.home}/configure" os="${os.unix}" dir="${indexers.home}"> 
    954             <arg value="--prefix=${basedir}"/> 
    955             <arg value="--libdir=${lib.jni}"/> 
    956         </exec>           
    957     </target> 
     1087  <!-- Message from oran. I removed the condition from this line becuase it meant 
     1088  the indexers would only be configured if collection building was DISabled. 
     1089  Shouldn't they be configured when collection building is ENabled? --> 
     1090 
     1091  <!--  <target name="configure-indexers" depends="init" if="independent-indexers"> --> 
     1092  <target name="configure-indexers" depends="init"> 
     1093    <echo>Configuring Indexers</echo> 
     1094    <exec executable="${indexers.home}/configure" os="${os.unix}" dir="${indexers.home}"> 
     1095      <arg value="--prefix=${basedir}"/> 
     1096      <arg value="--libdir=${lib.jni}"/> 
     1097    </exec>           
     1098  </target> 
    9581099 
    9591100  <target name="clean-packages" depends="init,clean-javagdbm,clean-indexers" description="Clean only the packages"/> 
     
    9721113    </exec> 
    9731114    <exec executable="${indexers.home}/winMake.bat" os="${os.windows}" 
    974        dir="${indexers.home}"> 
    975        <arg value="clean"/> 
    976     </exec> 
    977  
    978   </target> 
    979     
    980     <target name="compile-packages" description="Compile only the source packages"> 
    981           
    982                 <!-- gdbm --> 
    983                 <antcall target="compile-gdbm" /> 
    984  
    985         <!-- javagdbm --> 
    986         <echo>compile javagdbm</echo> 
    987         <exec executable="make" os="${os.unix}" dir="${javagdbm.home}"/> 
    988         <exec executable="make" os="${os.unix}" dir="${javagdbm.home}"> 
    989             <arg value="install"/> 
    990         </exec> 
    991  
    992         <!-- windows: just the java stuff. --> 
    993         <echo>Windows: compile javagdbm (java only)</echo> 
    994         <exec executable="${javagdbm.home}/winMake.bat" os="${os.windows}" dir="${javagdbm.home}"> 
    995             <arg value="compile"/> 
    996             <arg value="javaonly"/> 
    997         </exec> 
    998  
    999         <!-- install the jar file --> 
    1000         <echo>Install the javagdbm jar file</echo> 
    1001         <copy file="${javagdbm.home}/javagdbm.jar" todir="${lib.jni}"/> 
    1002  
    1003         <!-- Indexers --> 
    1004  
    1005         <!-- this may be in gs2build - we will be recompiling, but never mind --> 
    1006         <echo>Indexers: make (from ${indexers.home})</echo> 
    1007         <exec executable="make" os="${os.unix}" dir="${indexers.home}"/> 
    1008         <echo>Indexers: make install</echo> 
    1009         <exec executable="make" os="${os.unix}" dir="${indexers.home}"> 
    1010             <arg value="install"/> 
    1011         </exec> 
    1012  
    1013         <echo>Indexers: make</echo> 
    1014         <exec executable="${indexers.home}/winMake.bat" os="${os.windows}" dir="${indexers.home}"> 
    1015             <arg value="all"/> 
    1016         </exec> 
    1017         <echo>Indexers: make install</echo> 
    1018         <exec executable="${indexers.home}/winMake.bat" os="${os.windows}" dir="${indexers.home}"> 
    1019             <arg value="install"/> 
    1020         </exec> 
    1021  
    1022         <!-- install the jar and jni files --> 
    1023         <echo>Install the indexers' jar and jni files</echo> 
    1024         <copy file="${mg.home}/mg.jar" todir="${lib.jni}"/> 
    1025         <copy file="${mgpp.home}/mgpp.jar" todir="${lib.jni}"/> 
    1026         <copy file="${lucene.home}/LuceneWrapper.jar" todir="${web.lib}"/> 
    1027         <antcall target="install-jni-files"/> 
    1028     </target> 
     1115      dir="${indexers.home}"> 
     1116      <arg value="clean"/> 
     1117    </exec> 
     1118 
     1119  </target> 
     1120  <target name="distclean-packages" depends="init,distclean-javagdbm,distclean-indexers" description="Distclean only the packages"/> 
     1121 
     1122  <target name="distclean-javagdbm" depends="init"> 
     1123    <exec executable="make" os="${os.unix}" 
     1124      dir="${javagdbm.home}"> 
     1125      <arg value="distclean"/> 
     1126    </exec> 
     1127  </target> 
     1128   
     1129  <target name="distclean-indexers" depends="init" if="independent-indexers"> 
     1130    <exec executable="make" os="${os.unix}" 
     1131      dir="${indexers.home}"> 
     1132      <arg value="distclean"/> 
     1133    </exec> 
     1134    <exec executable="${indexers.home}/winMake.bat" os="${os.windows}" 
     1135      dir="${indexers.home}"> 
     1136      <arg value="clean"/> 
     1137    </exec> 
     1138 
     1139  </target> 
     1140   
     1141  <target name="compile-packages" description="Compile only the source packages"> 
     1142     
     1143    <!-- javagdbm --> 
     1144    <echo>compile javagdbm</echo> 
     1145    <exec executable="make" os="${os.unix}" dir="${javagdbm.home}"/> 
     1146    <exec executable="make" os="${os.unix}" dir="${javagdbm.home}"> 
     1147      <arg value="install"/> 
     1148    </exec> 
     1149 
     1150    <!-- windows: just the java stuff. --> 
     1151    <echo>Windows: compile javagdbm (java only)</echo> 
     1152    <exec executable="${javagdbm.home}/winMake.bat" os="${os.windows}" dir="${javagdbm.home}"> 
     1153      <arg value="compile"/> 
     1154      <arg value="javaonly"/> 
     1155    </exec> 
     1156 
     1157    <!-- install the jar file --> 
     1158    <echo>Install the javagdbm jar file</echo> 
     1159    <copy file="${javagdbm.home}/javagdbm.jar" todir="${lib.jni}"/> 
     1160 
     1161    <!-- Indexers --> 
     1162 
     1163    <!-- this may be in gs2build - we will be recompiling, but never mind --> 
     1164    <echo>Indexers: make (from ${indexers.home})</echo> 
     1165    <exec executable="make" os="${os.unix}" dir="${indexers.home}"/> 
     1166    <echo>Indexers: make install</echo> 
     1167    <exec executable="make" os="${os.unix}" dir="${indexers.home}"> 
     1168      <arg value="install"/> 
     1169    </exec> 
     1170 
     1171    <echo>Indexers: make</echo> 
     1172    <exec executable="${indexers.home}/winMake.bat" os="${os.windows}" dir="${indexers.home}"> 
     1173      <arg value="all"/> 
     1174    </exec> 
     1175    <echo>Indexers: make install</echo> 
     1176    <exec executable="${indexers.home}/winMake.bat" os="${os.windows}" dir="${indexers.home}"> 
     1177      <arg value="install"/> 
     1178    </exec> 
     1179 
     1180    <!-- install the jar and jni files --> 
     1181    <echo>Install the indexers' jar and jni files</echo> 
     1182    <copy file="${mg.home}/mg.jar" todir="${lib.jni}"/> 
     1183    <copy file="${mgpp.home}/mgpp.jar" todir="${lib.jni}"/> 
     1184    <copy file="${lucene.home}/LuceneWrapper.jar" todir="${web.lib}"/> 
     1185    <antcall target="install-jni-files"/> 
     1186  </target> 
    10291187 
    10301188  <target name="install-jni-files" depends="init,install-jni-files-linux,install-jni-files-windows,install-jni-files-macos"/> 
    10311189 
    1032     <target name="install-jni-files-linux" depends="init" if="current.os.isunixnotmac"> 
     1190  <target name="install-jni-files-linux" depends="init" if="current.os.isunixnotmac"> 
    10331191    <copy file="${mg.home}/jni/libmgretrievejni.so" todir="${lib.jni}"/> 
    10341192    <copy file="${mg.home}/jni/libmgsearchjni.so" todir="${lib.jni}"/> 
    1035      <copy file="${mg.home}/jni/libmgpassjni.so" todir="${lib.jni}"/> 
     1193    <copy file="${mg.home}/jni/libmgpassjni.so" todir="${lib.jni}"/> 
    10361194    <copy file="${mgpp.home}/jni/libmgppretrievejni.so" todir="${lib.jni}"/> 
    10371195    <copy file="${mgpp.home}/jni/libmgppsearchjni.so" todir="${lib.jni}"/> 
    1038      <copy file="${mgpp.home}/jni/libmgpppassjni.so" todir="${lib.jni}"/> 
    1039    </target> 
    1040    <target name="install-jni-files-windows" depends="init" if="current.os.iswindows"> 
     1196    <copy file="${mgpp.home}/jni/libmgpppassjni.so" todir="${lib.jni}"/> 
     1197  </target> 
     1198  <target name="install-jni-files-windows" depends="init" if="current.os.iswindows"> 
    10411199    <copy file="${mg.home}/jni/mgretrievejni.dll" todir="${lib.jni}"/> 
    10421200    <copy file="${mg.home}/jni/mgsearchjni.dll" todir="${lib.jni}"/> 
    1043      <copy file="${mg.home}/jni/mgpassjni.dll" todir="${lib.jni}"/> 
     1201    <copy file="${mg.home}/jni/mgpassjni.dll" todir="${lib.jni}"/> 
    10441202    <copy file="${mgpp.home}/jni/mgppretrievejni.dll" todir="${lib.jni}"/> 
    10451203    <copy file="${mgpp.home}/jni/mgppsearchjni.dll" todir="${lib.jni}"/> 
    1046      <copy file="${mgpp.home}/jni/mgpppassjni.dll" todir="${lib.jni}"/> 
    1047    </target> 
    1048    <target name="install-jni-files-macos" depends="init" if="current.os.ismac"> 
     1204    <copy file="${mgpp.home}/jni/mgpppassjni.dll" todir="${lib.jni}"/> 
     1205  </target> 
     1206  <target name="install-jni-files-macos" depends="init" if="current.os.ismac"> 
    10491207    <copy file="${mg.home}/jni/libmgretrievejni.jnilib" todir="${lib.jni}"/> 
    10501208    <copy file="${mg.home}/jni/libmgsearchjni.jnilib" todir="${lib.jni}"/> 
    1051      <copy file="${mg.home}/jni/libmgpassjni.jnilib" todir="${lib.jni}"/> 
     1209    <copy file="${mg.home}/jni/libmgpassjni.jnilib" todir="${lib.jni}"/> 
    10521210    <copy file="${mgpp.home}/jni/libmgppretrievejni.jnilib" todir="${lib.jni}"/> 
    10531211    <copy file="${mgpp.home}/jni/libmgppsearchjni.jnilib" todir="${lib.jni}"/> 
    1054      <copy file="${mgpp.home}/jni/libmgpppassjni.jnilib" todir="${lib.jni}"/> 
    1055    </target> 
    1056   
     1212    <copy file="${mgpp.home}/jni/libmgpppassjni.jnilib" todir="${lib.jni}"/> 
     1213  </target> 
     1214   
    10571215  <!-- ================== gs2building targets ===============--> 
    10581216 
     
    10621220    description="Update only the Greenstone 2 building components"/> 
    10631221 
    1064   <target name="svnupdate-gs2building" if="collection.building.enabled" depends="init,svnupdate-gs2build,svnupdate-gli" unless="nocvs.mode"> 
    1065   </target> 
    1066   <target name="svnupdate-gs2build" if="collection.building.enabled" depends="init" unless="nocvs.mode"> 
    1067     <!-- Note: can't do a -d update here cos it will get all of gsdl  
    1068      also, an update doesn't get new files, so we do a checkout instead. --> 
    1069         <antcall target="checkout-gs2build"/> 
    1070   </target> 
    1071    
    1072   <target name="svnupdate-gli" if="collection.building.enabled" depends="init" unless="nocvs.mode"> 
     1222  <target name="svnupdate-gs2building" if="collection.building.enabled" depends="init,svnupdate-gs2build,svnupdate-gli" unless="nosvn.mode"> 
     1223  </target> 
     1224 
     1225  <target name="svnupdate-gs2build" if="collection.building.enabled" depends="init" unless="nosvn.mode"> 
     1226    <!-- please keep this function in sync with checkout-gs2build --> 
     1227 
     1228    <echo>updating gs2build</echo> 
     1229    <!-- svn updates --> 
    10731230    <svn> 
    1074         <update dir="${gli.home}"/> 
    1075     </svn> 
     1231      <!-- perllib --> 
     1232      <update dir="gs2build/perllib" revision="${branch.revision}"/> 
     1233 
     1234      <!-- selected packages --> 
     1235      <update dir="gs2build/packages/cpan" revision="${branch.revision}" /> 
     1236      <update dir="gs2build/packages/expat" revision="${branch.revision}" /> 
     1237      <update dir="gs2build/packages/html-tidy" revision="${branch.revision}" /> 
     1238      <update dir="gs2build/packages/isis-gdl" revision="${branch.revision}" /> 
     1239      <update dir="gs2build/packages/kea" revision="${branch.revision}" /> 
     1240      <update dir="gs2build/packages/pdftohtml" revision="${branch.revision}" /> 
     1241      <update dir="gs2build/packages/rtftohtml" revision="${branch.revision}" /> 
     1242      <update dir="gs2build/packages/w3mir" revision="${branch.revision}" /> 
     1243      <update dir="gs2build/packages/wget" revision="${branch.revision}" /> 
     1244      <update dir="gs2build/packages/windows" revision="${branch.revision}" /> 
     1245      <update dir="gs2build/packages/wv" revision="${branch.revision}" /> 
     1246      <update dir="gs2build/packages/xlhtml" revision="${branch.revision}" /> 
     1247      <update dir="gs2build/packages/yaz" revision="${branch.revision}" /> 
     1248       
     1249      <!-- some of src (db2txt hashfile phind txt2db) --> 
     1250      <update dir="gs2build/src/db2txt" revision="${branch.revision}" /> 
     1251      <update dir="gs2build/src/hashfile" revision="${branch.revision}" /> 
     1252      <update dir="gs2build/src/phind" revision="${branch.revision}" /> 
     1253      <update dir="gs2build/src/txt2db" revision="${branch.revision}" /> 
     1254 
     1255      <!-- bin --> 
     1256      <update dir="gs2build/bin/script" revision="${branch.revision}" /> 
     1257 
     1258      <!-- mappings --> 
     1259      <update dir="gs2build/mappings" revision="${branch.revision}"/> 
     1260 
     1261      <!-- etc/packages --> 
     1262      <update dir="gs2build/etc/packages" revision="${branch.revision}"/> 
     1263       
     1264      <!-- collect --> 
     1265      <update dir="gs2build/collect/modelcol" revision="${branch.revision}"/> 
     1266 
     1267      <!-- gs2build-extra --> 
     1268      <update dir="gs2build/gs2build-extra" revision="${branch.revision}"/> 
     1269 
     1270      <!-- indexers --> 
     1271      <update dir="gs2build/indexers" revision="${branch.revision}"/> 
     1272 
     1273      <!-- single files --> 
     1274       
     1275      <!-- some files from lib --> 
     1276      <export srcUrl="${svn.root}/gsdl/${branch.path}/lib/text_t.h" destPath="gs2build/lib/text_t.h"/> 
     1277      <export srcUrl="${svn.root}/gsdl/${branch.path}/lib/text_t.cpp" destPath="gs2build/lib/text_t.cpp"/> 
     1278      <export srcUrl="${svn.root}/gsdl/${branch.path}/lib/gsdlconf.h" destPath="gs2build/lib/gsdlconf.h"/> 
     1279 
     1280      <!-- some files from etc --> 
     1281      <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/marctodc.txt" destPath="gs2build/etc/marctodc.txt"/> 
     1282      <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/dc2marc-mapping.xml" destPath="gs2build/etc/dc2marc-mapping.xml"/> 
     1283      <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/dc2marc.xsl" destPath="gs2build/etc/dc2marc.xsl"/> 
     1284      <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/qdc2marc-mapping.xml" destPath="gs2build/etc/qdc2marc-mapping.xml"/> 
     1285 
     1286      <!-- some files from the gsdl root directory --> 
     1287      <export srcUrl="${svn.root}/gsdl/${branch.path}/setup.bash" destPath="gs2build/setup.bash"/> 
     1288      <export srcUrl="${svn.root}/gsdl/${branch.path}/config.sub" destPath="gs2build/config.sub"/> 
     1289      <export srcUrl="${svn.root}/gsdl/${branch.path}/config.guess" destPath="gs2build/config.guess"/> 
     1290      <export srcUrl="${svn.root}/gsdl/${branch.path}/config.h.in" destPath="gs2build/config.h.in"/> 
     1291      <export srcUrl="${svn.root}/gsdl/${branch.path}/configtest.pl" destPath="gs2build/configtest.pl"/> 
     1292      <export srcUrl="${svn.root}/gsdl/${branch.path}/install-sh" destPath="gs2build/install-sh"/> 
     1293      <export srcUrl="${svn.root}/gsdl/${branch.path}/acconfig.h" destPath="gs2build/acconfig.h"/> 
     1294      <export srcUrl="${svn.root}/gsdl/${branch.path}/aclocal.m4" destPath="gs2build/aclocal.m4"/> 
     1295      <export srcUrl="${svn.root}/gsdl/${branch.path}/WIN32cfg.h" destPath="gs2build/WIN32cfg.h"/> 
     1296    </svn> 
     1297  </target> 
     1298   
     1299  <target name="svnupdate-gli" if="collection.building.enabled" depends="init" unless="nosvn.mode"> 
     1300    <svn> 
     1301      <update dir="${gli.home}" revision="${branch.revision}"/> 
     1302    </svn> 
    10761303  </target> 
    10771304 
    10781305  <target name="prepare-gs2building" depends="init,prepare-gs2build,prepare-gli" if="collection.building.enabled"> 
    10791306  </target> 
    1080  
    1081   <target name="checkout-gs2build" depends="init" if="collection.building.enabled" unless="nocvs.mode"> 
     1307  <target name="checkout-gs2build" depends="init" if="collection.building.enabled" unless="nosvn.mode"> 
     1308    <!-- please keep this function in sync with update-gs2build --> 
    10821309    <echo>checking out gs2build</echo> 
    1083         <!-- svn checkouts --> 
    1084         <svn> 
    1085             <!-- perllib --> 
    1086             <checkout url="${svn.root}/gsdl/${branch.path}/perllib" destPath="gs2build/perllib"/> 
    1087  
    1088             <!-- selected packages --> 
    1089             <checkout url="${svn.root}/gsdl/${branch.path}/packages/cpan" destPath="gs2build/packages/cpan"/> 
    1090             <checkout url="${svn.root}/gsdl/${branch.path}/packages/expat" destPath="gs2build/packages/expat"/> 
    1091             <checkout url="${svn.root}/gsdl/${branch.path}/packages/html-tidy" destPath="gs2build/packages/html-tidy"/> 
    1092             <checkout url="${svn.root}/gsdl/${branch.path}/packages/isis-gdl" destPath="gs2build/packages/isis-gdl"/> 
    1093             <checkout url="${svn.root}/gsdl/${branch.path}/packages/kea" destPath="gs2build/packages/kea"/> 
    1094             <checkout url="${svn.root}/gsdl/${branch.path}/packages/pdftohtml" destPath="gs2build/packages/pdftohtml"/> 
    1095             <checkout url="${svn.root}/gsdl/${branch.path}/packages/rtftohtml" destPath="gs2build/packages/rtftohtml"/> 
    1096             <checkout url="${svn.root}/gsdl/${branch.path}/packages/w3mir" destPath="gs2build/packages/w3mir"/> 
    1097             <checkout url="${svn.root}/gsdl/${branch.path}/packages/wget" destPath="gs2build/packages/wget"/> 
    1098             <checkout url="${svn.root}/gsdl/${branch.path}/packages/windows" destPath="gs2build/packages/windows"/> 
    1099             <checkout url="${svn.root}/gsdl/${branch.path}/packages/wv" destPath="gs2build/packages/wv"/> 
    1100             <checkout url="${svn.root}/gsdl/${branch.path}/packages/xlhtml" destPath="gs2build/packages/xlhtml"/> 
    1101             <checkout url="${svn.root}/gsdl/${branch.path}/packages/yaz" destPath="gs2build/packages/yaz"/> 
    1102              
    1103             <!-- some of src (db2txt hashfile phind txt2db) --> 
    1104             <checkout url="${svn.root}/gsdl/${branch.path}/src/db2txt" destPath="gs2build/src/db2txt"/> 
    1105             <checkout url="${svn.root}/gsdl/${branch.path}/src/hashfile" destPath="gs2build/src/hashfile"/> 
    1106             <checkout url="${svn.root}/gsdl/${branch.path}/src/phind" destPath="gs2build/src/phind"/> 
    1107             <checkout url="${svn.root}/gsdl/${branch.path}/src/txt2db" destPath="gs2build/src/txt2db"/> 
    1108  
    1109             <!-- bin --> 
    1110             <checkout url="${svn.root}/gsdl/${branch.path}/bin/script" destPath="gs2build/bin/script"/> 
    1111  
    1112             <!-- mappings --> 
    1113             <checkout url="${svn.root}/gsdl/${branch.path}/mappings" destPath="gs2build/mappings"/> 
    1114  
    1115             <!-- etc/packages --> 
    1116             <checkout url="${svn.root}/gsdl/${branch.path}/etc/packages" destPath="gs2build/etc/packages"/> 
    1117      
    1118             <!-- collect --> 
    1119             <checkout url="${svn.root}/gsdl/${branch.path}/collect/modelcol" destPath="gs2build/collect/modelcol"/> 
    1120  
    1121             <!-- gs2build-extra --> 
    1122             <checkout url="${svn.root}/other-projects/trunk/gs2build-extra" destPath="gs2build/gs2build-extra"/> 
    1123  
    1124             <!-- indexers --> 
    1125             <checkout url="${svn.root}/indexers/${branch.path}" destPath="gs2build/indexers"/> 
    1126  
    1127  
    1128         </svn> 
    1129         <!-- regular downloads --> 
    1130  
    1131         <!-- some files from lib --> 
    1132         <mkdir dir="gs2build/lib"/> 
    1133         <get src="${svn.root}/gsdl/${branch.path}/lib/text_t.h" dest="gs2build/lib/text_t.h"/> 
    1134         <get src="${svn.root}/gsdl/${branch.path}/lib/text_t.cpp" dest="gs2build/lib/text_t.cpp"/> 
    1135         <get src="${svn.root}/gsdl/${branch.path}/lib/gsdlconf.h" dest="gs2build/lib/gsdlconf.h"/> 
    1136  
    1137         <!-- some files from etc --> 
    1138         <get src="${svn.root}/gsdl/${branch.path}/etc/marctodc.txt" dest="gs2build/etc/marctodc.txt"/> 
    1139         <get src="${svn.root}/gsdl/${branch.path}/etc/dc2marc-mapping.xml" dest="gs2build/etc/dc2marc-mapping.xml"/> 
    1140         <get src="${svn.root}/gsdl/${branch.path}/etc/dc2marc.xsl" dest="gs2build/etc/dc2marc.xsl"/> 
    1141         <get src="${svn.root}/gsdl/${branch.path}/etc/qdc2marc-mapping.xml" dest="gs2build/etc/qdc2marc-mapping.xml"/> 
    1142  
    1143         <!-- some files from the gsdl root directory --> 
    1144         <get src="${svn.root}/gsdl/${branch.path}/setup.bash" dest="gs2build/setup.bash"/> 
    1145         <get src="${svn.root}/gsdl/${branch.path}/config.sub" dest="gs2build/config.sub"/> 
    1146         <get src="${svn.root}/gsdl/${branch.path}/config.guess" dest="gs2build/config.guess"/> 
    1147         <get src="${svn.root}/gsdl/${branch.path}/config.h.in" dest="gs2build/config.h.in"/> 
    1148         <get src="${svn.root}/gsdl/${branch.path}/configtest.pl" dest="gs2build/configtest.pl"/> 
    1149         <get src="${svn.root}/gsdl/${branch.path}/install-sh" dest="gs2build/install-sh"/> 
    1150         <get src="${svn.root}/gsdl/${branch.path}/acconfig.h" dest="gs2build/acconfig.h"/> 
    1151         <get src="${svn.root}/gsdl/${branch.path}/aclocal.m4" dest="gs2build/aclocal.m4"/> 
    1152         <get src="${svn.root}/gsdl/${branch.path}/WIN32cfg.h" dest="gs2build/WIN32cfg.h"/> 
    1153  
    1154     </target> 
     1310 
     1311    <!-- this has to be created first to avoid errors when trying to export to it later --> 
     1312    <mkdir dir="${basedir}/gs2build/lib"/> 
     1313 
     1314    <!-- svn checkouts --> 
     1315    <svn> 
     1316      <!-- perllib --> 
     1317      <checkout url="${svn.root}/gsdl/${branch.path}/perllib" destPath="gs2build/perllib" revision="${branch.revision}"/> 
     1318 
     1319      <!-- selected packages --> 
     1320      <checkout url="${svn.root}/gsdl/${branch.path}/packages/cpan" destPath="gs2build/packages/cpan" revision="${branch.revision}" /> 
     1321      <checkout url="${svn.root}/gsdl/${branch.path}/packages/expat" destPath="gs2build/packages/expat" revision="${branch.revision}" /> 
     1322      <checkout url="${svn.root}/gsdl/${branch.path}/packages/html-tidy" destPath="gs2build/packages/html-tidy" revision="${branch.revision}" /> 
     1323      <checkout url="${svn.root}/gsdl/${branch.path}/packages/isis-gdl" destPath="gs2build/packages/isis-gdl" revision="${branch.revision}" /> 
     1324      <checkout url="${svn.root}/gsdl/${branch.path}/packages/kea" destPath="gs2build/packages/kea" revision="${branch.revision}" /> 
     1325      <checkout url="${svn.root}/gsdl/${branch.path}/packages/pdftohtml" destPath="gs2build/packages/pdftohtml" revision="${branch.revision}" /> 
     1326      <checkout url="${svn.root}/gsdl/${branch.path}/packages/rtftohtml" destPath="gs2build/packages/rtftohtml" revision="${branch.revision}" /> 
     1327      <checkout url="${svn.root}/gsdl/${branch.path}/packages/w3mir" destPath="gs2build/packages/w3mir" revision="${branch.revision}" /> 
     1328      <checkout url="${svn.root}/gsdl/${branch.path}/packages/wget" destPath="gs2build/packages/wget" revision="${branch.revision}" /> 
     1329      <checkout url="${svn.root}/gsdl/${branch.path}/packages/windows" destPath="gs2build/packages/windows" revision="${branch.revision}" /> 
     1330      <checkout url="${svn.root}/gsdl/${branch.path}/packages/wv" destPath="gs2build/packages/wv" revision="${branch.revision}" /> 
     1331      <checkout url="${svn.root}/gsdl/${branch.path}/packages/xlhtml" destPath="gs2build/packages/xlhtml" revision="${branch.revision}" /> 
     1332      <checkout url="${svn.root}/gsdl/${branch.path}/packages/yaz" destPath="gs2build/packages/yaz" revision="${branch.revision}" /> 
     1333       
     1334      <!-- some of src (db2txt hashfile phind txt2db) --> 
     1335      <checkout url="${svn.root}/gsdl/${branch.path}/src/db2txt" destPath="gs2build/src/db2txt" revision="${branch.revision}" /> 
     1336      <checkout url="${svn.root}/gsdl/${branch.path}/src/hashfile" destPath="gs2build/src/hashfile" revision="${branch.revision}" /> 
     1337      <checkout url="${svn.root}/gsdl/${branch.path}/src/phind" destPath="gs2build/src/phind" revision="${branch.revision}" /> 
     1338      <checkout url="${svn.root}/gsdl/${branch.path}/src/txt2db" destPath="gs2build/src/txt2db" revision="${branch.revision}" /> 
     1339 
     1340      <!-- bin --> 
     1341      <checkout url="${svn.root}/gsdl/${branch.path}/bin/script" destPath="gs2build/bin/script" revision="${branch.revision}" /> 
     1342 
     1343      <!-- mappings --> 
     1344      <checkout url="${svn.root}/gsdl/${branch.path}/mappings" destPath="gs2build/mappings" revision="${branch.revision}"/> 
     1345 
     1346      <!-- etc/packages --> 
     1347      <checkout url="${svn.root}/gsdl/${branch.path}/etc/packages" destPath="gs2build/etc/packages" revision="${branch.revision}"/> 
     1348       
     1349      <!-- collect --> 
     1350      <checkout url="${svn.root}/gsdl/${branch.path}/collect/modelcol" destPath="gs2build/collect/modelcol" revision="${branch.revision}"/> 
     1351 
     1352      <!-- gs2build-extra --> 
     1353      <checkout url="${svn.root}/other-projects/trunk/gs2build-extra" destPath="gs2build/gs2build-extra" revision="${branch.revision}"/> 
     1354 
     1355      <!-- indexers --> 
     1356      <checkout url="${svn.root}/indexers/${branch.path}" destPath="gs2build/indexers" revision="${branch.revision}"/> 
     1357 
     1358      <!-- single files --> 
     1359       
     1360      <!-- some files from lib --> 
     1361      <export srcUrl="${svn.root}/gsdl/${branch.path}/lib/text_t.h" destPath="gs2build/lib/text_t.h"/> 
     1362      <export srcUrl="${svn.root}/gsdl/${branch.path}/lib/text_t.cpp" destPath="gs2build/lib/text_t.cpp"/> 
     1363      <export srcUrl="${svn.root}/gsdl/${branch.path}/lib/gsdlconf.h" destPath="gs2build/lib/gsdlconf.h"/> 
     1364 
     1365      <!-- some files from etc --> 
     1366      <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/marctodc.txt" destPath="gs2build/etc/marctodc.txt"/> 
     1367      <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/dc2marc-mapping.xml" destPath="gs2build/etc/dc2marc-mapping.xml"/> 
     1368      <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/dc2marc.xsl" destPath="gs2build/etc/dc2marc.xsl"/> 
     1369      <export srcUrl="${svn.root}/gsdl/${branch.path}/etc/qdc2marc-mapping.xml" destPath="gs2build/etc/qdc2marc-mapping.xml"/> 
     1370 
     1371      <!-- some files from the gsdl root directory --> 
     1372      <export srcUrl="${svn.root}/gsdl/${branch.path}/setup.bash" destPath="gs2build/setup.bash"/> 
     1373      <export srcUrl="${svn.root}/gsdl/${branch.path}/config.sub" destPath="gs2build/config.sub"/> 
     1374      <export srcUrl="${svn.root}/gsdl/${branch.path}/config.guess" destPath="gs2build/config.guess"/> 
     1375      <export srcUrl="${svn.root}/gsdl/${branch.path}/config.h.in" destPath="gs2build/config.h.in"/> 
     1376      <export srcUrl="${svn.root}/gsdl/${branch.path}/configtest.pl" destPath="gs2build/configtest.pl"/> 
     1377      <export srcUrl="${svn.root}/gsdl/${branch.path}/install-sh" destPath="gs2build/install-sh"/> 
     1378      <export srcUrl="${svn.root}/gsdl/${branch.path}/acconfig.h" destPath="gs2build/acconfig.h"/> 
     1379      <export srcUrl="${svn.root}/gsdl/${branch.path}/aclocal.m4" destPath="gs2build/aclocal.m4"/> 
     1380      <export srcUrl="${svn.root}/gsdl/${branch.path}/WIN32cfg.h" destPath="gs2build/WIN32cfg.h"/> 
     1381    </svn> 
     1382  </target> 
    11551383 
    11561384  <target name="prepare-gs2build" depends="init" if="collection.building.enabled" unless="gs2build.present"> 
     
    11651393 
    11661394  <target name="checkout-winbin" depends="init" if="current.os.iswindows"  
    1167     unless="nocvs.mode"> 
     1395    unless="nosvn.mode"> 
    11681396    <svn> 
    1169         <checkout url="${svn.root}/other-projects/trunk/winbin" destPath="${basedir}/winbin"/> 
    1170     </svn>   
    1171   </target> 
    1172  
    1173   <target name="update-winbin" depends="init" if="current.os.iswindows" unless="nocvs.mode"> 
    1174         <svn> 
    1175             <update dir="winbin"/> 
    1176         </svn>   
    1177     </target> 
     1397      <checkout url="${svn.root}/other-projects/trunk/winbin" destPath="${basedir}/winbin" revision="${branch.revision}"/> 
     1398    </svn>   
     1399  </target> 
     1400 
     1401  <target name="update-winbin" depends="init" if="current.os.iswindows" unless="nosvn.mode"> 
     1402    <svn> 
     1403      <update dir="winbin"/> 
     1404    </svn>   
     1405  </target> 
    11781406   
    11791407  <target name="get-windows-binaries" depends="init" if="collection.building.enabled.windows"> 
     
    11881416  <target name="unzip-windows-packages" depends="init" if="collection.building.enabled.windows">   
    11891417    <unzip src="${gs2build.home}/packages/windows/gdbm/gdbm.zip" 
    1190     dest="${gs2build.home}/packages/windows/gdbm"/> 
    1191    <unzip src="${gs2build.home}/packages/windows/crypt/crypt.zip" 
    1192     dest="${gs2build.home}/packages/windows/crypt"/> 
    1193        <unzip src="${gs2build.home}/packages/windows/expat/expat.zip" 
    1194     dest="${gs2build.home}/packages/windows/expat"/> 
    1195    </target> 
     1418      dest="${gs2build.home}/packages/windows/gdbm"/> 
     1419    <unzip src="${gs2build.home}/packages/windows/crypt/crypt.zip" 
     1420      dest="${gs2build.home}/packages/windows/crypt"/> 
     1421    <unzip src="${gs2build.home}/packages/windows/expat/expat.zip" 
     1422      dest="${gs2build.home}/packages/windows/expat"/> 
     1423  </target> 
    11961424   
    11971425  <!-- downloads a good XML-Parser --> 
    11981426  <target name="get-macos-extra" depends="init" if="need.macos.extra">   
    1199       <get src="http://www.greenstone.org/gs3files/XML-Parser.tar.gz" 
     1427    <get src="http://www.greenstone.org/gs3files/XML-Parser.tar.gz" 
    12001428      dest="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz" 
    12011429      usetimestamp="true"/> 
     
    12321460      <filterset> 
    12331461    <filter token="gsdlhome" value="${gs2build.home.windows}"/> 
    1234      </filterset> 
     1462      </filterset> 
    12351463    </move>   
    12361464    <move file="${gs2build.home}/setup-tmp.bat" tofile="${gs2build.home}/setup.bat" /> 
     
    12601488  </target> 
    12611489   
    1262 <!--  <target name="checkout-gli" depends="check-cvsroot,init" if="collection.building.enabled" unless="nocvs.mode"> --> 
    1263   <target name="checkout-gli" depends="init" if="collection.building.enabled" unless="nocvs.mode"> 
     1490  <target name="checkout-gli" depends="init" if="collection.building.enabled" unless="nosvn.mode"> 
    12641491    <echo>checking out gli</echo> 
    12651492    <svn> 
    1266         <checkout url="${svn.root}/gli/${branch.path}" destPath="gli"/> 
    1267     </svn> 
    1268   </target> 
    1269      
     1493      <checkout url="${svn.root}/gli/${branch.path}" destPath="gli" revision="${branch.revision}"/> 
     1494    </svn> 
     1495  </target> 
     1496   
    12701497  <target name="configure-gs2building" depends="init" if="collection.building.enabled" 
    12711498    description="Configure only the Greenstone 2 building components"> 
     
    13061533    <exec executable="${compile.windows.c++.setup}" os="${os.windows}" /> 
    13071534    <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}" > 
    1308      <arg value="/f"/> 
    1309      <arg value="win32.mak"/> 
    1310      <arg value="clean"/> 
    1311     </exec> 
    1312   </target> 
    1313    
     1535      <arg value="/f"/> 
     1536      <arg value="win32.mak"/> 
     1537      <arg value="clean"/> 
     1538    </exec> 
     1539  </target> 
     1540   
     1541  <target name="distclean-gs2building" depends="init,clean-gli,clean-gs2build,distclean-gs2build"  
     1542    description="Distclean only the Greenstone 2 building components"  
     1543    if="collection.building.enabled"/> 
     1544 
    13141545  <target name="distclean-gs2build" depends="init" if="collection.building.enabled"> 
    1315     <!-- gs2build --> 
    1316     <!--linux:  --> 
    13171546    <exec executable="make" os="${os.unix}" dir="${gs2build.home}"> 
    13181547      <arg value="distclean"/> 
    13191548    </exec> 
    1320     <!-- windows: -->     
    13211549  </target> 
    13221550   
     
    13291557    <property name="gli.home" value="${basedir}/gli"/> 
    13301558 
    1331         <!-- change the version number --> 
    1332         <rsr file="${gli.home}/src/org/greenstone/gatherer/Gatherer.java" pattern="^(.*)String\s*PROGRAM_VERSION\s*=\s*&quot;(.*)&quot;" replacement="$1String PROGRAM_VERSION = &quot;${app.version}&quot;"/> 
     1559    <!-- change the version number --> 
     1560    <rsr file="${gli.home}/src/org/greenstone/gatherer/Gatherer.java" pattern="^(.*)String\s*PROGRAM_VERSION\s*=\s*&quot;(.*)&quot;" replacement="$1String PROGRAM_VERSION = &quot;${app.version}&quot;"/> 
    13331561    <!-- linux --> 
    13341562    <exec executable="makegli.sh" os="${os.unix}" dir="${gli.home}" resolveExecutable="true"/> 
    1335      <!--remote gli--> 
    1336      <exec executable="makejar.sh" os="${os.unix}" dir="${gli.home}" 
     1563    <!--remote gli--> 
     1564    <exec executable="makejar.sh" os="${os.unix}" dir="${gli.home}" 
    13371565      resolveExecutable="true"/> 
    13381566    <!-- windows --> 
    13391567    <exec executable="makegli.bat" os="${os.windows}" dir="${gli.home}" resolveExecutable="true"/> 
    13401568    <!--remote gli--> 
    1341      <exec executable="makejar.bat" os="${os.windows}" dir="${gli.home}" 
     1569    <exec executable="makejar.bat" os="${os.windows}" dir="${gli.home}" 
    13421570      resolveExecutable="true"/>  
    1343      <copy file="${gli.home}/GLIServer.jar" todir="${gs2build.home}/bin/java" /> 
     1571    <copy file="${gli.home}/GLIServer.jar" todir="${gs2build.home}/bin/java" /> 
    13441572  </target> 
    13451573   
     
    13551583    <exec executable="${compile.windows.c++.setup}" os="${os.windows}"/> 
    13561584    <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}"> 
    1357      <arg value="/f"/> 
    1358      <arg value="win32.mak"/> 
     1585      <arg value="/f"/> 
     1586      <arg value="win32.mak"/> 
    13591587    </exec> 
    13601588    <exec executable="nmake" dir="${gs2build.home}" os="${os.windows}"> 
    1361      <arg value="/f"/> 
    1362      <arg value="win32.mak"/> 
    1363      <arg value="install"/> 
     1589      <arg value="/f"/> 
     1590      <arg value="win32.mak"/> 
     1591      <arg value="install"/> 
    13641592    </exec> 
    13651593    <!-- LuceneWrapper jar file not installed by default --> 
     
    13951623    </echo> 
    13961624  </target> 
    1397   
    1398  
    1399 <!-- ======================== TESTING Targets ========================= --> 
     1625   
     1626 
     1627  <!-- ======================== TESTING Targets ========================= --> 
    14001628   
    14011629  <target name="test" description="Run the (incomplete) JUnit test suite " 
     
    14201648    <echo> 
    14211649      ********************************************* 
    1422        Test output can be found in directory 'test' 
     1650      Test output can be found in directory 'test' 
    14231651      ********************************************* 
    14241652    </echo> 
    14251653  </target> 
    1426   <target name="checkout-flax" description="check out flax source code from another repository"> 
     1654 
     1655  <!-- ======================== FLAX Targets ========================= --> 
     1656  <target name="prepare-flax" description="check out flax source code from another repository" if="install.flax"> 
    14271657    <echo>checking out flax ...</echo> 
    14281658    <mkdir dir="${basedir}/src/java/org/flax"/> 
    14291659    <mkdir dir="${basedir}/src/java/org/greenstone/gsdl3/flax"/> 
    1430     <mkdir dir="${basedir}/web/WEB-INF/classes/flax"/> 
    1431     <mkdir dir="${basedir}/web/interfaces/flax"/> 
    1432     <mkdir dir="${basedir}/web/sites/flax"/> 
     1660    <mkdir dir="${web.home}/WEB-INF/classes/flax"/> 
     1661    <mkdir dir="${web.home}/interfaces/flax"/> 
     1662    <mkdir dir="${web.home}/sites/flax"/> 
     1663    <mkdir dir="${basedir}/flax-resources"/> 
     1664    <mkdir dir="${basedir}/flax-lib"/> 
    14331665    <svn> 
    14341666      <checkout url="${flax.svn.root}/flax1.0/trunk/src/java/org/flax/"   
    1435                 destPath="${basedir}/src/java/org/flax"/> 
     1667    destPath="${basedir}/src/java/org/flax"/> 
    14361668      <checkout url="${flax.svn.root}/flax1.0/trunk/src/java/org/greenstone/gsdl3/flax/"  
    1437                 destPath="${basedir}/src/java/org/greenstone/gsdl3/flax"/> 
     1669    destPath="${basedir}/src/java/org/greenstone/gsdl3/flax"/> 
    14381670      <checkout url="${flax.svn.root}/flax1.0/trunk/web/WEB-INF/classes/flax/"  
    1439                 destPath="${basedir}/web/WEB-INF/classes/flax"/> 
     1671    destPath="${web.home}/WEB-INF/classes/flax"/> 
    14401672      <checkout url="${flax.svn.root}/flax1.0/trunk/web/interfaces/flax/"  
    1441                 destPath="${basedir}/web/interfaces/flax"/> 
     1673    destPath="${web.home}/interfaces/flax"/> 
    14421674      <checkout url="${flax.svn.root}/flax1.0/trunk/web/sites/flax/"  
    1443                 destPath="${basedir}/web/sites/flax"/> 
     1675    destPath="${web.home}/sites/flax"/> 
    14441676      <checkout url="${flax.svn.root}/flax1.0/trunk/flax-resources" 
    1445                 destPath="${basedir}"/> 
     1677    destPath="${basedir}/flax-resources"/> 
     1678      <checkout url="${flax.svn.root}/flax1.0/trunk/lib" 
     1679    destPath="${basedir}/flax-lib"/> 
    14461680    </svn> 
    1447     <move file="${basedir}/web/WEB-INF/web.xml" tofile="${basedir}/web/WEB-INF/web.xml.greenstone3backup"/> 
    1448     <svncall target="flax-copy-files" /> 
    1449  
    1450     <property name="coll.dir" value="${basedir}/web/sites/flax/collect"/> 
     1681    <echo>prepare flax files...</echo> 
     1682    <move file="${web.home}/WEB-INF/web.xml" tofile="${web.home}/WEB-INF/web.xml.greenstone3backup"/> 
     1683    <antcall target="flax-copy-files" /> 
     1684    <antcall target="unzip-flax-collections" /> 
     1685    <antcall target="unzip-flax-resources" /> 
     1686  </target> 
     1687 
     1688  <target name="update-flax" description="update flax from repository"> 
     1689    <echo>updating flax ...</echo> 
     1690    <svn> 
     1691      <update dir="${basedir}/src/java/org/flax"/> 
     1692      <update dir="${basedir}/src/java/org/greenstone/gsdl3/flax"/> 
     1693      <update dir="${web.home}/WEB-INF/classes/flax"/> 
     1694      <update dir="${web.home}/interfaces/flax"/> 
     1695      <update dir="${web.home}/sites/flax"/> 
     1696    </svn> 
     1697    <antcall target="flax-copy-files" /> 
     1698    <antcall target="unzip-flax-collections" />        
     1699  </target> 
     1700 
     1701  <target name="unzip-flax-collections" > 
     1702    <property name="coll.dir" value="${web.home}/sites/flax/collect"/> 
    14511703    <unzip dest="${coll.dir}">   
    1452        <fileset dir="${coll.dir}"> 
    1453           <include name="*.zip"/> 
    1454        </fileset>     
     1704      <fileset dir="${coll.dir}"> 
     1705    <include name="*.zip"/> 
     1706      </fileset>     
    14551707    </unzip>     
    14561708    <delete> 
    1457      <fileset dir="${coll.dir}" includes="*.zip"/> 
     1709      <fileset dir="${coll.dir}" includes="*.zip"/> 
    14581710    </delete> 
    14591711  </target> 
    1460     <target name="update-flax" description="update flax from repository"> 
    1461       <echo>updating flax ...</echo> 
    1462       <svn> 
    1463         <update dir="${basedir}/src/java/org/flax"/> 
    1464         <update dir="${basedir}/src/java/org/greenstone/gsdl3/flax"/> 
    1465         <update dir="${basedir}/web/WEB-INF/classes/flax"/> 
    1466         <update dir="${basedir}/web/interfaces/flax"/> 
    1467         <update dir="${basedir}/web/sites/flax"/> 
    1468         <svncall target="flax-copy-files" /> 
    1469       </svn> 
    1470     </target> 
    1471     <target name="flax-copy-files" description="copy some flax files into the appropriate greenstone3 directories"> 
    1472       <echo>copying flax files ...</echo> 
    1473       <copy file="${basedir}/web/WEB-INF/classes/flax/web.xml" todir="${basedir}/web/WEB-INF" overwrite="true" /> 
    1474       <!-- A configuration file containing web service binding information for the axis engine --> 
    1475       <copy file="${basedir}/web/WEB-INF/classes/flax/server-config.wsdd" todir="${basedir}/web/WEB-INF" overwrite="true" /> 
    1476     </target> 
    1477       <!--install gdbm stuff --> 
    1478  
    1479   <!-- downloads the gdbm library --> 
    1480   <target name="prepare-gdbm" depends="init" if="install.gdbm">  
    1481       <get src="http://www.greenstone.org/gs3files/gdbm-1.8.3.tar.gz" 
    1482        dest="${src.packages.home}/gdbm-1.8.3.tar.gz"  usetimestamp="true"/> 
    1483       <untar compression= "gzip" src="${src.packages.home}/gdbm-1.8.3.tar.gz" dest="${src.packages.home}" />   
    1484       <chmod dir="${src.packages.home}/gdbm-1.8.3" perm="ugo+wrx" includes="**" /> 
     1712 
     1713  <target name="unzip-flax-resources" > 
     1714    <property name="classes.dir" value="${web.home}/WEB-INF/classes/flax"/> 
     1715    <unzip dest="${classes.dir}">   
     1716      <fileset dir="${classes.dir}"> 
     1717    <include name="*.zip"/> 
     1718      </fileset>     
     1719    </unzip>     
     1720    <delete> 
     1721      <fileset dir="${classes.dir}" includes="*.zip"/> 
     1722    </delete> 
     1723  </target> 
     1724   
     1725  <target name="flax-copy-files" description="copy some flax files into the appropriate greenstone3 directories"> 
     1726    <echo>copying flax files ...</echo> 
     1727    <copy file="${web.home}/WEB-INF/classes/flax/web.xml" todir="${web.home}/WEB-INF" overwrite="true" /> 
     1728    <!-- A configuration file containing web service binding information for the axis engine --> 
     1729    <copy file="${web.home}/WEB-INF/classes/flax/server-config.wsdd" todir="${web.home}/WEB-INF" overwrite="true" /> 
     1730    <copy file="${basedir}/flax-resources/flax-build.xml" todir="${basedir}" overwrite="true" /> 
     1731    <copy file="${basedir}/flax-lib/opennlp-tools-1.3.0.jar" todir="${web.home}/WEB-INF/lib" overwrite="true" />     
     1732  </target> 
     1733 
     1734 
     1735  <!-- ======================== GDBM Targets ========================= --> 
     1736 
     1737  <target name="prepare-gdbm" depends="init" if="install.gdbm"> 
     1738    <get src="http://www.greenstone.org/gs3files/${gdbm.version}.tar.gz" 
     1739      dest="${src.packages.home}/${gdbm.version}.tar.gz"  usetimestamp="true"/> 
     1740    <untar compression= "gzip" src="${src.packages.home}/${gdbm.version}.tar.gz" dest="${src.packages.home}" />   
     1741    <chmod dir="${src.packages.home}/${gdbm.version}" perm="ugo+wrx" includes="**" /> 
     1742    <antcall target="configure-gdbm" /> 
     1743    <antcall target="compile-gdbm" />  
    14851744  </target>   
    14861745 
    1487    <target name="configure-gdbm" if="install.gdbm"> 
     1746  <target name="configure-gdbm" if="install.gdbm"> 
    14881747    <echo> 
    14891748      Configuring GDBM 
     
    14931752      <arg value="--prefix=${gdbm.home}"/> 
    14941753    </exec>     
    1495    </target> 
    1496  
    1497  <target name="clean-gdbm" depends="init"  if="install.gdbm">    
     1754  </target> 
     1755 
     1756  <target name="clean-gdbm" depends="init"  if="install.gdbm">    
    14981757    <echo>clean GDBM</echo> 
    1499     <exec executable="make" os="${os.unix},${os.mac}" dir="${gdbm.home}" > 
    1500      <arg value="clean"/> 
     1758    <exec executable="make" os="${os.unix}" dir="${gdbm.home}" > 
     1759      <arg value="clean"/> 
     1760    </exec> 
     1761  </target>  
     1762 
     1763  <target name="distclean-gdbm" depends="init"  if="install.gdbm">    
     1764    <echo>distclean GDBM</echo> 
     1765    <exec executable="make" os="${os.unix}" dir="${gdbm.home}" > 
     1766      <arg value="distclean"/> 
    15011767    </exec> 
    15021768  </target>  
     
    15041770  <target name="compile-gdbm" depends="init"  if="install.gdbm">    
    15051771    <echo>compile GDBM</echo> 
    1506     <exec executable="make" os="${os.unix},${os.mac}" dir="${gdbm.home}"/> 
    1507     <exec executable="make" os="${os.unix},${os.mac}" dir="${gdbm.home}"> 
     1772    <exec executable="make" os="${os.unix}" dir="${gdbm.home}"/> 
     1773    <exec executable="make" os="${os.unix}" dir="${gdbm.home}"> 
    15081774      <arg value="install"/> 
    15091775    </exec> 
    15101776  </target>  
    15111777 
    1512  
    1513  
    15141778</project> 
    15151779 
  • greenstone3/branches/customizingGreenstone3/dist-resources/convert-build-xml-source.xsl

    r13379 r15191  
    2121  <xsl:template match="target[starts-with(@name, 'rename-gs2build')]"></xsl:template> 
    2222  <xsl:template match="target[@name='test']"></xsl:template> 
    23   <xsl:template match="target[@name='get-macos-extra']"></xsl:template> 
     23  <xsl:template match="target[@name='get-macos-extra']"><target name="get-macos-extra"></target></xsl:template> 
    2424  <xsl:template match="target[@name='get-windows-binaries']"></xsl:template> 
    2525   
  • greenstone3/branches/customizingGreenstone3/dist-resources/convert-build-xml.xsl

    r14588 r15191  
    2424  <xsl:template match="target[starts-with(@name, 'rename-gs2build')]"></xsl:template> 
    2525  <xsl:template match="target[@name='test']"></xsl:template> 
    26   <!--<xsl:template match="target[@name='get-macos-extra']"></xsl:template>--> 
     26  <xsl:template match="target[@name='get-macos-extra']"><target name="get-macos-extra"></target></xsl:template> 
    2727  <xsl:template match="target[@name='get-windows-binaries']"></xsl:template> 
    2828 
  • greenstone3/branches/customizingGreenstone3/docs/manual/manual.tex

    r13954 r15191  
    22972297This will prompt you for the sitename (the site's directory name), and a unique URI for the site. It creates a new SOAPServer class for the site \\(\gst{\$GSDL3SRCHOME/src/java/org/greenstone/gsdl3/SOAPServer<sitename>.java}), creates a resource file for deployment (\gst{\$GSDL3SRCHOME/resources/soap/<sitename>.wsdd}), and then tries to deploy the service. 
    22982298 
    2299 Information about deployed services is maintained between Tomcat sessions---you only need to deploy something once. To undeploy a site, use \gst{ant undeploy-soap-site}. 
     2299Information about deployed services is maintained between Tomcat sessions---you only need to deploy something once. To undeploy a site, use \gst{ant soap-undeploy-site}. 
    23002300 
    23012301The axis services can be accessed at \gst{localhost:8080/greenstone3/index.jsp}. 
  • greenstone3/branches/customizingGreenstone3/gs3-server.bat

    r13931 r15191  
    11@echo off 
    22 
    3 set SERVERLANG=en 
     3echo Greenstone 3 Server 
     4echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato 
     5echo This software comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt 
     6echo This is free software, and you are welcome to redistribute it 
    47 
    5 :: -------- Run the Greenstone 3 Server -------- 
    6  
    7 :: This script must be run from within the directory in which it lives 
    8 if exist gs3-server.bat goto start 
    9     if "%SERVERLANG%" == "en" echo This script must be run from the directory in which it resides. 
    10     if "%SERVERLANG%" == "es" echo Este gui¢n deber  ejecutarse desde el directorio en el que reside. 
    11     if "%SERVERLANG%" == "fr" echo Ce script doit ˆtre ex‚cut‚ 
 partir du r‚pertoire dans lequel il se trouve. 
    12     if "%SERVERLANG%" == "ru" echo â®â áªàš¯â €®«Š¥­ ¡ëâì ¢§ïâ š§ €šà¥ªâ®àšš, ¢ ª®â®à®© ®­ à á¯®«®Š¥­ 
    13     goto exit 
    14  
    15 :start 
    16 if "%OS%" == "Windows_NT" goto findGSDL 
    17     :: Invoke a new command processor to ensure there's enough environment space 
    18     if "%1" == "Second" goto findGSDL 
    19         command /E:2048 /C %0 Second %1 %2 %3 %4 %5 %6 %7 %8 %9 
    20         goto done 
    21  
    22 :findGSDL 
    23 echo. 
    24 if "%SERVERLANG%" == "en" echo Greenstone3 Server 
    25 if "%SERVERLANG%" == "en" echo Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato 
    26 if "%SERVERLANG%" == "en" echo This program comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt 
    27 if "%SERVERLANG%" == "en" echo This is free software, and you are welcome to redistribute it 
    28  
    29 echo. 
    308::  ---- Determine GSDL3HOME ---- 
     9:: Some users may set the above line manually 
    3110set GSDL3PATH= 
    3211 
    33 :: Some users may set the above line manually 
    34  if not "%GSDL3PATH%" == "" goto prepGSDL 
     12:: The default location is the current directory 
     13 if "%GSDL3PATH%" == "" set GSDL3PATH=. 
    3514 
    36  :: The default location is the current directory 
    37  set GSDL3PATH=. 
     15:: Setup Greenstone, unless it has already been done 
     16if "%GSDL3SRCHOME%" == "" call "%GSDL3PATH%\gs3-setup.bat" SetEnv > nul 
    3817 
    39  :: If it is set, use the GSDLHOME environment variable 
    40   if "%GSDL3SRCHOME%" == "" goto prepGSDL 
    41   set GSDL3PATH=%GSDL3SRCHOME% 
    42  
    43 :prepGSDL 
    44 :: Setup Greenstone, unless it has already been done 
    45 if not "%GSDL3SRCHOME%" == "" goto doneGSDL 
    46    call "%GSDL3PATH%\gs3-setup.bat" SetEnv > nul 
    47  
    48 :doneGSDL 
    49 :: GSDL3PATH is no longer needed, since GSDL3SRCHOME should now be set 
    5018set GSDL3PATH= 
    5119 
    52 :findJava 
    53 :: ---- Check Java exists ---- 
    54 set JAVAPATH= 
     20"%RUNJAVA%" -cp "%CLASSPATH%" org.greenstone.server.Server "%GSDL3SRCHOME%" 
    5521 
    56 :: Some users may set the above line manually 
    57 if not "%JAVAPATH%" == "" goto testJava 
    5822 
    59 :: If it is set, use the JAVA_HOME environment variable 
    60  if not "%JAVA_HOME%" == "" goto javahome 
    6123 
    62 :: Check if Java is on the search path 
    63  echo %PATH%| winutil\which.exe java.exe | winutil\setvar.exe JAVAPATH > setjava.bat 
    64  call setjava.bat 
    65  del setjava.bat 
    66  if not "%JAVAPATH%" == "" goto testJava 
    67  
    68     :: Still haven't found anything, so try looking in the registry (gulp!) 
    69     type nul > jdk.reg 
    70     regedit /E jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit" 
    71     type jdk.reg > jdk.txt 
    72     del jdk.reg 
    73     type nul > jre.reg 
    74     regedit /E jre.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment" 
    75     type jre.reg > jre.txt 
    76     del jre.reg 
    77  
    78     winutil\findjava.exe jdk.txt jre.txt | winutil\setvar.exe JAVAPATH > setjava.bat 
    79     del jdk.txt 
    80     del jre.txt 
    81     call setjava.bat 
    82     del setjava.bat 
    83  
    84    :: If nothing was found in the registry, we're stuck 
    85    if "%JAVAPATH%" == "" goto noJava 
    86  
    87    set JAVAPATH=%JAVAPATH%\bin 
    88    goto testJava 
    89  
    90 :javahome 
    91     set JAVAPATH=%JAVA_HOME%\bin 
    92  
    93 :testJava 
    94 :: Check that a Java executable has been found 
    95   if "%SERVERLANG%" == "en" echo Checking Java: %JAVAPATH% 
    96   if "%SERVERLANG%" == "es" echo Revisando Java: %JAVAPATH% 
    97   if "%SERVERLANG%" == "fr" echo V‚rification de Java: %JAVAPATH% 
    98   if "%SERVERLANG%" == "ru" echo à®¢¥àª  Java: %JAVAPATH% 
    99   if exist "%JAVAPATH%\java.exe" goto checkServer 
    100  
    101 :noJava 
    102  echo. 
    103     if "%SERVERLANG%" == "en" echo Failed to locate an appropriate version of Java. You must install a 
    104     if "%SERVERLANG%" == "en" echo Java Runtime Environment (version 1.4 or greater) before running the 
    105     if "%SERVERLANG%" == "en" echo Greenstone3 Server. 
    106     goto exit 
    107  
    108 :checkServer 
    109 ::---- Check that the server program has been compiled ---- 
    110 if exist "server.jar" goto runServer 
    111 if "%SERVERLANG%" == "en" echo "You need to compile the code before running the server" 
    112 goto exit 
    113  
    114 :runServer 
    115 echo Running the Greenstone Server 
    116 :: -Xms32M          To set minimum memory 
    117 :: -Xmx32M          To set maximum memory 
    118 :: -verbose:gc      To set garbage collection messages 
    119 :: -Xincgc          For incremental garbage collection 
    120 :: -Xprof           Function call profiling 
    121 :: -Xloggc:<file>   Write garbage collection log 
    122  
    123 "%JAVAPATH%\java" -cp "%CLASSPATH%" org.greenstone.server.Server "%GSDL3SRCHOME%" 
    124  
    125 :exit 
    126  
    127 :done 
    128 :: ---- Clean up ---- 
    129 set JAVAPATH= 
    13024 
    13125  
  • greenstone3/branches/customizingGreenstone3/gs3-server.sh

    r13499 r15191  
    22serverlang=en 
    33 
    4 echo 
     4java_min_version=1.4.0_00 
     5 
    56echo "Greenstone 3 Server" 
    67echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
    78echo "This software comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt" 
    89echo "This is free software, and you are welcome to redistribute it" 
    9 echo 
    1010 
    1111##  -------- Run the Greenstone 3 Server -------- 
     
    1414thisdir=`pwd` 
    1515if [ ! -f "${thisdir}/gs3-server.sh" ]; then 
    16     if [ "$serverlang" == "es" ]; then 
    17         echo "Este guión deberá ejecutarse desde el directorio en el que reside." 
    18     elif [ "$serverlang" == "fr" ]; then 
    19     echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve." 
    20     elif [ "$serverlang" == "ru" ]; then 
    21     echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ" 
    22     else 
    23     echo "This script must be run from the directory in which it resides." 
    24     fi 
     16    echo "This script must be run from the directory in which it resides." 
    2517    exit 1 
    2618fi 
    27  
    2819 
    2920##  ---- Determine GSDL3SRCHOME ---- 
     
    3122 
    3223# Some users may set the above line manually 
    33 if [ "x$gsdl3path" == "x" ]; then 
    34     # Check the environment variable first 
    35     if [ "x$GSDL3SRCHOME" != "x" ]; then 
    36     gsdl3path=$GSDL3SRCHOME 
    37     else 
    38     gsdl3path=`pwd` 
    39     fi 
     24if [ -z "$gsdl3path" ]; then 
     25   gsdl3path=`pwd`   
    4026fi 
    4127 
    4228# Setup Greenstone3, unless it has already been done 
    43 if [ "x$GSDL3SRCHOME" == "x" ]; then 
    44     pushd $gsdl3path > /dev/null 
    45     source gs3-setup.sh 
    46     popd > /dev/null 
    47 fi 
    48  
    49 ## ---- Check Java exists ---- 
    50 javapath= 
    51  
    52 # Some users may set the above line manually 
    53 if [ "x$javapath" = "x" ]; then 
    54  
    55     # If it is set, use the JAVA_HOME environment variable 
    56     if [ "x$JAVA_HOME" != "x" ]; then 
    57         javapath="$JAVA_HOME/bin/java" 
    58  
    59     # Check if Java is on the search path 
    60     else 
    61         javapath=`which java 2> /dev/null` 
    62     fi 
    63 fi 
    64  
    65 # Check that a Java executable has been found 
    66 if [ "$glilang" = "es" ]; then 
    67     echo "Revisando Java: $javapath" 
    68 elif [ "$glilang" = "fr" ]; then 
    69     echo "V<E9>rification de Java: $javapath" 
    70 elif [ "$glilang" = "ru" ]; then 
    71     echo "<F0><D2><CF><D7><C5><D2><CB><C1> Java: $javapath" 
    72 else 
    73     echo "Checking Java: $javapath" 
    74 fi 
    75 if [ ! -x "$javapath" ]; then 
    76     echo 
    77     echo "Failed to locate an appropriate version of Java. You must installa" 
    78     echo "Java Runtime Environment (version 1.4 or greater) before running the" 
    79     echo "Greenstone Server." 
    80 exit 1 
    81 fi 
    82  
    83 ## -- Check the version of Java is new enough (1.4.0 or higher) to run the Server -- do we need this? 
    84 #`$javapath -classpath . CheckJavaVersion > /dev/null` 
    85 #if [ $? -ne 2 ] ; then 
    86 #   echo "The version of the Java Runtime Environment you have installed is too" 
    87 #   echo "old to run the Greenstone Librarian Interface. Please install a new" 
    88 #   echo "version of the JRE (version 1.4 or newer) and rerun this script." 
    89 #exit 1 
    90 #fi 
    91  
    92 ## ---- Check that the server has been compiled ---- 
    93 if [ ! -f server.jar ]; then 
    94   echo "You need to compile the server before running this script" 
    95   exit 1 
     29if [ -z "$GSDL3SRCHOME" ]; then  
     30  pushd $gsdl3path > /dev/null 
     31  source gs3-setup.sh 
     32  popd > /dev/null 
    9633fi 
    9734 
    9835 
    99 # Other arguments you can provide to java  
    100 # -Xms<number>M    To set minimum memory (by default 32MB) 
    101 # -Xmx<number>M    To set maximum memory (by default the nearest 2^n to the total remaining physical memory) 
    102 # -verbose:gc      To set garbage collection messages 
    103 # -Xincgc          For incremental garbage collection (significantly slows performance) 
    104 # -Xprof           Function call profiling 
    105 # -Xloggc:<file>   Write garbage collection log 
     36# JRE_HOME or JAVA_HOME must be set correctly to run this program 
     37search4j -m $java_min_version &> /dev/null 
     38if [ "$?" == "0" ]; then 
     39    `search4j -m $java_min_version -e` org.greenstone.server.Server $GSDL3SRCHOME  
     40fi 
    10641 
    107 java -cp $CLASSPATH org.greenstone.server.Server $GSDL3SRCHOME  
  • greenstone3/branches/customizingGreenstone3/gs3-setup.bat

    r13932 r15191  
    11@echo off 
     2 
     3set java_min_version=1.4.0_00 
    24 
    35if exist gs3-setup.bat goto start 
     
    79:start 
    810:: ---- Set the GSDL3HOME variable to the current directory ---- 
    9 cd | winutil\setvar.exe GSDL3SRCHOME > setgsdl3.bat 
    10 call setgsdl3.bat 
    11 del setgsdl3.bat 
    12 echo GSDL3SRCHOME: %GSDL3SRCHOME% 
     11cd | winutil\setvar.exe GSDL3SRCHOME > %SystemRoot%\Temp\setgsdl3.bat 
     12call %SystemRoot%\Temp\setgsdl3.bat 
     13del %SystemRoot%\Temp\setgsdl3.bat 
    1314set GSDL3HOME=%GSDL3SRCHOME%\web 
    14 echo GSDL3HOME: %GSDL3HOME% 
    1515 
    1616:: change if using external tomcat 
     
    1919:: ---- Set other important environment variables ---- 
    2020set GSDLOS=windows 
    21 set PATH=%PATH%;%GSDL3SRCHOME%\bin;%GSDL3SRCHOME%\bin\script;%GSDL3SRCHOME%\lib\jni; 
     21set ANT_HOME=%GSDL3SRCHOME%\packages\ant 
     22set PATH=%PATH%;%GSDL3SRCHOME%\bin;%GSDL3SRCHOME%\bin\script;%GSDL3SRCHOME%\lib\jni;%ANT_HOME%\bin 
    2223 
    2324:: ---- Set the CLASSPATH environment variable ---- 
     25if "%GS_CP_SET%" == "yes" goto skipSetCp 
    2426set CLASSPATH=.;%GSDL3HOME%\WEB-INF\classes;%GSDL3SRCHOME%\resources\java;%CLASSPATH% 
    25 if exist setcp.bat del setcp.bat 
    26 for %%j in ("%GSDL3SRCHOME%"\*.jar) do echo set CLASSPATH=%%CLASSPATH%%;%%j>> setcp.bat 
    27 for %%j in ("%GSDL3HOME%"\WEB-INF\lib\*.jar) do echo set CLASSPATH=%%CLASSPATH%%;%%j>> setcp.bat 
    28 for %%j in ("%GSDL3SRCHOME%"\lib\jni\*.jar) do echo set CLASSPATH=%%CLASSPATH%%;%%j>> setcp.bat 
    29 for %%j in ("%TOMCAT_HOME%"\common\endorsed\*.jar) do echo set CLASSPATH=%%CLASSPATH%%;%%j>> setcp.bat 
    30 for %%j in ("%GSDL3SRCHOME%"\build\*.jar) do echo set CLASSPATH=%%CLASSPATH%%;%%j>> setcp.bat 
     27if exist %SystemRoot%\Temp\setcp.bat del %SystemRoot%\Temp\setcp.bat 
     28for %%j in ("%GSDL3SRCHOME%"\*.jar) do echo set CLASSPATH=%%CLASSPATH%%;%%j>> %SystemRoot%\Temp\setcp.bat 
     29for %%j in ("%GSDL3HOME%"\WEB-INF\lib\*.jar) do echo set CLASSPATH=%%CLASSPATH%%;%%j>> %SystemRoot%\Temp\setcp.bat 
     30for %%j in ("%GSDL3SRCHOME%"\lib\jni\*.jar) do echo set CLASSPATH=%%CLASSPATH%%;%%j>> %SystemRoot%\Temp\setcp.bat 
     31for %%j in ("%TOMCAT_HOME%"\common\endorsed\*.jar) do echo set CLASSPATH=%%CLASSPATH%%;%%j>> %SystemRoot%\Temp\setcp.bat 
     32for %%j in ("%GSDL3SRCHOME%"\build\*.jar) do echo set CLASSPATH=%%CLASSPATH%%;%%j>> %SystemRoot%\Temp\setcp.bat 
     33echo set GS_CP_SET=yes >> %SystemRoot%\Temp\setcp.bat 
     34call %SystemRoot%\Temp\setcp.bat 
     35del %SystemRoot%\Temp\setcp.bat 
     36:skipSetCp 
    3137 
    32 call setcp.bat 
    33 del setcp.bat 
     38winutil\search4j.exe -m %java_min_version% | winutil\setvar.exe _JRE_HOME > %SystemRoot%\Temp\set_jre_home.bat 
     39call %SystemRoot%\Temp\set_jre_home.bat 
     40del %SystemRoot%\Temp\set_jre_home.bat 
    3441 
    35 echo CLASSPATH: %CLASSPATH% 
     42echo %_JRE_HOME%\bin\java.exe | winutil\setvar.exe RUNJAVA > %SystemRoot%\Temp\setrunjava.bat 
     43call %SystemRoot%\Temp\setrunjava.bat 
     44del %SystemRoot%\Temp\setrunjava.bat 
    3645 
    37 ::cd %GSDL3HOME% 
     46if "%JRE_HOME%" == "" set JRE_HOME=%_JRE_HOME% 
    3847 
    39 :findJava 
    40 :: ---- Check Java SDK exists ---- 
    41 set JAVAPATH= 
    42  
    43 :: Some users may set the above line manually 
    44 if not "%JAVAPATH%" == "" goto testJava 
    45     
    46 :: If it is set, use the JAVA_HOME environment variable 
    47     if not "%JAVA_HOME%" == "" goto javahome 
    48  
    49     :: Check if Java is on the search path 
    50     echo %PATH%| winutil\which.exe java.exe | winutil\setvar.exe JAVAPATH > setjava.bat 
    51     call setjava.bat 
    52     del setjava.bat 
    53     echo %JAVAPATH% 
    54     if not "%JAVAPATH%" == "" goto testJava 
    55  
    56     :: Still haven't found anything, so try looking in the registry (gulp!) 
    57     type nul > jdk.reg 
    58     regedit /E jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit" 
    59     type jdk.reg > jdk.txt 
    60     del jdk.reg 
    61     type nul > jre.reg 
    62     regedit /E jre.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment" 
    63     type jre.reg > jre.txt 
    64     del jre.reg 
    65  
    66     winutil\findjava.exe jdk.txt jre.txt | winutil\setvar.exe JAVAPATH > setjava.bat 
    67     del jdk.txt 
    68     del jre.txt 
    69     call setjava.bat 
    70     del setjava.bat 
    71  
    72     :: If nothing was found in the registry, we're stuck 
    73     if "%JAVAPATH%" == "" goto noJava 
    74  
    75     set JAVAPATH=%JAVAPATH%\bin 
    76     goto testJava 
    77  
    78 :javahome 
    79     set JAVAPATH=%JAVA_HOME%\bin 
    80  
    81 :testJava 
    82 if exist "%JAVAPATH%\java.exe" goto  exit 
    83  
    84  
    85 :noJava 
    86     echo. 
    87     echo Failed to locate an appropriate version of Java. You must install a 
    88     echo Java Development Kit (version 1.4 or greater) before running the 
    89     echo Greenstone 3 Digital Library Software. 
    90     pause 
    91     goto exit 
    92  
    93 :exit 
    94  
    95  
    96  
     48echo GSDL3SRCHOME : %GSDL3SRCHOME% 
     49echo GSDL3HOME    : %GSDL3HOME% 
     50echo JAVA         : %RUNJAVA% 
  • greenstone3/branches/customizingGreenstone3/gs3-setup.sh

    r13824 r15191  
    22# this should work under ash, bash, zsh, ksh, sh style shells. 
    33 
    4 # make sure we are sourced, and not run 
     4#the purpose of this file is to check/set up the environment for greenstone3 
     5#sorts out 
     6#   - gsdl3home 
     7#   - java 
    58 
    6 if test "$0" != "`echo $0 | sed s/gs3-setup\.sh//`" ; then 
    7 # if $0 contains "gs3-setup.sh" we've been run... $0 is shellname if sourced. 
    8 # One exception is zsh has an option to set it temporarily to the script name 
    9   if test -z "$ZSH_NAME" ; then 
    10   # we aren't using zsh 
    11   gsdl_not_sourced=true 
    12   fi 
    13 fi 
    14  
    15 if test -n "$gsdl_not_sourced" ; then 
    16   echo "    Error: Make sure you source this script, not execute it. Eg:" 
    17   echo "        $ source gs3-setup.sh" 
    18   echo "    or" 
    19   echo "        $ . ./gs3-setup.sh" 
    20   echo "    not" 
    21   echo "        $ ./gs3-setup.sh" 
    22   unset gsdl_not_sourced 
    23   exit 1 
    24 fi 
    25  
    26 if test ! -f gs3-setup.sh ; then 
    27   echo "You must source the script from within the Greenstone home directory" 
    28   exit 1 
    29 fi 
    30  
    31 GSDL3SRCHOME=`pwd` 
    32 GSDL3HOME=$GSDL3SRCHOME/web 
    33 export GSDL3HOME 
    34 export GSDL3SRCHOME 
    35 GSDLOS=`uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 
    36 # check for running bash under cygwin 
    37 if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ; then 
    38     GSDLOS=windows 
    39 fi 
    40 export GSDLOS 
    41  
    42 #change this if external tomcat 
    43 TOMCAT_HOME=$GSDL3SRCHOME/packages/tomcat 
    44  
    45 PATH=$GSDL3SRCHOME/bin/script:$GSDL3SRCHOME/bin:$PATH 
    46 export PATH 
    47 MANPATH=$MANPATH:$GSDL3SRCHOME/doc/man 
    48 export MANPATH 
    49  
    50 CLASSPATH=$GSDL3HOME/WEB-INF/classes:$GSDL3SRCHOME/resources/java:$CLASSPATH 
    51 for JARFILE in $GSDL3SRCHOME/*.jar; do 
    52     CLASSPATH=$CLASSPATH:$JARFILE 
    53 done 
    54 for JARFILE in $GSDL3SRCHOME/lib/jni/*.jar; do 
    55     CLASSPATH=$CLASSPATH:$JARFILE 
    56 done 
    57 for JARFILE in $GSDL3HOME/WEB-INF/lib/*.jar; do 
    58     CLASSPATH=$CLASSPATH:$JARFILE 
    59 done 
    60 for JARFILE in $TOMCAT_HOME/common/endorsed/*.jar; do 
    61     CLASSPATH=$CLASSPATH:$JARFILE 
    62 done     
    63 for JARFILE in $GSDL3SRCHOME/build/*.jar; do 
    64     CLASSPATH=$CLASSPATH:$JARFILE 
    65 done 
    66  
    67 export CLASSPATH 
    68  
    69 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GSDL3SRCHOME/lib/jni 
    70 export LD_LIBRARY_PATH 
    71 ## for mac 
    72 DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GSDL3SRCHOME/lib/jni 
    73 export DYLD_LIBRARY_PATH 
     9java_min_version=1.5.0_00 
    7410 
    7511 
    76 # see if we can find java 
    77 java="java" 
    78 jfound=1 
    79 jok=1 
    80 # if JAVAHOME or JAVA_HOME is set we'll use it to determine where java lives, otherwise 
    81 #  we just hope it's on the search path 
    82 if [ "$JAVA_HOME" != "" ] ; then 
    83     java="$JAVA_HOME/bin/java" 
    84 elif [ "$JAVAHOME" != "" ] ; then 
    85     java="$JAVAHOME/bin/java" 
    86     export JAVA_HOME=$JAVAHOME 
    87 else 
    88     java=`which java 2> /dev/null` 
    89     if [ ! -x "$java" ]; then 
    90     echo "Failed to locate Java. You must install a java runtime environment" 
    91     echo "(version 1.4 or greater) before installing Greenstone 3." 
    92     jfound=0 
    93     jok=0 
    94     else 
    95     export JAVA_HOME=`echo $java | sed -n 's/[\\\/]bin[\\\/]java$//p'` 
    96     fi 
    97 fi 
    98 if [ $jfound -eq 1 ]; then 
    99     javaversion=`$java -version 2>&1 | sed -n 's/^java version \"\(.*\)\"/\1/p'` 
    100     jvmajor=`echo $javaversion | sed -n 's/^\([0-9]*\).*$/\1/p'` 
    101     jvminor=`echo $javaversion | sed -n 's/^[0-9]*\.\([0-9]*\).*$/\1/p'` 
    102      
    103     if [ $jvmajor -lt 1 ] ; then 
    104     jok=0 
    105     fi 
    106     if [ $jvmajor -eq 1 ] && [ $jvminor -lt 4 ] ; then 
    107     jok=0 
    108     fi 
    109 fi 
     12function testSource(){ 
    11013 
    111 if [ $jfound -eq 1 ] && [ $jok -eq 0 ] ; then 
    112     echo "The version of the java runtime environment you have installed is too" 
    113     echo "old to run Greenstone 3. Please install a new version of the JRE (version" 
    114     echo "1.4 or newer) and rerun this installation." 
    115 else 
    116     echo "Your environment has successfully been set up to run Greenstone3" 
    117 fi 
     14  if test "$0" != "`echo $0 | sed s/gs3-setup\.sh//`" ; then 
     15  # if $0 contains "gs3-setup.sh" we've been run... $0 is shellname if sourced. 
     16  # One exception is zsh has an option to set it temporarily to the script name 
     17    if test -z "$ZSH_NAME" ; then 
     18    # we aren't using zsh 
     19     gsdl_not_sourced=true 
     20   fi  
     21  fi 
    11822 
    119 #do we need to check for perl??? 
    120 # make sure perl is ok 
    121 #perl=`which perl 2> /dev/null` 
    122 # echo "perl: $perl" 
    123 #if [ ! -x "$perl" ] ; then 
    124 #    echo "Greenstone 3 requires perl in order to operate but this installation" 
    125 #    echo "could not detect perl on your system. Please ensure that perl is installed" 
    126 #    echo "and is on your search path then rerun this installation script." 
    127 #    exit 1 
    128 #fi 
     23  if test -n "$gsdl_not_sourced" ; then 
     24     echo " Error: Make sure you source this script, not execute it. Eg:" 
     25     echo "     $ source gs3-setup.sh" 
     26     echo " or" 
     27     echo "     $ . gs3-setup.sh" 
     28     echo " not" 
     29     echo "     $ ./gs3-setup.sh" 
     30     unset gsdl_not_sourced 
     31     exit 1 
     32  fi 
     33 
     34  if test ! -f gs3-setup.sh ; then 
     35    echo "You must source the script from within the Greenstone home directory" 
     36    exit 1 
     37  fi 
     38 
     39} 
     40 
     41function setGS3ENV() { 
     42 
     43    echo "Setting up your environment for Greenstone3" 
     44    ## main greenstone environment variables ## 
     45    GSDL3SRCHOME=`pwd` 
     46    GSDL3HOME=$GSDL3SRCHOME/web 
     47    export GSDL3HOME 
     48    export GSDL3SRCHOME 
     49 
     50    GSDLOS=`uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 
     51    # check for running bash under cygwin 
     52    if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ; then 
     53        GSDLOS=windows 
     54    fi  
     55    export GSDLOS 
     56    echo "  - Exported GSDL3HOME, GSDL3SRCHOME and GSDLOS" 
     57 
     58    #change this if external tomcat 
     59    TOMCAT_HOME=$GSDL3SRCHOME/packages/tomcat 
    12960 
    13061 
     62    ## adjustments to users (existing) environment ## 
    13163 
     64    #PATH 
     65    if [ `isinpath "$PATH" "$GSDL3SRCHOME/bin"` == "false" ]; then 
     66        PATH=$GSDL3SRCHOME/bin/script:$GSDL3SRCHOME/bin:$PATH 
     67        export PATH 
     68        MANPATH=$MANPATH:$GSDL3SRCHOME/doc/man 
     69        export MANPATH 
     70        echo "  - Adjusted PATH" 
     71    else 
     72        echo "  - PATH already correct" 
     73    fi 
    13274 
     75    #CLASSPATH 
     76    if [ `isinpath "$CLASSPATH" "$GSDL3HOME/WEB-INF/classes"` == "false" ]; then 
     77        CLASSPATH=$GSDL3HOME/WEB-INF/classes:$GSDL3SRCHOME/resources/java:$CLASSPATH 
     78        for JARFILE in $GSDL3SRCHOME/*.jar; do 
     79            CLASSPATH=$CLASSPATH:$JARFILE 
     80        done 
     81        for JARFILE in $GSDL3SRCHOME/lib/jni/*.jar; do 
     82            CLASSPATH=$CLASSPATH:$JARFILE 
     83        done 
     84        for JARFILE in $GSDL3HOME/WEB-INF/lib/*.jar; do 
     85            CLASSPATH=$CLASSPATH:$JARFILE 
     86        done 
     87        for JARFILE in $TOMCAT_HOME/common/endorsed/*.jar; do 
     88            CLASSPATH=$CLASSPATH:$JARFILE 
     89        done     
     90        for JARFILE in $GSDL3SRCHOME/build/*.jar; do 
     91            CLASSPATH=$CLASSPATH:$JARFILE 
     92        done 
     93        export CLASSPATH 
     94        echo "  - Adjusted CLASSPATH" 
     95    else 
     96        echo "  - CLASSPATH already correct" 
     97    fi 
     98 
     99    #LD_LIBRARY_PATH 
     100    if [ `isinpath "$LD_LIBRARY_PATH" "$GSDL3SRCHOME/lib/jni"` == "false" ]; then 
     101        LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GSDL3SRCHOME/lib/jni 
     102        export LD_LIBRARY_PATH 
     103        DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GSDL3SRCHOME/lib/jni 
     104        export DYLD_LIBRARY_PATH 
     105        echo "  - Adjusted LD_LIBRARY_PATH" 
     106    else 
     107        echo "  - LD_LIBRARY_PATH already correct" 
     108    fi 
     109 
     110    #ant 
     111    which ant &> /dev/null 
     112    if [ "$?" != "0" ]; then 
     113            ANT_HOME=$GSDL3SRCHOME/packages/ant 
     114            PATH=$ANT_HOME/bin:$PATH 
     115        echo "  - Setup ant" 
     116    else 
     117        echo "  - Ant already setup" 
     118    fi 
     119 
     120    echo 
     121} 
     122 
     123function checkJava() { 
     124    echo "Checking Java" 
     125 
     126  bin/search4j -m $java_min_version &> /dev/null 
     127  if [ "$?" != "0" ]; then 
     128 
     129        #java is not set up already 
     130      bin/search4j -m $java_min_version -h packages/jre &> /dev/null 
     131      if [ "$?" == "0" ]; then 
     132            #bundled java exists, set up 
     133            export JAVA_HOME=`pwd`/packages/jre 
     134        echo "  - Exported JAVA_HOME to point to bundled java" 
     135        else 
     136            #no java exists 
     137        echo "  - Failed to locate java ($java_min_version or greater)" 
     138            bin/search4j &> /dev/null; if [ "$?" == "0" ]; then echo "  (It looks like you hava java but it's too old)"; fi 
     139            echo "  - Please set JAVA_HOME or JRE_HOME to point to an appropriate java" 
     140        echo "    And add JAVA_HOME/bin or JRE_HOME/bin to your PATH" 
     141        fi 
     142 
     143    else 
     144 
     145        #java is already set up 
     146        echo "  - Found java at: `bin/search4j -m $java_min_version`" 
     147 
     148  fi 
     149    echo 
     150} 
     151 
     152function pauseAndExit(){ 
     153 echo -n "Please press any key to continue... " 
     154 read  
     155} 
     156 
     157function isinpath() { 
     158    for file in `echo $1 | sed 's/:/ /g'`; do 
     159        if [ "$file" == "$2" ]; then 
     160            echo true 
     161            return 
     162        fi 
     163    done 
     164    echo false 
     165} 
     166 
     167echo 
     168testSource 
     169setGS3ENV 
     170checkJava 
  • greenstone3/branches/customizingGreenstone3/resources/java/global.properties.in

    r13231 r15191  
    11## greenstone home 
    22gsdl3.home=@gsdl3home@ 
    3 gsdl3.version=@gsdl3version@ 
     3gsdl3.version=S20080214 
    44 
    55# tomcat info 
  • greenstone3/branches/customizingGreenstone3/resources/tomcat/setclasspath.bat

    r11288 r15191  
    66 
    77rem Make sure prerequisite environment variables are set 
    8 if not "%JAVA_HOME%" == "" goto gotJavaHome 
    9 echo The JAVA_HOME environment variable is not defined 
    10 echo This environment variable is needed to run this program 
     8if not "%JAVA_HOME%" == "" goto gotJdkHome 
     9if not "%JRE_HOME%" == "" goto gotJreHome 
     10echo Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 
     11echo At least one of these environment variable is needed to run this program 
    1112goto exit 
    12 :gotJavaHome 
     13 
     14:gotJreHome 
     15if not exist "%JRE_HOME%\bin\java.exe" goto noJavaHome 
     16if not exist "%JRE_HOME%\bin\javaw.exe" goto noJavaHome 
     17if not ""%1"" == ""debug"" goto okJavaHome 
     18echo JAVA_HOME should point to a JDK in order to run in debug mode. 
     19goto exit 
     20 
     21:gotJdkHome 
    1322if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome 
    1423if not exist "%JAVA_HOME%\bin\javaw.exe" goto noJavaHome 
    1524if not exist "%JAVA_HOME%\bin\jdb.exe" goto noJavaHome 
    1625if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome 
     26if not "%JRE_HOME%" == "" goto okJavaHome 
     27set JRE_HOME=%JAVA_HOME% 
    1728goto okJavaHome 
     29 
    1830:noJavaHome 
    1931echo The JAVA_HOME environment variable is not defined correctly 
     
    4557rem Note that NT requires a window name argument when using start. 
    4658rem Also note the quoting as JAVA_HOME may contain spaces. 
    47 set _RUNJAVA="%JAVA_HOME%\bin\java" 
    48 set _RUNJAVAW="%JAVA_HOME%\bin\javaw" 
     59set _RUNJAVA="%JRE_HOME%\bin\java" 
     60set _RUNJAVAW="%JRE_HOME%\bin\javaw" 
    4961set _RUNJDB="%JAVA_HOME%\bin\jdb" 
    5062set _RUNJAVAC="%JAVA_HOME%\bin\javac" 
  • greenstone3/branches/customizingGreenstone3/resources/tomcat/setclasspath.sh

    r11288 r15191  
    77 
    88# First clear out the user classpath 
    9 # gs3 - we need to set classpath 
    109CLASSPATH=$CLASSPATH 
    1110 
    1211# Make sure prerequisite environment variables are set 
    1312if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then 
    14   echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is defined" 
    15   echo "At least one of these environment variable is needed to run this program" 
    16   exit 1 
     13  # Bugzilla 37284 
     14  if $darwin && [ -d "/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home" ]; then 
     15    export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home" 
     16  else 
     17    echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is defined" 
     18    echo "At least one of these environment variable is needed to run this program" 
     19    exit 1 
     20  fi 
    1721fi 
    1822if [ -z "$JAVA_HOME" -a "$1" = "debug" ]; then 
  • greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/action/QueryAction.java

    r13270 r15191  
    107107    mr_query_message.appendChild(format_request); 
    108108 
     109    logger.info(GSXML.xmlNodeToString(mr_query_message)); 
     110 
    109111    // do the query 
    110112        Element mr_query_response = (Element)this.mr.process(mr_query_message); 
     
    207209    // check the hits_per_page param - is it a service param?? 
    208210    String hits_pp = (String) service_params.get("hitsPerPage"); 
    209     if (hits_pp != null) { 
    210         // the service is doing the paging, so we want to display all of the returned docs 
    211         return (Element)this.doc.importNode(orig_doc_list, true); 
    212     } 
    213      
    214     hits_pp = (String)params.get("hitsPerPage"); 
     211    if (hits_pp == null) { 
     212        // the service is doing the paging, so we want to display all of the returned docs(???) 
     213    //    return (Element)this.doc.importNode(orig_doc_list, true); 
     214    // try hitsPerPage in the globle param 
     215         hits_pp = (String)params.get("hitsPerPage"); 
     216        } 
     217     
    215218    int hits = 20; 
    216219    if (hits_pp != null && !hits_pp.equals("")) { 
     
    235238    // now we need our own doc list 
    236239    Element result_list = this.doc.createElement(GSXML.DOC_NODE_ELEM + GSXML.LIST_MODIFIER); 
    237     String start_p = (String)params.get("startPage"); 
     240     
     241    String start_p = (String) service_params.get("startPage"); 
     242    if(start_p == null){ 
     243        start_p = (String)params.get("startPage"); 
     244    } 
     245 
    238246    int start = 1; 
    239247    if (start_p != null && !start_p.equals("")) { 
  • greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/core/MessageRouter.java

    r14534 r15191  
    6161 * @see Communicator 
    6262 * 
    63   * Since some service classes are moved into a separate directory in order for them to be checked out from a different repository, 
     63 * Since some service classes are moved into a separate directory in order for them to be checked out from a different repository, 
    6464 * we modify the configureServices method to search some of the classes in other place if they are not found in the service directory. 
    65 */ 
     65 */ 
    6666public class MessageRouter implements  ModuleInterface { 
    6767   
     
    7575  protected String site_http_address=null; 
    7676   
     77   
    7778  protected String library_name = null; 
    7879 
     
    9192  /** list of collections that can be reached */ 
    9293  protected Element collection_list = null; 
    93    
     94  /** list of collections that are loaded but are private */ 
     95  protected Element private_collection_list = null; 
     96     
     97        
    9498  /** list of collections that are public and OAI-supportive */ 
    9599  protected Element oai_collection_list = null; 
     
    117121   
    118122  public void cleanUp() { 
    119     if (this.module_map != null) { 
    120       Iterator i = this.module_map.values().iterator(); 
    121       while (i.hasNext()) { 
    122         ((ModuleInterface)i.next()).cleanUp(); 
    123       } 
    124     } 
     123    cleanUpModuleMapEntire(); 
    125124  } 
    126125   
     
    133132  } 
    134133   
    135  /** site_name must be set before configure is called */ 
     134  /** library_name must be set before configure is called */ 
    136135  public void setLibraryName(String library_name) { 
    137136    this.library_name = library_name; 
     
    150149  public boolean configure() { 
    151150     
    152     logger.info("configuring site"); 
     151    logger.info("configuring the Message Router"); 
    153152     
    154153    if (this.site_name==null) { 
     
    175174          // set up the authenticator 
    176175          Authenticator.setDefault(new Authenticator(){ 
    177             protected PasswordAuthentication getPasswordAuthentication(){ 
    178               return new PasswordAuthentication(user, new String(passwd).toCharArray()); 
    179             } 
    180           }); 
     176          protected PasswordAuthentication getPasswordAuthentication(){ 
     177        return new PasswordAuthentication(user, new String(passwd).toCharArray()); 
     178          } 
     179        }); 
    181180           
    182181        } catch (Exception e) { 
     
    187186    } 
    188187     
    189     // read thru own config file - create services and connect to sites 
    190     File configFile = new File(GSFile.siteConfigFile(this.site_home)); 
    191      
    192     if (!configFile.exists() ) { 
    193       logger.error(" site config file: "+configFile.getPath()+" not found!"); 
    194       return false; 
    195     } 
    196      
    197     Document config_doc = this.converter.getDOM(configFile); 
    198     if (config_doc == null) { 
    199       logger.error(" couldn't parse site config file: "+configFile.getPath()); 
    200       return false; 
    201     } 
    202      
    203     config_info = config_doc.getDocumentElement(); 
    204      
    205188    this.module_map = new HashMap(); 
    206189     
    207     // load up the services: serviceRackList 
    208     Element service_rack_list = (Element)GSXML.getChildByTagName(config_info, GSXML.SERVICE_CLASS_ELEM+GSXML.LIST_MODIFIER); 
    209     configureServices(service_rack_list); 
    210      
    211     // load up the service clusters 
    212     Element cluster_list = (Element)GSXML.getChildByTagName(config_info, GSXML.CLUSTER_ELEM+GSXML.LIST_MODIFIER); 
    213     configureClusters(cluster_list); 
    214      
    215     // load up the collections 
    216     configureCollections(); 
    217      
    218     // load up the external sites - this also adds their services/clusters/collections to the other lists - so must be done last 
    219     Element site_list = (Element)GSXML.getChildByTagName(config_info, GSXML.SITE_ELEM+GSXML.LIST_MODIFIER); 
    220     configureSites(site_list); 
    221      
    222      
    223     return true; 
    224      
     190    // This stuff may be done at a reconfigure also 
     191    return configureLocalSite(); 
     192   
    225193  } 
    226194   
     
    250218  public Element process(Element message) { 
    251219     
    252     logger.debug("MR received request"); 
    253     //logger.info(this.converter.getString(message)); 
    254220    // check that its a correct message tag 
    255221    if (!message.getTagName().equals(GSXML.MESSAGE_ELEM)) { 
     
    288254          // its a messaging request - modifies the requests/responses 
    289255          result = modifyMessages(req, message, mainResult); 
    290         } else if (type_att.equals(OAIXML.OAI_SET_LIST)) { 
    291             logger.info("oaiSetList request received"); 
    292             //this is the oai receptionist asking for a list of oai-support collections 
    293             result = this.doc.createElement(GSXML.RESPONSE_ELEM); 
    294             result.appendChild(oai_collection_list);//getCollectionList(); 
    295256        } else { 
    296257          // standard request 
     
    300261        mainResult.appendChild(this.doc.importNode(result, true)); 
    301262      } else { 
     263    // The message needs to go to another module. The same message can  
     264    // be passed to multiple modules  - they will be in a comma  
     265    // separated list in the 'to' attribute 
    302266        String [] modules = path.split(","); 
    303267         
     
    315279          if (this.module_map.containsKey(obj)) { 
    316280            copied_request.setAttribute(GSXML.TO_ATT, this_mod); 
    317 //            logger.info("::::::::::::::: \n"+this.converter.getString(req)); 
    318281            result = ((ModuleInterface)this.module_map.get(obj)).process(mess); 
    319282            if (result !=null ) { 
     
    345308    return mainResult;     
    346309  } 
    347    
     310  public Element getCollectionList() { 
     311        return collection_list; 
     312  } 
    348313  // ******************************************************************** 
    349   // auxiliary configure methods 
     314  // auxiliary configure and cleanup methods 
    350315  // ******************************************************************* 
    351316   
    352    
     317  /** Calls clean up on all modules referenced in the module_map and  
     318      removes them . */ 
     319  protected void cleanUpModuleMapEntire() { 
     320    if (this.module_map != null) { 
     321      Iterator i = this.module_map.values().iterator(); 
     322      while (i.hasNext()) { 
     323        ((ModuleInterface)i.next()).cleanUp(); 
     324    i.remove(); 
     325      } 
     326    } 
     327  } 
     328 
     329  /** 
     330     Goes through the children of list, and for each local/site-specific 
     331     name attribute, calls cleanUp on the module and removes it from the  
     332     module_map and removes it from the list 
     333  */ 
     334  protected void cleanUpModuleMapSubset(Element list, String remote_site) { 
     335    logger.error(this.converter.getString(list)); 
     336    NodeList elements = list.getChildNodes(); // we are assuming no extraneous nodes 
     337    for(int i=elements.getLength()-1; i>=0; i--) { 
     338      Element item = (Element)elements.item(i); 
     339      String name = item.getAttribute(GSXML.NAME_ATT); 
     340      String potential_site_name = GSPath.getFirstLink(name); 
     341      if (remote_site != null) { 
     342    if (remote_site.equals(potential_site_name)) { 
     343      list.removeChild(item); 
     344    } 
     345      } else { 
     346    if (name.equals(potential_site_name)) {// there was no site 
     347      list.removeChild(item); 
     348      ModuleInterface m = (ModuleInterface)this.module_map.remove(name); 
     349      m.cleanUp(); // clean up any open files/connections etc  
     350      m=null; 
     351    } 
     352      } 
     353    } 
     354             
     355    logger.error(this.converter.getString(list));        
     356         
     357  } 
     358 
     359  /** removes all site modules from module_map, and any stored info about this sites collections and services */ 
     360  protected void cleanUpAllExternalSiteInfo() { 
     361 
     362    NodeList site_nodes = this.site_list.getChildNodes(); 
     363    for(int i=site_nodes.getLength()-1; i>=0; i--) { 
     364      Element item = (Element)site_nodes.item(i); 
     365      String name = item.getAttribute(GSXML.NAME_ATT); 
     366      // will remove the node from site_list 
     367      deactivateModule(GSXML.SITE_ELEM, name);       
     368    } 
     369     
     370  } 
     371  /** read thru own site config file - create services and connect to sites 
     372   */ 
     373  protected boolean configureLocalSite() { 
     374     
     375    // this may be a reconfigure, so clean up the old moduleMap 
     376    cleanUpModuleMapEntire(); 
     377 
     378    File configFile = new File(GSFile.siteConfigFile(this.site_home)); 
     379     
     380    if (!configFile.exists() ) { 
     381      logger.error(" site config file: "+configFile.getPath()+" not found!"); 
     382      return false; 
     383    } 
     384     
     385    Document config_doc = this.converter.getDOM(configFile); 
     386    if (config_doc == null) { 
     387      logger.error(" couldn't parse site config file: "+configFile.getPath()); 
     388      return false; 
     389    } 
     390     
     391    this.config_info = config_doc.getDocumentElement(); 
     392     
     393    // load up the services: serviceRackList 
     394    this.service_list = this.doc.createElement(GSXML.SERVICE_ELEM+GSXML.LIST_MODIFIER); 
     395    Element service_rack_list_elem = (Element)GSXML.getChildByTagName(config_info, GSXML.SERVICE_CLASS_ELEM+GSXML.LIST_MODIFIER); 
     396    configureServices(service_rack_list_elem); 
     397     
     398    // load up the service clusters 
     399    this.cluster_list = this.doc.createElement(GSXML.CLUSTER_ELEM+GSXML.LIST_MODIFIER); 
     400    Element cluster_list_elem = (Element)GSXML.getChildByTagName(config_info, GSXML.CLUSTER_ELEM+GSXML.LIST_MODIFIER); 
     401    configureClusters(cluster_list_elem); 
     402     
     403    // load up the collections 
     404    this.collection_list = this.doc.createElement(GSXML.COLLECTION_ELEM+GSXML.LIST_MODIFIER); 
     405    this.private_collection_list = this.doc.createElement(GSXML.COLLECTION_ELEM+GSXML.LIST_MODIFIER); 
     406    this.oai_collection_list = this.doc.createElement(GSXML.COLLECTION_ELEM+GSXML.LIST_MODIFIER); 
     407    configureCollections(); 
     408     
     409    // load up the external sites - this also adds their services/clusters/collections to the other lists - so must be done last 
     410    this.site_list = this.doc.createElement(GSXML.SITE_ELEM+GSXML.LIST_MODIFIER); 
     411    Element site_list_elem = (Element)GSXML.getChildByTagName(config_info, GSXML.SITE_ELEM+GSXML.LIST_MODIFIER); 
     412    configureExternalSites(site_list_elem); 
     413         
     414    return true; 
     415     
     416  } 
     417 
    353418  protected boolean configureServices(Element service_rack_list) { 
    354419     
    355     this.service_list = this.doc.createElement(GSXML.SERVICE_ELEM+GSXML.LIST_MODIFIER); 
    356420     
    357421    // load up the individual services 
     
    380444      Class service_class = null; 
    381445      try { 
    382           service_class = Class.forName("org.greenstone.gsdl3.service."+service_name); 
     446    service_class = Class.forName("org.greenstone.gsdl3.service."+service_name); 
    383447      } catch(ClassNotFoundException e) { 
    384448           
    385           try { 
    386               //try the service_name alone in case the package name is already specified 
    387               service_class = Class.forName(service_name); 
     449    try { 
     450      //try the service_name alone in case the package name is already specified 
     451      service_class = Class.forName(service_name); 
    388452               
    389           }catch(ClassNotFoundException ae) { 
    390               logger.info(ae.getMessage()); 
    391           } 
     453    }catch(ClassNotFoundException ae) { 
     454      logger.info(ae.getMessage()); 
     455    } 
    392456      } 
    393457      try { 
    394458           
    395         //ServiceRack s = (ServiceRack)Class.forName("org.greenstone.gsdl3.service."+service_name).newInstance(); 
    396459        ServiceRack s = (ServiceRack)service_class.newInstance(); 
    397460    s.setSiteHome(this.site_home); 
     
    400463        s.setMessageRouter(this); 
    401464        // pass the XML node to the service for service configuration 
    402         s.configure(n, null); 
     465        if (!s.configure(n, null)) { 
     466      logger.error ("couldn't configure ServiceRack "+service_name); 
     467      continue; 
     468    } 
    403469         
    404470        // find out the supported services for this service module 
     
    426492  protected boolean configureClusters(Element config_cluster_list) { 
    427493     
    428     this.cluster_list = this.doc.createElement(GSXML.CLUSTER_ELEM+GSXML.LIST_MODIFIER); 
    429494    // load up the service clusters 
    430495    logger.info("loading service clusters ..."); 
     
    448513      sc.setClusterName(name); 
    449514      sc.setMessageRouter(this); 
    450       sc.configure(cluster); 
     515      if (!sc.configure(cluster)) { 
     516    logger.error ("couldn't configure ServiceCluster "+name); 
     517    continue; 
     518      } 
     519 
    451520      this.module_map.put(name, sc); // this replaces the old one if there was one already present 
    452521      //add short info to cluster list 
     
    459528  } 
    460529   
     530  /** looks through the collect directory and activates any collections it finds. If this is a reconfigure, clean up must be done first before calling this */ 
    461531  protected boolean configureCollections() { 
    462      
    463     this.collection_list = this.doc.createElement(GSXML.COLLECTION_ELEM+GSXML.LIST_MODIFIER); 
    464     this.oai_collection_list = this.doc.createElement(GSXML.COLLECTION_ELEM+GSXML.LIST_MODIFIER); 
    465532     
    466533    // read thru the collect directory and activate all the valid collections 
     
    482549  } 
    483550   
    484   protected boolean configureSites(Element config_site_list) { 
    485      
    486     this.site_list = this.doc.createElement(GSXML.SITE_ELEM+GSXML.LIST_MODIFIER); 
     551  /** creates and configures a new collection 
     552      if this is done for a reconfigure, the collection should be deactivated first. 
     553      * 
     554      *@param col_name the name of the collection 
     555      *@return true if collection created ok 
     556      */ 
     557  protected boolean activateCollectionByName(String col_name) { 
     558     
     559    logger.info("Activating collection: "+col_name+"."); 
     560     
     561    // Look for the etc/collectionInit.xml file, and see what sort of Collection to load 
     562    Collection c = null; 
     563    File init_file = new File(GSFile.collectionInitFile(this.site_home, col_name)); 
     564     
     565    if (init_file.exists()) { 
     566      Document init_doc = this.converter.getDOM(init_file); 
     567      if (init_doc != null) { 
     568        Element init_elem = init_doc.getDocumentElement(); 
     569        if (init_elem != null) { 
     570          String coll_class_name = init_elem.getAttribute("class"); 
     571          if (!coll_class_name.equals("")) { 
     572            try { 
     573              c = (Collection)Class.forName("org.greenstone.gsdl3.collection."+coll_class_name).newInstance(); 
     574            } catch (Exception e) { 
     575              logger.info(" couldn't create a new collection, type "+coll_class_name+", defaulting to class Collection"); 
     576            } 
     577          } 
     578        } 
     579      } 
     580    } 
     581    if (c==null) { // we haven't found another classname to use 
     582      c = new Collection(); 
     583    } 
     584     
     585    c.setCollectionName(col_name); 
     586    c.setSiteHome(this.site_home); 
     587    c.setSiteAddress(this.site_http_address); 
     588    c.setMessageRouter(this); 
     589    if (c.configure()) { 
     590      logger.info("have just configured collection " + col_name); 
     591      // add to list of collections 
     592      this.module_map.put(col_name, c); 
     593      Element e = this.doc.createElement(GSXML.COLLECTION_ELEM); 
     594      e.setAttribute(GSXML.NAME_ATT, col_name); 
     595       
     596      if(c.isPublic()) { 
     597        // only public collections will appear on the home page 
     598        // add short description_ to collection_list_ 
     599    this.collection_list.appendChild(e); 
     600     
     601        if (c.hasOAI()) { 
     602          Element ane = this.doc.createElement(GSXML.COLLECTION_ELEM); 
     603          //The collection name is returned as site_name:coll_name, which is in fact the set specification 
     604          ane.setAttribute(GSXML.NAME_ATT, site_name + ":" + col_name); 
     605          ane.setAttribute(OAIXML.LASTMODIFIED, "" + c.getLastmodified()); 
     606           
     607          this.oai_collection_list.appendChild(ane); 
     608          //logger.info(GSXML.xmlNodeToString(oai_collection_list)); 
     609        }       
     610         
     611      } else { 
     612    this.private_collection_list.appendChild(e); 
     613      } 
     614      return true; 
     615    } else { 
     616      logger.error("Couldn't configure collection: "+ 
     617           col_name+"."); 
     618      return false; 
     619    } 
     620  } 
     621   
     622 
     623  /** Goes through the siteList and activates each site found. If this is done for a reconfigure, a clean up must be done first ****HOW??? */ 
     624  protected boolean configureExternalSites(Element config_site_list) { 
     625     
    487626    // load up the sites 
    488627    logger.info("loading external sites..."); 
     
    511650  } 
    512651   
     652  protected boolean activateSiteByName(String site_name) { 
     653    logger.info("Activating site: "+site_name+"."); 
     654     
     655    File configFile = new File(GSFile.siteConfigFile(this.site_home)); 
     656     
     657    if (!configFile.exists() ) { 
     658      logger.error(" site config file: "+configFile.getPath()+" not found!"); 
     659      return false; 
     660    } 
     661    Document config_doc = this.converter.getDOM(configFile); 
     662    if (config_doc == null) { 
     663      logger.error(" couldn't parse site config file: "+configFile.getPath()); 
     664      return false; 
     665    } 
     666    Element config_elem = config_doc.getDocumentElement(); 
     667     
     668    Element config_site_list = (Element)GSXML.getChildByTagName(config_elem, GSXML.SITE_ELEM+GSXML.LIST_MODIFIER); 
     669    if (config_site_list ==null ) { 
     670      logger.error("activateSite, no sites found"); 
     671      return false; 
     672    } 
     673    // this is a name to identify the current site in the Communicator 
     674    String local_site_name = config_site_list.getAttribute("localSiteName"); 
     675    if (local_site_name.equals("")) { 
     676      local_site_name = site_name; 
     677    } 
     678     
     679    Element this_site_elem = GSXML.getNamedElement(config_site_list, GSXML.SITE_ELEM, GSXML.NAME_ATT, site_name); 
     680    if (this_site_elem == null) { 
     681      logger.error("activateSite, site "+site_name+" not found"); 
     682      return false; 
     683    } 
     684     
     685    return activateSite(this_site_elem, local_site_name); 
     686  } 
     687 
    513688  protected boolean activateSite(Element site_elem, String local_site_name) { 
     689     
    514690    Communicator comm=null; 
    515691    String type = site_elem.getAttribute(GSXML.TYPE_ATT); 
    516692    String name = site_elem.getAttribute(GSXML.NAME_ATT); 
    517693    if (type.equals(GSXML.COMM_TYPE_SOAP_JAVA)) { 
     694      logger.info("activating SOAP site "+name); 
    518695      comm = new SOAPCommunicator(); 
    519696      if (comm.configure(site_elem)) { 
     
    527704        // have to be added later 
    528705        if (!getRemoteSiteInfo(comm, name)) { 
    529           logger.error(" couldn't get info from site "+name); 
     706          logger.error(" couldn't get info from site"); 
    530707        } 
    531708      } else { 
    532         logger.error(" couldn't configure soap site:"+name); 
     709        logger.error(" couldn't configure site"); 
    533710        return false; 
    534711      } 
     
    599776   
    600777   
     778   
     779  protected boolean activateServiceClusterByName(String cluster_name) { 
     780    return false; 
     781     
     782  } 
     783   
     784  protected boolean activateServiceRackByName(String module_name) { 
     785    return false; 
     786  } 
     787   
     788  protected boolean deactivateModule(String type, String name) { 
     789     
     790    logger.info("deactivating "+ type+"  module: "+name); 
     791    if (this.module_map.containsKey(name)) { 
     792       
     793      logger.info("found the module"); 
     794      ModuleInterface m = (ModuleInterface)this.module_map.remove(name); 
     795      // also remove the xml bit from description list 
     796      if (type.equals(GSXML.COLLECTION_ELEM)) { 
     797    if (((Collection)m).isPublic()) {  
     798      Element this_col = GSXML.getNamedElement(this.collection_list, GSXML.COLLECTION_ELEM, GSXML.NAME_ATT, name); 
     799      if (this_col != null) { 
     800        this.collection_list.removeChild(this_col); 
     801      } 
     802      if (((Collection)m).hasOAI()) { 
     803        this_col = GSXML.getNamedElement(this.oai_collection_list, GSXML.COLLECTION_ELEM, GSXML.NAME_ATT, name); 
     804        if (this_col != null) { 
     805          this.oai_collection_list.removeChild(this_col); 
     806        } 
     807      } 
     808    } else { 
     809      // a private collection 
     810      Element this_col = GSXML.getNamedElement(this.private_collection_list, GSXML.COLLECTION_ELEM, GSXML.NAME_ATT, name); 
     811      if (this_col != null) { 
     812        this.private_collection_list.removeChild(this_col); 
     813      }  
     814    } 
     815      } else if (type.equals(GSXML.SERVICE_ELEM)) { 
     816        Element this_service = GSXML.getNamedElement(this.service_list, GSXML.SERVICE_ELEM, GSXML.NAME_ATT, name); 
     817        if (this_service != null) { 
     818          this.service_list.removeChild(this_service); 
     819        } 
     820      } else if (type.equals(GSXML.CLUSTER_ELEM)) { 
     821        Element this_cluster = GSXML.getNamedElement(this.cluster_list, GSXML.CLUSTER_ELEM, GSXML.NAME_ATT, name); 
     822        if (this_cluster != null) { 
     823          this.cluster_list.removeChild(this_cluster); 
     824        } 
     825      } else if (type.equals(GSXML.SITE_ELEM)) { 
     826        Element this_site = GSXML.getNamedElement(this.site_list, GSXML.SITE_ELEM, GSXML.NAME_ATT, name); 
     827        if (this_site != null) { 
     828          this.site_list.removeChild(this_site); 
     829          
     830          // also remove this sites colls, services, clusters etc 
     831          cleanUpModuleMapSubset(this.collection_list, name); 
     832          cleanUpModuleMapSubset(this.cluster_list, name); 
     833          cleanUpModuleMapSubset(this.service_list, name); 
     834       
     835      // can remote collections be in the oai_coll list, or private coll list ?? 
     836        } 
     837      } else { 
     838        logger.error("invalid module type: "+type+", can't remove info about this module"); 
     839      }  
     840       
     841      m.cleanUp(); // clean up any open files/connections etc - can cause trouble on windows 
     842      m=null; 
     843      return true; 
     844    } 
     845    // else not deactivated 
     846    logger.error(name+" module not found"); 
     847    return false; 
     848     
     849  } 
     850    
    601851  //***************************************************************** 
    602852  // auxiliary process methods 
     
    650900       
    651901    } 
    652      
     902         
     903    if (type.equals(OAIXML.OAI_SET_LIST)) { 
     904      logger.info("oaiSetList request received"); 
     905      //this is the oai receptionist asking for a list of oai-support collections 
     906      response.setAttribute(GSXML.TYPE_ATT, OAIXML.OAI_SET_LIST ); 
     907      response.appendChild(this.oai_collection_list); 
     908      return response; 
     909    }  
     910 
     911 
    653912    if (type.equals(GSXML.REQUEST_TYPE_SYSTEM)) { 
    654913       
     
    667926          if (subset.equals("")) { 
    668927            // need to reconfigure the MR 
    669             this.configure(); 
     928            this.configureLocalSite(); 
    670929            Element s = GSXML.createTextElement(this.doc, GSXML.STATUS_ELEM,  "MessageRouter reconfigured successfully"); 
    671930            response.appendChild(s); 
     
    674933            // else it a specific request 
    675934            if (subset.equals(GSXML.COLLECTION_ELEM+GSXML.LIST_MODIFIER)) { 
     935          // get rid of all the old collection stuff (not counting remote ones) before activating all the new ones 
     936          cleanUpModuleMapSubset(this.collection_list, null); 
     937          cleanUpModuleMapSubset(this.private_collection_list, null); 
    676938              success = configureCollections(); 
    677939            } else { 
     
    694956              if (subset.equals(GSXML.SERVICE_ELEM+GSXML.LIST_MODIFIER)) { 
    695957                Element service_rack_list = (Element)GSXML.getChildByTagName(site_config_elem, GSXML.SERVICE_CLASS_ELEM+GSXML.LIST_MODIFIER); 
    696                  
     958                cleanUpModuleMapSubset(this.service_list, null); 
    697959                success = configureServices(service_rack_list); 
    698960              } else if (subset.equals(GSXML.CLUSTER_ELEM+GSXML.LIST_MODIFIER)) { 
    699961                Element cluster_list = (Element)GSXML.getChildByTagName(site_config_elem, GSXML.CLUSTER_ELEM+GSXML.LIST_MODIFIER); 
    700                  
     962                cleanUpModuleMapSubset(this.cluster_list, null); 
    701963                success = configureClusters(cluster_list); 
    702964              } else if (subset.equals(GSXML.SITE_ELEM+GSXML.LIST_MODIFIER)) { 
    703965                Element site_list = (Element)GSXML.getChildByTagName(site_config_elem, GSXML.SITE_ELEM+GSXML.LIST_MODIFIER); 
    704                 success = configureSites(site_list); 
     966        cleanUpAllExternalSiteInfo(); 
     967                success = configureExternalSites(site_list); 
    705968              } 
    706969            } 
     
    721984           
    722985          if (action.equals(GSXML.SYSTEM_TYPE_DEACTIVATE)) { 
    723             deactivateModule(module_type, module_name); 
    724             Element s = GSXML.createTextElement(this.doc, GSXML.STATUS_ELEM, module_type+": "+module_name+" deactivated"); 
    725             response.appendChild(s); 
     986            success = deactivateModule(module_type, module_name); 
     987        if (success) { 
     988          Element s = GSXML.createTextElement(this.doc, GSXML.STATUS_ELEM, module_type+": "+module_name+" deactivated"); 
     989          response.appendChild(s); 
     990        } else { 
     991          Element s = GSXML.createTextElement(this.doc, GSXML.STATUS_ELEM, module_type+": "+module_name+" could not be deactivated"); 
     992          response.appendChild(s); 
     993        } 
     994             
    726995          } else if (action.equals(GSXML.SYSTEM_TYPE_ACTIVATE)) { 
     996        // we need to deactivate the module first, in case this is a  
     997        // reconfigure 
     998        deactivateModule(module_type, module_name); 
    727999            if (module_type.equals(GSXML.COLLECTION_ELEM)) { 
    7281000              success = activateCollectionByName(module_name); 
     
    7531025     
    7541026  } 
     1027 
     1028  //* Used to copy nodes from one message to another. E.g. copy a response node to the next request. Not sure if this is actually used anywhere yet... */ 
     1029 
    7551030  protected Element modifyMessages(Element request, Element message, Element result) { 
    7561031    Element response = this.doc.createElement(GSXML.RESPONSE_ELEM); 
     
    8141089  // **************************************************** 
    8151090   
    816   /** creates and configures a new collection 
    817    * 
    818    *@param col_name the name of the collection 
    819    *@return true if collection created ok 
    820    */ 
    821   protected boolean activateCollectionByName(String col_name) { 
    822      
    823     logger.info("Activating collection: "+col_name+"."); 
    824      
    825     // Look for the etc/collectionInit.xml file, and see what sort of Collection to load 
    826     Collection c = null; 
    827     File init_file = new File(GSFile.collectionInitFile(this.site_home, col_name)); 
    828      
    829     if (init_file.exists()) { 
    830       Document init_doc = this.converter.getDOM(init_file); 
    831       if (init_doc != null) { 
    832         Element init_elem = init_doc.getDocumentElement(); 
    833         if (init_elem != null) { 
    834           String coll_class_name = init_elem.getAttribute("class"); 
    835           if (!coll_class_name.equals("")) { 
    836             try { 
    837               c = (Collection)Class.forName("org.greenstone.gsdl3.collection."+coll_class_name).newInstance(); 
    838             } catch (Exception e) { 
    839               logger.info(" couldn't create a new collection, type "+coll_class_name+", defaulting to class Collection"); 
    840             } 
    841           } 
    842         } 
    843       } 
    844     } 
    845     if (c==null) { // we haven't found another classname to use 
    846       c = new Collection(); 
    847     } 
    848      
    849     c.setCollectionName(col_name); 
    850     c.setSiteHome(this.site_home); 
    851     c.setSiteAddress(this.site_http_address); 
    852     c.setMessageRouter(this); 
    853     if (c.configure()) { 
    854       // this could be a reactivation, so delete the old version 
    855       deactivateModule(GSXML.COLLECTION_ELEM, col_name); 
    856       // add to list of collections 
    857       this.module_map.put(col_name, c); 
    858        
    859       if(c.isPublic()) { 
    860         // only public collections will appear on the home page 
    861         // add short description_ to collection_list_ 
    862         Element e = this.doc.createElement(GSXML.COLLECTION_ELEM); 
    863         e.setAttribute(GSXML.NAME_ATT, col_name); 
    864 //        if (c.hasOAI()) { 
    865 //          e.setAttribute(OAIXML.HAS_OAI, "true"); 
    866 //        } else { 
    867 //          e.setAttribute(OAIXML.HAS_OAI, "false"); 
    868 //        }  
    869         if (c.hasOAI() == true) { 
    870           Element ane = this.doc.createElement(GSXML.COLLECTION_ELEM); 
    871           //The collection name is returned as site_name:coll_name, which is in fact the set specification 
    872           ane.setAttribute(GSXML.NAME_ATT, site_name + ":" + col_name); 
    873           ane.setAttribute(OAIXML.LASTMODIFIED, "" + c.getLastmodified()); 
    874            
    875           this.oai_collection_list.appendChild(ane); 
    876           //logger.info(GSXML.xmlNodeToString(oai_collection_list)); 
    877         }       
    878         this.collection_list.appendChild(e); 
    879       } 
    880       return true; 
    881     } else { 
    882       logger.error("Couldn't configure collection: "+ 
    883         col_name+"."); 
    884       return false; 
    885     } 
    886   } 
    887   protected Element getCollectionList() { 
    888     return collection_list; 
    889   } 
    890    
    891    
    892   protected boolean activateSiteByName(String site_name) { 
    893     logger.info("Activating site: "+site_name+"."); 
    894      
    895     // just in case this is a reactivation, deactivate this site first 
    896     deactivateModule(GSXML.SITE_ELEM, site_name); 
    897     File configFile = new File(GSFile.siteConfigFile(this.site_home)); 
    898      
    899     if (!configFile.exists() ) { 
    900       logger.error(" site config file: "+configFile.getPath()+" not found!"); 
    901       return false; 
    902     } 
    903     Document config_doc = this.converter.getDOM(configFile); 
    904     if (config_doc == null) { 
    905       logger.error(" couldn't parse site config file: "+configFile.getPath()); 
    906       return false; 
    907     } 
    908     Element config_elem = config_doc.getDocumentElement(); 
    909      
    910     Element config_site_list = (Element)GSXML.getChildByTagName(config_elem, GSXML.SITE_ELEM+GSXML.LIST_MODIFIER); 
    911     if (config_site_list ==null ) { 
    912       logger.error("activateSite, no sites found"); 
    913       return false; 
    914     } 
    915     // this is a name to identify the current site in the Communicator 
    916     String local_site_name = config_site_list.getAttribute("localSiteName"); 
    917     if (local_site_name.equals("")) { 
    918       local_site_name = site_name; 
    919     } 
    920      
    921     Element this_site_elem = GSXML.getNamedElement(config_site_list, GSXML.SITE_ELEM, GSXML.NAME_ATT, site_name); 
    922     if (this_site_elem == null) { 
    923       logger.error("activateSite, site "+site_name+" not found"); 
    924       return false; 
    925     } 
    926      
    927     return activateSite(this_site_elem, local_site_name); 
    928   } 
    929    
    930   protected boolean activateServiceClusterByName(String cluster_name) { 
    931     return false; 
    932      
    933   } 
    934    
    935   protected boolean activateServiceRackByName(String module_name) { 
    936     return false; 
    937   } 
    938    
    939   protected boolean deactivateModule(String type, String name) { 
    940      
    941     if (this.module_map.containsKey(name)) { 
    942        
    943       logger.info(" deactivating "+name); 
    944       ModuleInterface m = (ModuleInterface)this.module_map.remove(name); 
    945       m.cleanUp(); // clean up any open files/connections etc - can cause trouble on windows 
    946       // also remove the xml bit from description list 
    947       if (type.equals(GSXML.COLLECTION_ELEM)) { 
    948         Element this_col = GSXML.getNamedElement(this.collection_list, GSXML.COLLECTION_ELEM, GSXML.NAME_ATT, name); 
    949         if (this_col != null) { 
    950           this.collection_list.removeChild(this_col); 
    951         } 
    952         return true; 
    953       } else if (type.equals(GSXML.SERVICE_ELEM)) { 
    954         Element this_service = GSXML.getNamedElement(this.service_list, GSXML.SERVICE_ELEM, GSXML.NAME_ATT, name); 
    955         if (this_service != null) { 
    956           this.service_list.removeChild(this_service); 
    957         } 
    958         return true; 
    959       } else if (type.equals(GSXML.CLUSTER_ELEM)) { 
    960         Element this_cluster = GSXML.getNamedElement(this.cluster_list, GSXML.CLUSTER_ELEM, GSXML.NAME_ATT, name); 
    961         if (this_cluster != null) { 
    962           this.cluster_list.removeChild(this_cluster); 
    963         } 
    964         return true; 
    965       } else if (type.equals(GSXML.SITE_ELEM)) { 
    966         Element this_site = GSXML.getNamedElement(this.site_list, GSXML.SITE_ELEM, GSXML.NAME_ATT, name); 
    967         if (this_site != null) { 
    968           this.site_list.removeChild(this_site); 
    969            
    970           // also remove this sites colls, services, clusters etc 
    971           removeRemoteSiteInfo(this.collection_list, GSXML.COLLECTION_ELEM, name); 
    972           removeRemoteSiteInfo(this.cluster_list, GSXML.CLUSTER_ELEM, name); 
    973           removeRemoteSiteInfo(this.service_list, GSXML.SERVICE_ELEM, name); 
    974         } 
    975       } else { 
    976         logger.error(" couldn't deactivate coll"); 
    977         // couldn't do it 
    978         return false; 
    979       } 
    980     } 
    981     // else not deactivated 
    982     return false; 
    983      
    984   } 
    985    
    986   /** 
    987    * this looks through a list (module_list) of elements named module_name, 
    988    * and removes any whose names start with site_name 
    989    */ 
    990   protected void removeRemoteSiteInfo(Element module_list, 
    991     String module_name, 
    992     String site_name) { 
    993      
    994     NodeList modules = module_list.getElementsByTagName(module_name); 
    995     // will this work?? 
    996     for (int i=modules.getLength()-1; i>=0; i--) { 
    997        
    998       String name = ((Element)modules.item(i)).getAttribute(GSXML.NAME_ATT); 
    999       if (GSPath.getFirstLink(name).equals(site_name)) { 
    1000         module_list.removeChild(modules.item(i)); 
    1001       } 
    1002     } 
    1003   } 
     1091  
    10041092   
    10051093} 
  • greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/core/Receptionist.java

    r14515 r15191  
    264264    Element option_list = (Element)GSXML.getChildByTagName(config_elem, "optionList"); 
    265265    if (option_list != null) { 
    266         logger.error("found an option list"); 
     266        logger.info("found an interface optionList"); 
    267267        // we set any options in the config params 
    268268        NodeList options = option_list.getElementsByTagName("option"); 
     
    271271        String name = option.getAttribute(GSXML.NAME_ATT); 
    272272        String value = option.getAttribute(GSXML.VALUE_ATT); 
    273         logger.error("option: "+name+", "+value); 
     273        logger.info("option: "+name+", "+value); 
    274274        if (!name.equals("") && !value.equals("")) { 
    275275            this.config_params.put(name, value); 
  • greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/service/AbstractGS2FieldSearch.java

    r14521 r15191  
    333333        if (level_ids.size()>1) { 
    334334        // the first one is the default 
    335         param = GSXML.createParameterDescription2(this.doc, LEVEL_PARAM, getTextString("param."+LEVEL_PARAM, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, (String)level_ids.get(0), level_ids, level_names); 
     335        //param = GSXML.createParameterDescription2(this.doc, LEVEL_PARAM, getTextString("param."+LEVEL_PARAM, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, (String)level_ids.get(0), level_ids, level_names); 
     336        param = GSXML.createParameterDescription2(this.doc, LEVEL_PARAM, getTextString("param."+LEVEL_PARAM, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, this.default_level, level_ids, level_names); 
    336337        } else { 
    337338        // we need to set the level, but hidden, in case there is an invalid level saved 
    338         param = GSXML.createParameterDescription(this.doc, LEVEL_PARAM, "", GSXML.PARAM_TYPE_INVISIBLE, (String)level_ids.get(0), null, null); 
     339        //param = GSXML.createParameterDescription(this.doc, LEVEL_PARAM, "", GSXML.PARAM_TYPE_INVISIBLE, (String)level_ids.get(0), null, null); 
     340        param = GSXML.createParameterDescription(this.doc, LEVEL_PARAM, "", GSXML.PARAM_TYPE_INVISIBLE, this.default_level, null, null); 
    339341        } 
    340342    } else if (name.equals(RANK_PARAM)) { 
     
    358360        getIndexData(fields, field_names, lang); 
    359361        // the field list -  read from config file 
    360         param = GSXML.createParameterDescription2(this.doc, name, getTextString("param."+name, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, (String)fields.get(0), fields, field_names ); 
     362         
     363        // Fix for http://trac.greenstone.org/ticket/245 "java crash, index out of bounds" 
     364        // org.greenstone.gsdl3.service.AbstractGS2FieldSearch.createParameter(AbstractGS2FieldSearch.java:362) 
     365        // Changed from: 
     366        // param = GSXML.createParameterDescription2(this.doc, name, getTextString("param."+name, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, (String)fields.get(0), fields, field_names ); 
     367        String default_value = (fields.size() > 0) ? (String)fields.get(0) : null; 
     368              // don't want to access element 0 if fields.size()==0, and 
     369              // GSXML.createParameterDescription2 checks for default_value==null condition 
     370        param = GSXML.createParameterDescription2(this.doc, name, getTextString("param."+name, lang), GSXML.PARAM_TYPE_ENUM_SINGLE, default_value, fields, field_names ); 
    361371         
    362372    } else if (name.equals(FIELD_COMBINE_PARAM)) { 
  • greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/service/AbstractSearch.java

    r14183 r15191  
    9393 
    9494    protected String default_index_language = ""; 
    95  
     95    
     96    protected String default_max_docs = "100"; 
     97     
     98    protected String default_hits_per_page = "10"; 
     99  
    96100    public AbstractSearch() 
    97101    { 
     
    285289        param_list.appendChild(param); 
    286290    } 
    287         else if (name.equals(MAXDOCS_PARAM) || name.equals(HITS_PER_PAGE_PARAM)) { 
    288         String default_val = "100"; 
    289         if (name.equals(HITS_PER_PAGE_PARAM)) { 
    290         default_val = "10"; 
    291         } 
    292         param = GSXML.createParameterDescription(this.doc, name, getTextString("param."+name, lang), GSXML.PARAM_TYPE_INTEGER, default_val, null, null); 
    293         param_list.appendChild(param); 
    294     } else if (name.equals(CASE_PARAM) || name.equals(STEM_PARAM) || name.equals(ACCENT_PARAM)) { 
     291        else if (name.equals(MAXDOCS_PARAM)) { 
     292        param = GSXML.createParameterDescription(this.doc, name, getTextString("param."+name, lang), GSXML.PARAM_TYPE_INTEGER, this.default_max_docs, null, null); 
     293        param_list.appendChild(param); 
     294    } 
     295    else if(name.equals(HITS_PER_PAGE_PARAM)){ 
     296         param = GSXML.createParameterDescription(this.doc, name, getTextString("param."+name, lang), GSXML.PARAM_TYPE_INTEGER, this.default_hits_per_page, null, null); 
     297        param_list.appendChild(param); 
     298    } 
     299    else if (name.equals(CASE_PARAM) || name.equals(STEM_PARAM) || name.equals(ACCENT_PARAM)) { 
    295300        String[] bool_ops = {"0", "1"}; 
    296301        String[] bool_texts = {getTextString("param.boolean.off", lang),getTextString("param.boolean.on", lang)};  
  • greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/service/GS2MGPPSearch.java

    r14440 r15191  
    9999    Set entries = params.entrySet(); 
    100100    Iterator i = entries.iterator(); 
    101     String physical_sub_index_name=null; 
    102     String physical_index_language_name=null; 
     101    String physical_sub_index_name= this.default_index_subcollection; 
     102    String physical_index_language_name= this.default_index_language; 
    103103    while (i.hasNext()) { 
    104104      Map.Entry m = (Map.Entry)i.next(); 
     
    151151    mgpp_src.loadIndexData(indexdir); 
    152152     
    153     physical_index_name="idx"; 
    154153    return true; 
    155154  } 
  • greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/service/GS2MGRetrieve.java

    r14632 r15191  
    126126        synchronized(this.mg_src){ 
    127127                String indexpath = GSFile.collectionIndexPath(this.index_stem, this.default_index);         
     128        this.mg_src.setIndex(indexpath); 
    128129        doc_content =  this.mg_src.getDocument (this.mg_basedir, 
    129130                            this.mg_textdir, doc_num); 
  • greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/util/GDBMWrapper.java

    r14531 r15191  
    5252    } 
    5353 
    54     /** cloase the database associated with this wrapper */ 
     54    /** close the database associated with this wrapper */ 
    5555    public void closeDatabase() { 
    5656    try { 
  • greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/util/GSFile.java

    r13270 r15191  
    291291    /** the gdbm database file -  
    292292     * note, need to change extension depending on OS */ 
     293    // The perl code can't detect big vs little endian on a Mac, so the Perl 
     294    // code will always name the gdbm db file .bdb on a Mac whether its little 
     295    // endian or not. A Mac little endian file is NOT the same as a Linux  
     296    // little endian file 
    293297    static public String GDBMDatabaseFile(String site_home,  
    294298                      String collection_name, 
     
    296300 
    297301    String db_ext = ".ldb"; 
    298     if (Misc.isBigEndian()) { 
     302    if (Misc.isMac() || Misc.isBigEndian()) { 
    299303        db_ext = ".bdb"; 
    300304    } 
  • greenstone3/branches/customizingGreenstone3/src/java/org/greenstone/gsdl3/util/GSXML.java

    r14641 r15191  
    694694    return null; 
    695695  } 
     696  /** returns a NodeList of elements: ancestor/node_name[@attribute_name='attribute_value'] 
     697   */ 
     698  public static NodeList getNamedElements(Element ancestor, String node_name, String attribute_name, String attribute_value) { 
     699        MyNodeList node_list = new MyNodeList(); 
     700        NodeList children = ancestor.getElementsByTagName(node_name); 
     701         
     702        if(children != null && children.getLength() > 0) { 
     703             
     704            for (int i=0; i<children.getLength(); i++) { 
     705                Node child = children.item(i); 
     706                if (child.getNodeName().equals(node_name)) { 
     707                    if (((Element)child).getAttribute(attribute_name).equals(attribute_value)) 
     708                        node_list.addNode(child); 
     709                }            
     710            }            
     711        } 
     712        return node_list; 
     713  } 
    696714   
    697715  public static int SORT_TYPE_STRING = 0; 
  • greenstone3/branches/customizingGreenstone3/web/WEB-INF/classes/AbstractGS2FieldSearch.properties

    r13995 r15191  
    1414param.fqk.2=NOT 
    1515param.fqa=accent 
    16 param.indexSubcollection=Index sub collection 
    1716param.indexLanguage=Index language 
    1817 
  • greenstone3/branches/customizingGreenstone3/web/WEB-INF/classes/AbstractSearch.properties

    r13128 r15191  
    1010param.hitsPerPage=Hits per page 
    1111param.startPage=Start from page 
     12param.indexSubcollection=Index sub collection 
    1213 
    1314#optional params 
  • greenstone3/branches/customizingGreenstone3/web/WEB-INF/web.xml

    r14708 r15191  
    7676    <servlet-class>TestServlet</servlet-class> 
    7777  </servlet> 
    78    
    79  <servlet> 
    80     <servlet-name>dev</servlet-name> 
    81     <description>blah</description> 
    82     <servlet-class>org.greenstone.gsdl3.LibraryServlet</servlet-class> 
    83     <init-param> 
    84       <param-name>library_name</param-name> 
    85       <param-value>library</param-value> 
    86     </init-param> 
    87     <init-param> 
    88       <param-name>site_name</param-name> 
    89       <param-value>localsite</param-value> 
    90     </init-param> 
    91     <init-param> 
    92       <param-name>interface_name</param-name> 
    93       <param-value>default</param-value> 
    94     </init-param> 
    95     <init-param> 
    96       <param-name>receptionist_class</param-name> 
    97       <param-value>SkinnedReceptionist</param-value> 
    98     </init-param> 
    99     <init-param> 
    100       <param-name>default_lang</param-name> 
    101       <param-value>en</param-value> 
    102     </init-param> 
    103   </servlet> 
    104  
     78 
     79<!-- add new servlet definition here --> 
     80 
     81 <servlet>        
     82    <servlet-name>mat</servlet-name> 
     83    <description>a metadata analysis servlet</description> 
     84    <servlet-class>MatServlet</servlet-class>           
     85  </servlet> 
     86 
     87 
     88 
     89 
     90   
    10591  <servlet> 
    10692    <servlet-name>library</servlet-name> 
     
    117103    <init-param> 
    118104      <param-name>interface_name</param-name> 
    119       <param-value>default</param-value> 
     105      <param-value>classic</param-value> 
    120106    </init-param> 
    121107    <init-param> 
     
    123109      <param-value>en</param-value> 
    124110    </init-param> 
    125   </servlet> 
    126    
     111    <init-param> 
     112      <param-name>session_expiration</param-name> 
     113      <param-value>1800</param-value> 
     114    </init-param> 
     115  </servlet> 
    127116  <servlet> 
    128117    <servlet-name>gateway</servlet-name> 
     
    251240    --> 
    252241     
    253 <!--There is no need for this mapping, I think --> 
     242 
    254243<servlet-mapping> 
    255244      <servlet-name>oaiserver</servlet-name> 
     
    262251  </servlet-mapping> 
    263252 
    264   <servlet-mapping> 
    265     <servlet-name>dev</servlet-name> 
    266     <url-pattern>/dev</url-pattern> 
    267   </servlet-mapping> 
     253 <servlet-mapping> 
     254    <servlet-name>mat</servlet-name> 
     255    <url-pattern>/mat</url-pattern> 
     256  </servlet-mapping> 
     257 
     258 
    268259   
    269260  <servlet-mapping> 
  • greenstone3/branches/customizingGreenstone3/web/index.html

    r7834 r15191  
     1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
    12<html> 
    2  
    33  <head> 
    44    <meta http-equiv="Content-Type" 
    55      content="text/html; charset=iso-8859-1"> 
    6       <title>Greenstone Version 3</title> 
    7   </head> 
    8    
    9   <body bgcolor="#ffffff" text="#000000" link="#006666"  
    10     alink="#cc9900" vlink="#666633" background="interfaces/default/images/chalk.gif"> 
     6     <title>Greenstone Version 3</title> 
     7     <style type="text/css"> 
     8        li {padding: 0.8em 0;} 
     9     </style>  
     10  </head>   
     11<body bgcolor="#ffffff" text="#000000" background="interfaces/default/images/chalk.gif"> 
    1112     
    12     <!-- page banner (_style:pagebanner_) --> 
    13     <center> 
    14       <table width=537 cellspacing=0 cellpadding=0> 
    15     <tr valign=top> 
    16       <td rowspan=2 align=left><center><img src="interfaces/default/images/gsdlhead.gif" width=300 height=100 alt="Greenstone Digital Library Software"></center></td> 
    17       <td align=right></td> 
    18     </tr> 
     13<p style="text-align:center;"> 
     14<img src="interfaces/default/images/gsdlhead.gif"  
     15width="225" height="66" alt="Greenstone Digital Library Software"> 
     16</p> 
     17 
     18<div style="margin-left: 90px;"> 
     19 
     20<h2 style="font-size:110%;font-family:sans-serif;">Welcome to your Greenstone3 installation</h2> 
     21<p>What do you want to do today?</p> 
    1922     
    20     <tr> 
    21       <td align=right></td> 
    22     </tr> 
    23      
    24     <tr> 
    25       <td colspan=2></td> 
    26     </tr> 
    27       </table> 
    28     </center> 
    29     <!-- end of page banner --> 
    30      
    31     <center> 
    32        
    33       <table width=537> 
    34     <tr><td><h3>Hello! Welcome to your Greenstone3 installation</h3></td></tr> 
    35     <tr><td>&nbsp;</td></tr> 
    36     <tr><td>What do you want to do today?</td></tr> 
    37     <tr><td>&nbsp;</td></tr> 
    38      
    39      
    40     <tr><td><a href="testing">Run</a> the test servlet</td></tr> 
    41     <tr><td><a href="library">Run</a> the standard library servlet. View the demo collections that come with Greenstone, using the default look and feel.</td></tr> 
    42     <tr><td><a href="classic">Run</a> the 'classic' servlet. View the same collections using the 'classic' (or Greenstone 2) look and feel.</td></tr> 
    43     <tr><td><a href="gateway">Run</a> the gateway servlet. This uses the standard look and feel, and talks via SOAP to the site with demo collections (localsite). Note that SOAP needs to be installed, and a SOAP server needs to be running for localsite.</td></tr> 
    44       </table> 
    45     </center> 
    46   </body> 
     23<ul>     
     24<li><a href="testing">Run the test servlet.</a> 
     25<li><a href="library">Run the standard library servlet.</a> View the demo collections that come with Greenstone, using  
     26the default look and feel. 
     27<li><a href="classic">Run the 'classic' servlet.</a> View the same collections using the 'classic' (or Greenstone 2)  
     28look and feel. 
     29<li><a href="gateway">Run the gateway servlet.</a> This uses the standard look and feel, and talks via SOAP to the site  
     30with demo collections (localsite). 
     31<ul> 
     32<li>Note that SOAP needs to be installed, and a SOAP server needs to be running for localsite. 
     33</ul> 
     34</ul> 
     35 
     36</div> 
     37 
     38<p style="text-align:right; font-size: 75%;">powered by <a  
     39href="http://www.greenstone.org/greenstone3-home">greenstone3</a></p> 
     40 
     41</body> 
    4742</html> 
  • greenstone3/branches/customizingGreenstone3/web/interfaces/classic/transform/pref.xsl

    r14643 r15191  
    204204    <xsl:param name="prefix"/> 
    205205     
    206     <xsl:if test="not(@name='matchMode') and not(@name='level') and not(@name='index') and not(@name='sortBy') and (@type='boolean' or @type='enum_single')"><xsl:apply-templates select="." mode="radio"><xsl:with-param name="display" select="$display"/><xsl:with-param name="prefix" select="$prefix"/><xsl:with-param name="paramIdx" select="position()"/></xsl:apply-templates></xsl:if>     
     206    <xsl:if test="not(@name='matchMode') and not(@name='level') and not(@name='index') and not(@name='sortBy') and not(@name='indexSubcollection') and not(@name='indexLanguage') and (@type='boolean' or @type='enum_single')"><xsl:apply-templates select="." mode="radio"><xsl:with-param name="display" select="$display"/><xsl:with-param name="prefix" select="$prefix"/><xsl:with-param name="paramIdx" select="position()"/></xsl:apply-templates></xsl:if>     
    207207  </xsl:template> 
    208208   
     
    224224      <tr><xsl:attribute name="id"><xsl:value-of select="concat($prefix, '-', $paramIdx, '-', position())"/></xsl:attribute><xsl:if test="$display='n'"><xsl:attribute name="style">display:none</xsl:attribute></xsl:if> 
    225225      <xsl:if test="position()=1"><td rowspan='{$numOptions}' valign='baseline'><xsl:value-of select="../displayItem"/></td></xsl:if> 
    226       <td><input type='radio' name='{$cachedName}' value="{$value}"><xsl:if test="$cachedValue=$value"><xsl:attribute name="checked"></xsl:attribute></xsl:if></input></td> 
     226      <td><input type='radio' name='{$cachedName}' value="{$value}"><xsl:if test="$cachedValue=$value"><xsl:attribute name="checked">true</xsl:attribute></xsl:if></input></td> 
    227227      <td><xsl:value-of select="displayItem"/></td> 
    228228      </tr> 
  • greenstone3/branches/customizingGreenstone3/web/interfaces/classic/transform/query-common.xsl

    r14671 r15191  
    2929  <xsl:template match="paramList" priority='2'>      
    3030    <span class="textselect"> 
    31         Search for <xsl:apply-templates select="param[@name='index']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='index']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates><xsl:if test="param[@name='level' and not(@type='invisible')]">at <xsl:apply-templates select="param[@name='level']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='level']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates> level</xsl:if><xsl:call-template name='query_mode'/> 
     31        Search for <xsl:apply-templates select="param[@name='index']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='index']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates><xsl:if test="param[@name='indexSubcollection']"> of <xsl:apply-templates select="param[@name='indexSubcollection']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='indexSubcollection']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates></xsl:if><xsl:if test="param[@name='indexLanguage']"> in <xsl:apply-templates select="param[@name='indexLanguage']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='indexLanguage']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates></xsl:if><xsl:if test="param[@name='level' and not(@type='invisible')]"> at <xsl:apply-templates select="param[@name='level']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='level']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates> level</xsl:if><xsl:call-template name='query_mode'/> 
    3232    </span>  
    3333    <span class="querybox">