Ignore:
Timestamp:
2009-01-12T11:19:54+13:00 (15 years ago)
Author:
kjdon
Message:

updated the rtl-gli branch with files from trunk. Result of a merge 14807:18318

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/branches/rtl-gli/src/org/greenstone/gatherer/GetOpt.java

    r14303 r18363  
    5555    public String metadata_path = null;
    5656
     57    protected FedoraInfo fedora_info = null;
     58   
    5759    public GetOpt(String[] args)
    5860    {
    5961    // Default dictionary. Only used for starting error messages.
    6062    Dictionary dictionary = new Dictionary(null, null);
     63
     64    fedora_info = new FedoraInfo();
    6165
    6266    // Parse arguments
     
    142146            use_remote_greenstone = true;
    143147            //Use a remote Greenstone
    144        
    145             }else if (argument_name.equals(StaticStrings.GSDL3_ARGUMENT)){
     148            }
     149            else if (argument_name.equals(StaticStrings.GSDL3_ARGUMENT)){
    146150            //Use a remote Greenstone3
    147151            run_gsdl3=true;
     
    149153            else if (argument_name.equals(StaticStrings.NEW_METADATASET)) {
    150154            new_set = true;
     155            }
     156            else if(argument_name.equals(StaticStrings.FEDORA_MODE)) {
     157            // Running FLI remotely
     158            fedora_info.setActive(true);
    151159            }
    152160        }
     
    243251            }
    244252            }
     253
     254            // Fedora home - when running Fedora locally
     255            if(argument_name.equals(StaticStrings.FEDORA_HOME)) {
     256            if(argument_value.endsWith(File.separator)) {
     257                fedora_info.setHome(argument_value);
     258            }
     259            else {
     260                fedora_info.setHome(argument_value + File.separator);
     261            }
     262            }
     263
     264            if(argument_name.equals(StaticStrings.FEDORA_VERSION)) {
     265            fedora_info.setVersion(argument_value);
     266            }
     267           
     268            // Fedora hostname
     269            if(argument_name.equals(StaticStrings.FEDORA_HOSTNAME)) {
     270            if(argument_value.endsWith(File.separator)) {
     271                fedora_info.setHostname(argument_value);
     272            }
     273            else {
     274                fedora_info.setHostname(argument_value + File.separator);
     275            }
     276            }
     277            // Fedora port
     278            if(argument_name.equals(StaticStrings.FEDORA_PORT)) {
     279            if(argument_value.endsWith(File.separator)) {
     280                fedora_info.setPort(argument_value);
     281            }
     282            else {
     283                fedora_info.setPort(argument_value + File.separator);
     284            }
     285            }
     286            // Fedora username
     287            if(argument_name.equals(StaticStrings.FEDORA_USERNAME)) {
     288            if(argument_value.endsWith(File.separator)) {
     289                fedora_info.setUsername(argument_value);
     290            }
     291            else {
     292                fedora_info.setUsername(argument_value + File.separator);
     293            }
     294            }
     295            // Fedora password
     296            if(argument_name.equals(StaticStrings.FEDORA_PASSWORD)) {
     297            if(argument_value.endsWith(File.separator)) {
     298                fedora_info.setPassword(argument_value);
     299            }
     300            else {
     301                fedora_info.setPassword(argument_value + File.separator);
     302            }
     303            }
     304            // Fedora protocol, e.g. http or https
     305            if(argument_name.equals(StaticStrings.FEDORA_PROTOCOL)) {
     306            if(argument_value.endsWith(File.separator)) {
     307                fedora_info.setProtocol(argument_value);
     308            }
     309            else {
     310                fedora_info.setProtocol(argument_value + File.separator);
     311            }
     312            }
     313
     314
     315
     316
    245317                 
    246318        }
Note: See TracChangeset for help on using the changeset viewer.