Ignore:
Timestamp:
2008-02-12T16:13:13+13:00 (16 years ago)
Author:
davidb
Message:

Changes to GLI to support export into Fedora. New utility called flisvn diff gems/MetadataSetManager.java

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/GetOpt.java

    r14303 r14974  
    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;
     
    243247            }
    244248            }
     249
     250            // Fedora home
     251            if(argument_name.equals(StaticStrings.FEDORA_HOME)) {
     252            if(argument_value.endsWith(File.separator)) {
     253                fedora_info.setHome(argument_value);
     254            }
     255            else {
     256                fedora_info.setHome(argument_value + File.separator);
     257            }
     258            }
     259
     260            // Fedora hostname
     261            if(argument_name.equals(StaticStrings.FEDORA_HOSTNAME)) {
     262            if(argument_value.endsWith(File.separator)) {
     263                fedora_info.setHostname(argument_value);
     264            }
     265            else {
     266                fedora_info.setHostname(argument_value + File.separator);
     267            }
     268            }
     269            // Fedora port
     270            if(argument_name.equals(StaticStrings.FEDORA_PORT)) {
     271            if(argument_value.endsWith(File.separator)) {
     272                fedora_info.setPort(argument_value);
     273            }
     274            else {
     275                fedora_info.setPort(argument_value + File.separator);
     276            }
     277            }
     278            // Fedora username
     279            if(argument_name.equals(StaticStrings.FEDORA_USERNAME)) {
     280            if(argument_value.endsWith(File.separator)) {
     281                fedora_info.setUsername(argument_value);
     282            }
     283            else {
     284                fedora_info.setUsername(argument_value + File.separator);
     285            }
     286            }
     287            // Fedora password
     288            if(argument_name.equals(StaticStrings.FEDORA_PASSWORD)) {
     289            if(argument_value.endsWith(File.separator)) {
     290                fedora_info.setPassword(argument_value);
     291            }
     292            else {
     293                fedora_info.setPassword(argument_value + File.separator);
     294            }
     295            }
     296            // Fedora protocol, e.g. http or https
     297            if(argument_name.equals(StaticStrings.FEDORA_PROTOCOL)) {
     298            if(argument_value.endsWith(File.separator)) {
     299                fedora_info.setProtocol(argument_value);
     300            }
     301            else {
     302                fedora_info.setProtocol(argument_value + File.separator);
     303            }
     304            }
     305
     306
     307
     308
    245309                 
    246310        }
Note: See TracChangeset for help on using the changeset viewer.