org.activemath.learner.model
Class NoOpLM

java.lang.Object
  extended by org.activemath.learner.model.NoOpLM
All Implemented Interfaces:
LearnerModelInterface

public class NoOpLM
extends Object
implements LearnerModelInterface

implementation of LearnerModelInterface that always answers default values.


Field Summary
 
Fields inherited from interface org.activemath.learner.model.LearnerModelInterface
MASTERY_MAX, MASTERY_MIN, MASTERY_UNKNOWN
 
Constructor Summary
NoOpLM()
           
 
Method Summary
 boolean createModel(String userId)
           
 boolean destroyModel(String userId)
           
 boolean existsModel(String userId)
           
 CompetencyLevel getCompetencyLevel(String userId, String contentId)
          Must return the competency level of the given user on the specified content item.
 CompetencyLevel getCompetencyLevel(String userId, String contentId, Competency competency)
          Must return the competency level of the given user on the given content item, with respect to the specified Competency.
 CompetencyLevel getCompetencyLevelByCompetencySystem(String userId, String contentId, String competencyId, String competencySystemId)
          Same as getCompetencyLevel(String userId, String contentId), just that a specific competency system can be supplied relative to which the competency level is returned
 int getKnowledgeValue(String userId, String contentId)
          Must return a value in [0..100] (0=worst, 100=best) describing the given user's knowledge about the specified content.
 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)
          Must return an array of values in [0..100] as described in LearnerModelInterface.getKnowledgeValue(String, String), where returnedArray[i] = getKnowledgeValue(userId, listOfContentIds.get(i).
 String getName()
          Return name of the learner model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoOpLM

public NoOpLM()
Method Detail

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.

getKnowledgeValue

public int getKnowledgeValue(String userId,
                             String contentId)
Description copied from interface: LearnerModelInterface
Must return a value in [0..100] (0=worst, 100=best) describing the given user's knowledge about the specified content.
Must return (-1) if the user's knowledge about the specified content is undefined.

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:
-1

getKnowledgeValues

public int[] getKnowledgeValues(String userId,
                                List listOfContentIds)
Description copied from interface: LearnerModelInterface
Must return an array of values in [0..100] as described in LearnerModelInterface.getKnowledgeValue(String, String), where returnedArray[i] = getKnowledgeValue(userId, listOfContentIds.get(i).

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 -1

getCompetencyLevel

public CompetencyLevel getCompetencyLevel(String userId,
                                          String contentId)
Description copied from interface: LearnerModelInterface
Must return the competency level of the given user on the specified content item.

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:
null always

getCompetencyLevel

public CompetencyLevel getCompetencyLevel(String userId,
                                          String contentId,
                                          Competency competency)
Description copied from interface: LearnerModelInterface
Must return the competency level of the given user on the given content item, with respect to the specified Competency.

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:
null always

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

getCompetencyLevelByCompetencySystem

public CompetencyLevel getCompetencyLevelByCompetencySystem(String userId,
                                                            String contentId,
                                                            String competencyId,
                                                            String competencySystemId)
Description copied from interface: LearnerModelInterface
Same as getCompetencyLevel(String userId, String contentId), just that a specific competency system can be supplied relative to which the competency level is returned

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:
The user's competency level on the given content item wrt. to the specified comepetency.

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:
A value in [0..100] describing the user's knowledge about the specified content, or (-1) if it was undefined.