org.activemath.webapp.tools
Class LanguageGapController.MapBooksToItemsAndLanguages
java.lang.Object
org.activemath.webapp.tools.LanguageGapController.MapBooksToItemsAndLanguages
- Enclosing class:
- LanguageGapController
public static class LanguageGapController.MapBooksToItemsAndLanguages
- extends Object
Singleton static class to store and provide language gap information
|
Method Summary |
void |
addContentLanguagesForItem(Item item,
HashSet<String> languages)
|
void |
addItemForBook(Book book,
Item item)
|
void |
addLanguagesForBook(Book book,
List<String> languages)
|
void |
addTitleLanguagesForItem(Item item,
HashSet<String> languages)
|
void |
clearData()
|
Map<Book,List<Item>> |
getBook2Item()
Bean accessors |
HashSet<String> |
getContentLanguagesForItem(Item item)
|
static LanguageGapController.MapBooksToItemsAndLanguages |
getInstance()
|
int |
getItemReferenceCount(Item item)
Method is used in presentation to limit the number of occurences |
List<Item> |
getItemsForRecbook(Book book)
|
List<String> |
getLanguagesForRecbook(Book book)
|
Set<String> |
getMissingContentLanguagesForItem(Item item,
Book book,
String filterLanguage)
Determine an item's missing content languages in relation to the book
it is presented in |
Set<String> |
getMissingTitleLanguagesForItem(Item item,
Book book,
String filterLanguage)
Determine an item's missing title languages in relation to the book
it is presented in |
Map<Book,List<String>> |
getRecBook2LanguageList()
|
HashSet<String> |
getTitleLanguagesForItem(Item item)
|
Boolean |
isBuild()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LanguageGapController.MapBooksToItemsAndLanguages
public LanguageGapController.MapBooksToItemsAndLanguages()
clearData
public void clearData()
getInstance
public static LanguageGapController.MapBooksToItemsAndLanguages getInstance()
getItemReferenceCount
public int getItemReferenceCount(Item item)
- Method is used in presentation to limit the number of occurences
getBook2Item
public Map<Book,List<Item>> getBook2Item()
- Bean accessors
getRecBook2LanguageList
public Map<Book,List<String>> getRecBook2LanguageList()
isBuild
public Boolean isBuild()
getLanguagesForRecbook
public List<String> getLanguagesForRecbook(Book book)
addLanguagesForBook
public void addLanguagesForBook(Book book,
List<String> languages)
getItemsForRecbook
public List<Item> getItemsForRecbook(Book book)
addItemForBook
public void addItemForBook(Book book,
Item item)
getTitleLanguagesForItem
public HashSet<String> getTitleLanguagesForItem(Item item)
addTitleLanguagesForItem
public void addTitleLanguagesForItem(Item item,
HashSet<String> languages)
getContentLanguagesForItem
public HashSet<String> getContentLanguagesForItem(Item item)
addContentLanguagesForItem
public void addContentLanguagesForItem(Item item,
HashSet<String> languages)
getMissingTitleLanguagesForItem
public Set<String> getMissingTitleLanguagesForItem(Item item,
Book book,
String filterLanguage)
- Determine an item's missing title languages in relation to the book
it is presented in
- Parameters:
item - item to checkbook - book in which the item appearsfilterLanguage - only report, if the set of missing languages contains the
filterLanguage; can be either a two-letter-acronym for a
language, null or "all"
- Returns:
- a set of two-letter-acronyms of languages which are missing
in the titles of the item
getMissingContentLanguagesForItem
public Set<String> getMissingContentLanguagesForItem(Item item,
Book book,
String filterLanguage)
- Determine an item's missing content languages in relation to the book
it is presented in
- Parameters:
item - item to checkbook - book in which the item appearsfilterLanguage - only report, if the set of missing languages contains the
filterLanguage; can be either a two-letter-acronym for a
language, null or "all"
- Returns:
- a set of two-letter-acronyms of languages which are missing
in the content of the item