org.activemath.content
Class Grouping

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

public class Grouping
extends Object
implements Comparable

Representation of an Omdoc grouping (omgroup) used for course generation.


Field Summary
protected  ArrayList conceptList
           
protected static Category log
           
protected  Metadata metadata
           
protected  String title
           
protected  Map titles
           
protected static org.jdom.output.XMLOutputter xml
           
 
Method Summary
 int compareTo(Object o)
           
static Grouping create(String id, String mbaseId)
          Creates a new grouping for the given mbase ID
 boolean equals(Object o)
           
 List getConceptList()
          Return list of concept items for this Grouping.
protected  OJElement getGroupingElement()
          Return list of concept items for this Grouping.
 String getId()
           
 String getMbaseId()
           
 Metadata getMetadata()
           
 String getTitle()
           
 String getTitle(String lang)
          Get localized Book title, without fallback to default language
 String getTitle(String lang, String defaultLang)
          Get localized title, with fallback to default language
 Map getTitleMap()
           
 Toc getToc()
          get the TOC of this grouping
 int hashCode()
           
 void setTitle(String string)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static Category log

title

protected String title

titles

protected Map titles

xml

protected static org.jdom.output.XMLOutputter xml

conceptList

protected ArrayList conceptList

metadata

protected Metadata metadata
Method Detail

create

public static Grouping create(String id,
                              String mbaseId)
Creates a new grouping for the given mbase ID


toString

public String toString()
Overrides:
toString in class Object

getMetadata

public Metadata getMetadata()
Returns:
metadata object for this item

getId

public String getId()

getMbaseId

public String getMbaseId()

getTitle

public String getTitle()

setTitle

public void setTitle(String string)

getTitleMap

public Map getTitleMap()

getTitle

public String getTitle(String lang)
Get localized Book 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()

    getToc

    public Toc getToc()
    get the TOC of this grouping

    Returns:
    the TOC of this Grouping

    getConceptList

    public List getConceptList()
    Return list of concept items for this Grouping.

    Need to synchronize access as this function as it calls buildConceptList().

    Returns:
    List of Items

    getGroupingElement

    protected OJElement getGroupingElement()
    Return list of concept items for this Grouping.

    Need to synchronize access as this function as it calls buildConceptList().

    Returns:
    DOM element defining this grouping

    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()