public class ThemeCategorizer extends Object
Modifier and Type | Field and Description |
---|---|
protected Comparator |
lexicalComparator
for sorting the theme class strings
|
protected static String |
STRING_NO_CLASS
representation of theme class for themes which belong to no type
|
protected Function<TopicIF,String> |
stringifier
Stringifier for theme class topics
|
protected Comparator |
topicComparator
for sorting the theme topics
|
Constructor and Description |
---|
ThemeCategorizer(TopicMapIF tm,
Collection context)
empty constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
generateThemeList(HashMap themeClassMap,
Collection selectedThemes,
Function<String,String> stringifierThemeClass,
Function<TopicIF,String> stringifierTheme,
Function<TopicIF,String> stringifierSelectedTheme)
Generate a ordered list of theme classes.
|
String |
generateThemeList(HashMap themeClassMap,
Collection selectedThemes,
String templThemeClass,
String templTheme,
String templSelectedTheme)
Generate a ordered list of theme classes.
|
String |
generateThemeList(HashMap themeClassMap,
Function<String,String> stringifierThemeClass,
Function<TopicIF,String> stringifierTheme)
Generate a ordered list of theme classes.
|
HashMap |
getThemeClasses(Collection themes)
process
themes and generate HashMap which
reflects theme categories. |
Function<TopicIF,String> |
getTopicStringifier()
INTERNAL: Returns the internal stringifier used to stringify
topics correctly in the current context.
|
protected static final String STRING_NO_CLASS
protected Comparator lexicalComparator
protected Comparator topicComparator
public ThemeCategorizer(TopicMapIF tm, Collection context)
public Function<TopicIF,String> getTopicStringifier()
public HashMap getThemeClasses(Collection themes)
themes
and generate HashMap which
reflects theme categories.public String generateThemeList(HashMap themeClassMap, Function<String,String> stringifierThemeClass, Function<TopicIF,String> stringifierTheme)
public String generateThemeList(HashMap themeClassMap, Collection selectedThemes, Function<String,String> stringifierThemeClass, Function<TopicIF,String> stringifierTheme, Function<TopicIF,String> stringifierSelectedTheme)
stringifierSelectedTheme
.
Note: In every theme class there are at least one theme.public String generateThemeList(HashMap themeClassMap, Collection selectedThemes, String templThemeClass, String templTheme, String templSelectedTheme)