|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.autonomy.config.ConfigEntry | +--com.autonomy.config.ConfigSection
This is a section in a configuration. It may contain other sections and ConfigKeys.
Field Summary |
Fields inherited from class com.autonomy.config.ConfigEntry |
BEGIN_CLOSE, BEGIN_OPEN, COMMENT_END, COMMENT_START, CRLF, END_CLOSE, END_OPEN, IS_FILE, IS_KEY, IS_SECTION, IS_UNKNOWN, KEY_VALUE_SEPARATOR, m_nType, USE_END_TAG |
Constructor Summary | |
ConfigSection()
Creates a blank section |
|
ConfigSection(java.lang.String sName)
Creates a new empty section |
Method Summary | |
void |
delete(java.lang.String sName)
Removes the entry with the given name |
void |
display()
Builds a String containing this section as it would appear in the configuration file, and writes to standard out |
java.lang.String[] |
getKeyNames()
get a list of the sub-key names |
java.util.Vector |
getKeyNamesVector()
get a list of the sub-key names |
java.lang.String |
getName()
Returns the name of the config section |
java.lang.String |
getOriginalName(java.lang.String sSection)
Gets the name of a sub entry as it appeared in the original file |
java.lang.String[] |
getSectionNames()
get a list of the sub-section names |
java.util.Vector |
getSectionNamesVector()
get a list of the sub-section names |
boolean |
readBoolean(java.lang.String sName,
boolean bDefault)
Returns the value of a sub-entry, as a boolean |
double |
readDouble(java.lang.String sName,
double dDefault)
Returns the value of a sub-entry, as a double |
int |
readInt(java.lang.String sName,
int nDefault)
Returns the value of a sub-entry, as an int |
com.autonomy.config.ConfigKey |
readKey(java.lang.String sName,
java.lang.String sDefault)
Returns a sub-key |
long |
readLong(java.lang.String sName,
long lnDefault)
Returns the value of a sub-entry, as a long |
com.autonomy.config.ConfigSection |
readSection(java.lang.String sName)
Returns a sub-section |
com.autonomy.config.ConfigSection |
readSectionSafely(java.lang.String sName)
Returns a sub-section, creating it if it does not exist |
java.lang.String |
readString(java.lang.String sName,
java.lang.String sDefault)
Returns the value of a sub-entry, as a String |
void |
setKey(com.autonomy.config.ConfigKey key)
Sets the specified key |
void |
setSection(com.autonomy.config.ConfigSection section)
Puts a new sub-section into this section |
void |
setString(java.lang.String sName,
java.lang.String sValue)
Creates and sets a new sub-key for this section |
java.util.Hashtable |
toHashtable()
Returns the config section in a hashtable |
java.lang.String |
toString()
Builds a String containing this section as it would appear in the configuration file |
Methods inherited from class com.autonomy.config.ConfigEntry |
getComments, getOriginalName, getValue, setComments, stringIsValidName |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ConfigSection()
public ConfigSection(java.lang.String sName)
sName
- Name of the new sectionMethod Detail |
public java.lang.String getName()
getName
in class ConfigEntry
public java.util.Vector getSectionNamesVector()
public java.lang.String[] getSectionNames()
public java.util.Vector getKeyNamesVector()
public java.lang.String[] getKeyNames()
public com.autonomy.config.ConfigSection readSection(java.lang.String sName)
sName
- Name of sub-section to return
public com.autonomy.config.ConfigSection readSectionSafely(java.lang.String sName)
sName
- Name of sub-section to return
public com.autonomy.config.ConfigKey readKey(java.lang.String sName, java.lang.String sDefault)
sName
- Name of sub-key to return
public java.lang.String readString(java.lang.String sName, java.lang.String sDefault)
sName
- Name of sub-key to returnsDefault
- Value to use if the entry does not exist
public int readInt(java.lang.String sName, int nDefault)
sName
- Name of sub-key to returnnDefault
- Value to use if the entry does not exist
public long readLong(java.lang.String sName, long lnDefault)
sName
- Name of sub-key to returnlnDefault
- Value to use if the entry does not exist
public double readDouble(java.lang.String sName, double dDefault)
sName
- Name of sub-key to returndDefault
- Value to use if the entry does not exist
public boolean readBoolean(java.lang.String sName, boolean bDefault)
sName
- Name of sub-key to returnbDefault
- Value to use if the entry does not exist
public void setKey(com.autonomy.config.ConfigKey key)
key
- ConfigKey key to add to this sectionpublic void setString(java.lang.String sName, java.lang.String sValue)
sName
- Name of sub-keysValue
- Value of sub-keypublic void setSection(com.autonomy.config.ConfigSection section)
section
- Section to addpublic void delete(java.lang.String sName)
sName
- Name of entry to removepublic java.lang.String toString()
toString
in class java.lang.Object
public void display()
public java.lang.String getOriginalName(java.lang.String sSection)
public java.util.Hashtable toHashtable()
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |