Class ThemeCategorizer
java.lang.Object
net.ontopia.topicmaps.nav.context.ThemeCategorizer
INTERNAL: Class for categorizing a collection of themes according to
their theme class. The theme classes as well as the themes in each
theme class could be sorted.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Comparatorfor sorting the theme class stringsprotected static final Stringrepresentation of theme class for themes which belong to no typeStringifier for theme class topicsprotected Comparatorfor sorting the theme topics -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateThemeList(HashMap themeClassMap, Collection selectedThemes, String templThemeClass, String templTheme, String templSelectedTheme) Generate a ordered list of theme classes.generateThemeList(HashMap themeClassMap, Collection selectedThemes, Function<String, String> stringifierThemeClass, Function<TopicIF, String> stringifierTheme, Function<TopicIF, String> stringifierSelectedTheme) Generate a ordered list of theme classes.generateThemeList(HashMap themeClassMap, Function<String, String> stringifierThemeClass, Function<TopicIF, String> stringifierTheme) Generate a ordered list of theme classes.getThemeClasses(Collection themes) processthemesand generate HashMap which reflects theme categories.INTERNAL: Returns the internal stringifier used to stringify topics correctly in the current context.
-
Field Details
-
STRING_NO_CLASS
representation of theme class for themes which belong to no type- See Also:
-
stringifier
Stringifier for theme class topics -
lexicalComparator
for sorting the theme class strings -
topicComparator
for sorting the theme topics
-
-
Constructor Details
-
ThemeCategorizer
empty constructor.
-
-
Method Details
-
getTopicStringifier
INTERNAL: Returns the internal stringifier used to stringify topics correctly in the current context. -
getThemeClasses
processthemesand generate HashMap which reflects theme categories.- Returns:
- HashMap which contains as keys Strings of the theme type that lead to HasSet objects. These store TopicIF objects for the themes.
-
generateThemeList
public String generateThemeList(HashMap themeClassMap, Function<String, String> stringifierThemeClass, Function<TopicIF, String> stringifierTheme) Generate a ordered list of theme classes. Note: In every theme class there are at least one theme. -
generateThemeList
public 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. The themes which are found in the collection of selectedThemes use their own stringifierstringifierSelectedTheme. Note: In every theme class there are at least one theme. -
generateThemeList
public String generateThemeList(HashMap themeClassMap, Collection selectedThemes, String templThemeClass, String templTheme, String templSelectedTheme) Generate a ordered list of theme classes. Use template strings to render result string, this approach is used by the navigator framework 2nd generation. Note: In every theme class there are at least one theme.
-