org.activemath.exercises.model
Class PresentationBlock

java.lang.Object
  extended by org.activemath.exercises.model.PresentationBlock

public class PresentationBlock
extends Object

This class represents a single block of content to be presented to an user. The content can be both static and interactive, this means that the static content comprised a text only and interactive content comprised interactive components such as blanks, selections or mappings. Content can be represented in different languages, each of that is the same content.


Field Summary
static String LANG_ALL
           
static String LANG_DE
           
static String LANG_EN
           
static String LANG_ES
           
static String LANG_FR
           
static String LANG_RU
           
static String TYPE_BLANK
           
static String TYPE_MAPPING
           
static String TYPE_SELECTION
           
static String TYPE_TEXT
           
 
Constructor Summary
PresentationBlock()
           
 
Method Summary
 void addContent(String language, org.jdom.Element content)
           
 org.jdom.Element getContent(String language)
           
 int getInputSize()
           
 List getLanguages()
           
 String getType()
           
 boolean hasLanguage(String language)
           
 org.jdom.Element replaceBlanksByBlanksInFormula(org.jdom.Element omobj)
          "revers" @link replaceBlanksInFormulaByBlanks
 org.jdom.Element replaceBlanksInFormulaByBlanks(org.jdom.Element omobj)
          OpenMath expression like
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LANG_EN

public static final String LANG_EN
See Also:
Constant Field Values

LANG_DE

public static final String LANG_DE
See Also:
Constant Field Values

LANG_ES

public static final String LANG_ES
See Also:
Constant Field Values

LANG_FR

public static final String LANG_FR
See Also:
Constant Field Values

LANG_RU

public static final String LANG_RU
See Also:
Constant Field Values

LANG_ALL

public static final String LANG_ALL
See Also:
Constant Field Values

TYPE_TEXT

public static final String TYPE_TEXT
See Also:
Constant Field Values

TYPE_BLANK

public static final String TYPE_BLANK
See Also:
Constant Field Values

TYPE_SELECTION

public static final String TYPE_SELECTION
See Also:
Constant Field Values

TYPE_MAPPING

public static final String TYPE_MAPPING
See Also:
Constant Field Values
Constructor Detail

PresentationBlock

public PresentationBlock()
Method Detail

addContent

public void addContent(String language,
                       org.jdom.Element content)
Parameters:
language - of content to be added
content - to be added

getContent

public org.jdom.Element getContent(String language)
Parameters:
language - of content to be returned
Returns:
content associated with specified language

getLanguages

public List getLanguages()
Returns:
a list of presented languages

getInputSize

public int getInputSize()
Returns:
a number of expected user inputs. It is a sum of "blanks" and "choices" presented in this block for the first language (divided by number of presented languages).

getType

public String getType()
Returns:
the type of this presentation block.

hasLanguage

public boolean hasLanguage(String language)
Parameters:
language -
Returns:
true, if this block contains specified language.

replaceBlanksInFormulaByBlanks

public org.jdom.Element replaceBlanksInFormulaByBlanks(org.jdom.Element omobj)
OpenMath expression like will be replaced by Needed for interpreter.

Parameters:
omobj -
Returns:
the same instance of omobj.

replaceBlanksByBlanksInFormula

public org.jdom.Element replaceBlanksByBlanksInFormula(org.jdom.Element omobj)
"revers" @link replaceBlanksInFormulaByBlanks

Parameters:
omobj -
Returns:
omobj