Changeset 22042 for gs3-extensions/mat


Ignore:
Timestamp:
2010-05-06T10:24:22+12:00 (14 years ago)
Author:
ak19
Message:

Upgraded the technology used in mat-colbuild.bat and mat-colbuild-download.bat and also tidied up these files

Location:
gs3-extensions/mat/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/mat/trunk/bin/script/mat-colbuild-download.bat

    r18213 r22042  
    99:: %9 should be the creator
    1010:: %10 should be the proxy settings
    11  
    12 DEL %8
    13 cd %6
     11
     12SET COL_NAME=%1
     13SET OAI_URL=%2
     14SET CACHE_DIR=%3
     15SET MAX_RECORDS=%4
     16SET OAI_PREFIX=%5
     17SET GS3_ROOT=%6
     18SET COL_DIR=%7
     19SET LOG_FILE=%8
     20SET CREATOR=%9
     21::SHIFT
     22::SET PROXY=%9
     23
     24DEL %LOG_FILE%
     25cd %GS3_ROOT%
    1426CALL gs3-setup.bat
    1527
     
    1931cd bin/script/
    2032
    21 perl -S mkcol.pl -gs3mode -collectdir %7 %1
     33perl -S mkcol.pl -gs3mode -buildtype lucene -collectdir %COL_DIR% %COL_NAME%
    2234
    2335:: need to ensure that OAIPLUG is included
    2436:: hack the model collection to inclde it
    25 echo %1 %2 %3 %4 %5 %6 %7 %8 >> %8
     37echo %COL_NAME% %OAI_URL% %CACHE_DIR% %MAX_RECORDS% %OAI_PREFIX% %GS3_ROOT% %COL_DIR% %LOG_FILE% >> %LOG_FILE%
    2638
    27 if not exist %3 goto else
    28 RMDIR /S /Q  %3
     39if not exist %CACHE_DIR% goto else
     40RMDIR /S /Q  %CACHE_DIR%
    2941goto endif
    3042:else
    31 md %3
     43md %CACHE_DIR%
    3244:endif
    3345
    34 echo "Away to download OAI" >> %8
     46echo "Away to download OAI" >> %LOG_FILE%
    3547
    36 echo %9
     48echo %CREATOR%
    3749
    38 SET _MyVariable=%9
     50SET _CREATOR=%CREATOR%
    3951
    40 SET _MyVariable=###%_MyVariable%###
    41 SET _MyVariable=%_MyVariable:"###=%
    42 SET _MyVariable=%_MyVariable:###"=%
    43 SET _MyVariable=%_MyVariable:###=%
     52SET _CREATOR=###%_CREATOR%###
     53SET _CREATOR=%_CREATOR:"###=%
     54SET _CREATOR=%_CREATOR:###"=%
     55SET _CREATOR=%_CREATOR:###=%
     56
     57echo "Away to run downloadfrom.pl with %_CREATOR%"
    4458 
    45 perl downloadfrom.pl -download_mode OAI -cache_dir %3 -url %2 -max_records %4 -metadata_prefix %5 %_MyVariable%
     59perl downloadfrom.pl -download_mode OAI -cache_dir %CACHE_DIR% -url %OAI_URL% -max_records %MAX_RECORDS% -metadata_prefix %OAI_PREFIX% %_CREATOR%
    4660
    4761exit
  • gs3-extensions/mat/trunk/bin/script/mat-colbuild.bat

    r22023 r22042  
    11:: %1 should be the collection name
    2 :: %2 should be the oai URL
    3 :: %3 should be the cache directory
    4 :: %4 should be the max records
    5 :: %5 should be the OAI metadata prefix
    6 :: %6 should be GS3 root
    7 :: %7 should be the collection directory
    8 :: %8 should be the log file
    9 :: %9 should be the hostname:port
     2:: %2 should be the cache directory
     3:: %3 should be GS3 root
     4:: %4 should be the collection directory
     5:: %5 should be the log file
     6:: %6 should be the hostname:port
    107
    11 :: %GS3_ROOT=%6
    12 :: %COLLECT_DIR=%7
    13 :: %LOG_FILE=%8
     8SET COL_NAME=%1
     9SET CACHE_DIR=%2
     10SET GS3_ROOT=%3
     11SET COL_DIR=%4
     12SET LOG_FILE=%5
     13SET HOST_PORT=%6
    1414
    1515:: check we are still in the right directories
    1616
    17 cd %6
     17cd %GS3_ROOT%
    1818CALL gs3-setup.bat
    1919
     
    2424echo "Away to build"
    2525
    26 perl build -indextype lucene -site localsite -collectdir %7 -log_events -download file://%3 %1
     26XCOPY %CACHE_DIR%\* %COL_DIR%\%COL_NAME%\import /s /i /y
     27
     28perl -S incremental-rebuild.pl -site localsite -collectdir %COL_DIR% %COL_NAME%
    2729
    2830echo "Build finished ...."
     
    3840:: :endif
    3941
    40 echo "Away to convert from Greenstone 2 to Greenstone 3"  >> %8
     42echo "Away to convert from Greenstone 2 to Greenstone 3"  >> %LOG_FILE%
    4143echo "Away to convert from Greenstone 2 to Greenstone 3"
    4244
    43 cd %6
     45cd %GS3_ROOT%
    4446cd bin/script/
    4547
    46 perl convert_coll_from_gs2.pl -collectdir %7 %1
     48::perl convert_coll_from_gs2.pl -collectdir %7 %1
    4749
    48 echo "Away to reconfigure Greenstone 3 server"  >> %8
     50echo "Away to reconfigure Greenstone 3 server"  >> %LOG_FILE%
    4951echo "Away to reconfigure Greenstone 3 server"
    5052
    5153:: wget -O /tmp/mat5.html "http://localhost:8090/greenstone3/library?a=s&sa=c"
    52 wget -O %3/mat-reconfigure.html "http://%9/greenstone3/library?a=s&sa=c"
     54wget -O %CACHE_DIR%/mat-reconfigure.html "http://%HOST_PORT%/greenstone3/library?a=s&sa=c"
    5355
    54 echo "Done"  >> %8
     56echo "Done"  >> %LOG_FILE%
    5557echo "Done"
    5658
  • gs3-extensions/mat/trunk/src/org/greenstone/mat/servlet/MatServlet.java

    r22041 r22042  
    3939    private String proxyHostContent = "";
    4040    private String proxyPortContent = "";
    41     //private String collection_creator = "";
     41    private String collection_creator = "";
    4242    private String proxyUserName= "";
    4343    private String proxyUserPassword = "";
     
    561561        alist.add(collectDir);
    562562        alist.add(logFile);
    563         //alist.add(collection_creator);
     563        alist.add(collection_creator);
    564564        alist.add(proxy_settings);
    565565        String[] arrays = new String[alist.size()];
Note: See TracChangeset for help on using the changeset viewer.