org.activemath.studentmodel2
Class SatelliteHelper

java.lang.Object
  extended by org.activemath.studentmodel2.SatelliteHelper

public class SatelliteHelper
extends Object

This class automatically extracts and caches relations between Satellite Items and concepts/other satellites. Relations are extracted on demand and then cached, similarly as in the PropagationHelper class. TODO: add listener process to invalidate cached objects upon changes in the content


Field Summary
protected static Category log
           
 
Method Summary
 List<String> getFors(String satelliteId)
          Get a cyclic-free version of fors for the satellite
static SatelliteHelper getInstance()
          Get an instance of the SatelliteHelper
 int getSatelliteMastery(String itemId, AssessmentModel assessmentModel)
          Get the mastery for a specific satellite (it is calculated by averaging all existing contributing masteries)
 Map<String,Integer> getSatelliteMasteryComponents(String itemId, AssessmentModel assessmentModel)
          Get all concepts with their masteries, which contribute to the given satellite mastery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Category log
Method Detail

getInstance

public static SatelliteHelper getInstance()
Get an instance of the SatelliteHelper

Returns:
The instance

getFors

public List<String> getFors(String satelliteId)
Get a cyclic-free version of fors for the satellite

Parameters:
satelliteId - - the satellite
Returns:
a List of direct fors

getSatelliteMastery

public int getSatelliteMastery(String itemId,
                               AssessmentModel assessmentModel)
Get the mastery for a specific satellite (it is calculated by averaging all existing contributing masteries)

Parameters:
itemId - - ID of the satellite
assessmentModel - - The assessmentModel of a user
Returns:
The satellite mastery

getSatelliteMasteryComponents

public Map<String,Integer> getSatelliteMasteryComponents(String itemId,
                                                         AssessmentModel assessmentModel)
Get all concepts with their masteries, which contribute to the given satellite mastery

Parameters:
itemId - - the satelliteId
assessmentModel - - the assessment model of the respective user to calculate the masteries for
Returns:
A Map where the key is a concept and the value is the mastery