org.olat.ims.qti.process
Class QTIHelper

java.lang.Object
  extended by org.olat.ims.qti.process.QTIHelper

public class QTIHelper
extends java.lang.Object


Constructor Summary
QTIHelper()
           
 
Method Summary
static float attributeToFloat(org.dom4j.Attribute att)
           
static Variables declareVariables(org.dom4j.Element el_outcomes)
           
static BooleanEvaluable getBooleanEvaluableInstance(java.lang.String name)
           
static org.dom4j.Document getDocument(LocalFileImpl pathToXml)
          give the hint if the document should be cached or not.
static ExpressionBuilder getExpressionBuilder(java.lang.String name)
           
static float getFloatAttribute(org.dom4j.Element el_root, java.lang.String xPath, java.lang.String attName)
          Method getFloatAttribute.
static int getIntAttribute(org.dom4j.Element el_root, java.lang.String xPath, java.lang.String attName)
          Method getIntAttribute.
static java.lang.String getISODuration(long duration)
          Return assessment duration in ISO8601 unspecified duration format (e.g.
static QTI_and getQTI_and()
           
static QTI_respcondition getQTI_respcondition()
           
static QTI_resprocessing getQTI_resprocessing()
           
static QTI_item getQtiItem()
           
static ScoreBooleanEvaluable getSectionBooleanEvaluableInstance(java.lang.String name)
           
static long parseISODuration(java.lang.String iso)
          Parse ISO8601 duration and return millis equivalent.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QTIHelper

public QTIHelper()
Method Detail

getQTI_resprocessing

public static QTI_resprocessing getQTI_resprocessing()
Returns:

getQTI_respcondition

public static QTI_respcondition getQTI_respcondition()

getQTI_and

public static QTI_and getQTI_and()

getBooleanEvaluableInstance

public static BooleanEvaluable getBooleanEvaluableInstance(java.lang.String name)
Parameters:
name -
Returns:

getSectionBooleanEvaluableInstance

public static ScoreBooleanEvaluable getSectionBooleanEvaluableInstance(java.lang.String name)
Parameters:
name -
Returns:

getExpressionBuilder

public static ExpressionBuilder getExpressionBuilder(java.lang.String name)

getQtiItem

public static QTI_item getQtiItem()
Returns:
QTI_item

parseISODuration

public static long parseISODuration(java.lang.String iso)
Parse ISO8601 duration and return millis equivalent. Durations are preceeded by a 'P' character. Followed by year(Y), month(M), day(D), hour(H), minutes(M) and second(S). Time components (HMS) are preceeded by a 'T' character. (e.g. P0Y0M1DT3H15M2S -> 1 day, 3 hours, 15 minutes, 2 seconds PT15M30S -> 15 minutes, 30 seconds.

Returns:
millis representing ISO duration

getISODuration

public static java.lang.String getISODuration(long duration)
Return assessment duration in ISO8601 unspecified duration format (e.g. P0Y0M1DT3H15M2S -> 1 day, 3 hours, 15 minutes, 2 seconds)

Returns:
The string representation in ISO8601 format.

declareVariables

public static Variables declareVariables(org.dom4j.Element el_outcomes)

attributeToFloat

public static float attributeToFloat(org.dom4j.Attribute att)

getIntAttribute

public static int getIntAttribute(org.dom4j.Element el_root,
                                  java.lang.String xPath,
                                  java.lang.String attName)
Method getIntAttribute.

Parameters:
el_outpro -
string -
string1 -
Returns:
int

getFloatAttribute

public static float getFloatAttribute(org.dom4j.Element el_root,
                                      java.lang.String xPath,
                                      java.lang.String attName)
Method getFloatAttribute.

Parameters:
el_outpro -
string -
string1 -
Returns:
float

getDocument

public static org.dom4j.Document getDocument(LocalFileImpl pathToXml)
give the hint if the document should be cached or not.

Parameters:
pathToXml -
useCache -
Returns:
See Also:
getDocument(LocalFileImpl)