LIA_topic_seg
Class DefaultConfig

java.lang.Object
  extended by LIA_topic_seg.DefaultConfig

public class DefaultConfig
extends java.lang.Object

Cette classe regroupe des paramtres de configuration This product includes software developed by the Apache Software Foundation (http://www.apache.org/)."


Nested Class Summary
private  class DefaultConfig.CmdLine
           
 
Field Summary
private  org.apache.commons.cli.CommandLine _cl
           
private  java.util.HashMap<java.lang.String,java.lang.String> _map
           
 
Constructor Summary
DefaultConfig()
           
DefaultConfig(java.lang.String fileName)
           
 
Method Summary
 boolean containsParam(java.lang.String n)
           
 java.lang.String getParam(java.lang.String n)
           
private  void init()
           
 void load(java.lang.String fileName)
           
 void save(java.lang.String fileName)
           
 void setParam(java.lang.String n, java.lang.String c)
           
 java.lang.String[] setParamsFromCmdLine(java.lang.String[] args)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_cl

private org.apache.commons.cli.CommandLine _cl

_map

private java.util.HashMap<java.lang.String,java.lang.String> _map
Constructor Detail

DefaultConfig

public DefaultConfig()
              throws java.lang.Exception
Throws:
java.lang.Exception

DefaultConfig

public DefaultConfig(java.lang.String fileName)
              throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

init

private void init()
           throws java.lang.Exception
Throws:
java.lang.Exception

load

public void load(java.lang.String fileName)
          throws java.lang.Exception
Throws:
java.lang.Exception

setParam

public void setParam(java.lang.String n,
                     java.lang.String c)
              throws java.lang.Exception
Parameters:
n - name of parameter
c - content of parameter
Throws:
java.lang.Exception

containsParam

public boolean containsParam(java.lang.String n)
Parameters:
n - name of parameter
Returns:
true if parameter exists; false otherwise

getParam

public java.lang.String getParam(java.lang.String n)
Parameters:
n - name of parameter
Returns:
content of parameter or null if the parameter does not exist

setParamsFromCmdLine

public java.lang.String[] setParamsFromCmdLine(java.lang.String[] args)
                                        throws java.lang.Exception
Throws:
java.lang.Exception

save

public void save(java.lang.String fileName)
          throws java.lang.Exception
Throws:
java.lang.Exception

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object