org.olat.modules.scorm.server.servermodels
Class ScoUtils

java.lang.Object
  extended by org.olat.modules.scorm.server.servermodels.ScoUtils

public final class ScoUtils
extends java.lang.Object

A utility class used for operations on CMI datamodel elements.

Author:
Paul Sharples

Constructor Summary
ScoUtils()
           
 
Method Summary
static java.lang.String addTimes(java.lang.String atotalTime, java.lang.String asessionTime)
          Utility method to add two CMITimespan values together, such as session_time and total_time from the CMI datamodel.
static int[] parseTime(java.lang.String strtime)
          Method to take in a CMITimespan string value and return an integer array of the values it contains, so that we can can perform arithmetic
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScoUtils

public ScoUtils()
Method Detail

addTimes

public static java.lang.String addTimes(java.lang.String atotalTime,
                                        java.lang.String asessionTime)
Utility method to add two CMITimespan values together, such as session_time and total_time from the CMI datamodel. Recognized formats: HHHH:MM:SS.SS HHH:MM:SS.SS HH:MM:SS.SS HHHH:MM:SS.S HHH:MM:SS.S HH:MM:SS.S HHHH:MM:SS HHH:MM:SS HH:MM:SS

Parameters:
atotalTime - - a cmi.core.total_time
asessionTime - a cmi.core.session_time
Returns:
a CMITimeSpan of the two added times. (String)

parseTime

public static int[] parseTime(java.lang.String strtime)
Method to take in a CMITimespan string value and return an integer array of the values it contains, so that we can can perform arithmetic

Parameters:
strtime - strin CMITimespan
Returns:
int array of values