|
Regain 2.1.0-STABLE API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.regain.crawler.config.PreparatorConfig
public class PreparatorConfig
The configuration of a preparator. Consists of a set of sections which contain a set of key-value-pairs. Is the order of sections relevant? Currently, it isn't guaranteed. Ignores Case of section name.
Field Summary | |
---|---|
private ChainedHashMap<String,Map<String,String>> |
mSectionList
The sections of this config. |
private Map<String,String>[] |
sectionContents
Deprecated. |
private String[] |
sectionNames
Deprecated. |
Constructor Summary | |
---|---|
PreparatorConfig()
|
Method Summary | |
---|---|
(package private) void |
addSection(String name,
Map<String,String> content)
Adds a section to the config |
private void |
fillSectionCache()
Deprecated. |
Map<String,String> |
getSectionContent(int index)
Deprecated. This method assumes that the config won't change anymore. Use iterator() instead. |
int |
getSectionCount()
Gets the number of sections this config has. |
String |
getSectionName(int index)
Deprecated. This method assumes that the config won't change anymore. Use iterator() instead. |
Map<String,String>[] |
getSectionsWithName(String name)
Deprecated. Use getSectionsWithNameList() instead. |
List<Map<String,String>> |
getSectionsWithNameList(String name)
Gets all sections with the given name. |
Map<String,String> |
getSectionWithName(String name)
Gets the first section with the given name. |
Iterator<Map.Entry<String,Map<String,String>>> |
iterator()
Iterate through all section-Parameter pairs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private ChainedHashMap<String,Map<String,String>> mSectionList
We use no HashMap here, because two sections may have the same name.
@Deprecated private String[] sectionNames
@Deprecated private Map<String,String>[] sectionContents
Constructor Detail |
---|
public PreparatorConfig()
Method Detail |
---|
void addSection(String name, Map<String,String> content)
name
- The name of the section to add.content
- The key-value-pairs of the section to add.public int getSectionCount()
public Map<String,String> getSectionWithName(String name)
name
- The name of the sections
null
if there
is no such section.public List<Map<String,String>> getSectionsWithNameList(String name)
name
- The name of the sections
public Iterator<Map.Entry<String,Map<String,String>>> iterator()
for (Map.Entry> section : config)
{
String sectionName = section.getEntry();
Map params = section.getValue();
}
iterator
in interface Iterable<Map.Entry<String,Map<String,String>>>
@Deprecated public Map<String,String>[] getSectionsWithName(String name)
name
- The name of the sections
@Deprecated private void fillSectionCache()
@Deprecated public String getSectionName(int index)
index
- The index of the section.
@Deprecated public Map<String,String> getSectionContent(int index)
index
- The index of the section.
|
Regain 2.1.0-STABLE API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |