org.activemath.content
Class ContentCollection

java.lang.Object
  extended by org.activemath.content.ContentCollection
All Implemented Interfaces:
Comparable

public class ContentCollection
extends Object
implements Comparable

Representation of an MBase Collection


Field Summary
protected  List<String> groupingIds
           
protected static Category log
           
protected  Metadata metadata
           
protected  List<String> recBookIds
           
protected  String title
           
protected  Map<String,String> titles
           
protected static org.jdom.output.XMLOutputter xml
           
 
Method Summary
 int compareTo(Object o)
           
 boolean equals(Object o)
           
static Comparator<ContentCollection> getComparator(String lang)
          Return a Comparator for titles in a language.
 List<String> getGroupingIds()
           
 String getId()
           
 String getMbaseId()
           
 Metadata getMetadata()
           
 List<String> getRecBookIds()
           
 HashMap<String,List<String>> getStructuredItems()
           
 String getTitle()
           
 String getTitle(String lang)
          Get localized title, without fallback to default language
 String getTitle(String lang, String defaultLang)
          Get localized title, with fallback to default language
 Map<String,String> getTitleMap()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static Category log

xml

protected static org.jdom.output.XMLOutputter xml

title

protected String title

titles

protected Map<String,String> titles

metadata

protected Metadata metadata

recBookIds

protected List<String> recBookIds

groupingIds

protected List<String> groupingIds
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getMetadata

public Metadata getMetadata()

getId

public String getId()

getMbaseId

public String getMbaseId()

getRecBookIds

public List<String> getRecBookIds()

getGroupingIds

public List<String> getGroupingIds()

getTitle

public String getTitle()

getTitleMap

public Map<String,String> getTitleMap()

getTitle

public String getTitle(String lang)
Get localized title, without fallback to default language


getTitle

public String getTitle(String lang,
                       String defaultLang)
Get localized title, with fallback to default language

Parameters:
lang -
defaultLang -
Returns:
Return localized title for this Book, either in
  • requested language
  • requested default language
  • this.title, which is any title we get from mbase.getCommonName()

    getStructuredItems

    public HashMap<String,List<String>> getStructuredItems()

    compareTo

    public int compareTo(Object o)
    Specified by:
    compareTo in interface Comparable
    See Also:
    Comparable.compareTo(java.lang.Object)

    equals

    public boolean equals(Object o)
    Overrides:
    equals in class Object
    See Also:
    Object.equals(java.lang.Object)

    hashCode

    public int hashCode()
    Overrides:
    hashCode in class Object
    See Also:
    Object.hashCode()

    getComparator

    public static Comparator<ContentCollection> getComparator(String lang)
    Return a Comparator for titles in a language.