org.activemath.webapp.tools.data
Class GapDetectionLM

java.lang.Object
  extended by org.activemath.webapp.tools.data.GapDetectionLM
All Implemented Interfaces:
LearnerModelInterface

public class GapDetectionLM
extends Object
implements LearnerModelInterface

Implementation of LearnerModelInterface that answers values specified during a gap detection run for course generation .


Field Summary
protected static Logger log
          The logger for this class
 
Fields inherited from interface org.activemath.learner.model.LearnerModelInterface
MASTERY_MAX, MASTERY_MIN, MASTERY_UNKNOWN
 
Constructor Summary
GapDetectionLM()
          Constructor for interface instantiation by reflection
GapDetectionLM(User user)
          Main constructor
 
Method Summary
 boolean createModel(String userId)
           
 boolean destroyModel(String userId)
           
 boolean existsModel(String userId)
           
 CompetencyLevel getCompetencyLevel(String userId, String contentId)
          CompetencyLevel is an aggregate of LeAM competencies
 CompetencyLevel getCompetencyLevel(String userId, String contentId, Competency competency)
          CompetencyLevel is an aggregate of LeAM competencies
 CompetencyLevel getCompetencyLevelByCompetencySystem(String userId, String contentId, String competencyId, String competencySystemId)
          CompetencyLevel is an aggregate of LeAM competencies
 int getDefaultMastery()
           
 int getKnowledgeValue(String userId, String contentId)
          knowledge value = mastery returns the default mastery, if set
 int getKnowledgeValueByCompetencySystem(String userId, String contentId, String competency, String competencySystemId)
          Same as getKnowledgeValue(String userId, String contentId), just that a specific competency system can be supplied relative and a competency to which the knowledge value is returned.
 int[] getKnowledgeValues(String userId, List listOfContentIds)
          knowledge value = mastery returns the default mastery, if set, for every item
 Float getLearningDevelopement()
           
 String getName()
          Return name of the learner model.
 void setDefaultMastery(int defaultMastery)
           
 void setLearningDevelopement(Float learningDevelopement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Logger log
The logger for this class

Constructor Detail

GapDetectionLM

public GapDetectionLM(User user)
Main constructor

Parameters:
user - the userId of the tutor user who started the gap detection data for learning development, default mastery and default competency

GapDetectionLM

public GapDetectionLM()
Constructor for interface instantiation by reflection

Method Detail

getKnowledgeValue

public int getKnowledgeValue(String userId,
                             String contentId)
knowledge value = mastery returns the default mastery, if set

Specified by:
getKnowledgeValue in interface LearnerModelInterface
Parameters:
userId - The id of the user to get the knowledge value of
contentId - The id of the piece of content to get the knowledge value of.
Returns:
default mastery

getKnowledgeValues

public int[] getKnowledgeValues(String userId,
                                List listOfContentIds)
knowledge value = mastery returns the default mastery, if set, for every item

Specified by:
getKnowledgeValues in interface LearnerModelInterface
Parameters:
userId - The id of the user to get the knowledge values of
listOfContentIds - a List containing the ids of the pieces of content to get the knowledge value of
Returns:
an array of default masteries

getCompetencyLevel

public CompetencyLevel getCompetencyLevel(String userId,
                                          String contentId)
CompetencyLevel is an aggregate of LeAM competencies

Specified by:
getCompetencyLevel in interface LearnerModelInterface
Parameters:
userId - The user to get the competency level of
contentId - The id of the content item to get the competency level of
Returns:
default competency level, if set

getCompetencyLevel

public CompetencyLevel getCompetencyLevel(String userId,
                                          String contentId,
                                          Competency competency)
CompetencyLevel is an aggregate of LeAM competencies

Specified by:
getCompetencyLevel in interface LearnerModelInterface
Parameters:
userId - The id of the user to get the competency level of
contentId - The if of the piece of content to get the competency level of
competency - The target competency
Returns:
default competency level, if set

getCompetencyLevelByCompetencySystem

public CompetencyLevel getCompetencyLevelByCompetencySystem(String userId,
                                                            String contentId,
                                                            String competencyId,
                                                            String competencySystemId)
CompetencyLevel is an aggregate of LeAM competencies

Specified by:
getCompetencyLevelByCompetencySystem in interface LearnerModelInterface
Parameters:
userId - The id of the user to get the competency level of
contentId - The if of the piece of content to get the competency level of
competencySystemId - - the Id of the competency system for which the knowledge values (KV) shall be returned, e.g. return the KVs for "apply" and "model" competencies of the PISA system - competencySystemId would hold "PISA".
Returns:
default competency level, if set

getKnowledgeValueByCompetencySystem

public int getKnowledgeValueByCompetencySystem(String userId,
                                               String contentId,
                                               String competency,
                                               String competencySystemId)
Description copied from interface: LearnerModelInterface
Same as getKnowledgeValue(String userId, String contentId), just that a specific competency system can be supplied relative and a competency to which the knowledge value is returned.

Specified by:
getKnowledgeValueByCompetencySystem in interface LearnerModelInterface
Parameters:
userId - The id of the user to get the knowledge value of
contentId - The id of the piece of content to get the knowledge value of.
competency - The target competency
competencySystemId - - the Id of the competency system for which the knowledge values (KV) shall be returned, e.g. return the KVs for "apply" and "model" competencies of the PISA system - competencySystemId would hold "PISA".
Returns:
Return default mastery

getDefaultMastery

public int getDefaultMastery()

setDefaultMastery

public void setDefaultMastery(int defaultMastery)

getLearningDevelopement

public Float getLearningDevelopement()

setLearningDevelopement

public void setLearningDevelopement(Float learningDevelopement)

createModel

public boolean createModel(String userId)
Specified by:
createModel in interface LearnerModelInterface

destroyModel

public boolean destroyModel(String userId)
Specified by:
destroyModel in interface LearnerModelInterface

existsModel

public boolean existsModel(String userId)
Specified by:
existsModel in interface LearnerModelInterface

getName

public String getName()
Description copied from interface: LearnerModelInterface
Return name of the learner model. This value can be used to create the model at the LearnerModelProvider.

Specified by:
getName in interface LearnerModelInterface
Returns:
The name of this learner model.