org.activemath.abstractcontent
Interface AbstractStudentModel

All Known Subinterfaces:
AbstractUserModel
All Known Implementing Classes:
UserModelAdapter

public interface AbstractStudentModel

This interface has to be implemented by any class that is claiming to be a student model for activemath.


Method Summary
 void addBook(String user, org.jdom.Document book)
          Attaches a Document representing a user-generated book to the given user.
 int addToHistory(String string, String[] itemIds, String page, String type, long start, int duration, double success, String session)
          Temporary method needed for the connection to the history in the userModel server.
 boolean alreadySeen(String userId, String con)
          tells wether the user has already seen the given item.
 void createNewUser(Hashtable hashtable)
          creates a new user from the given Hashtable.
 boolean doesUserExist(String user)
          checks if there is a student model for the student with login name user.
 Map getBooks(String user)
          Fetches a Map of all books attached to the given user
 Vector getConceptsKnown(String user)
          gets a Vector containing the MBase IDs of all Items the user has a mastery assessment for.
 Hashtable getJustificatingSteps(String user, String concept)
          gets a Hashtable containing the history elements responsible for the mastery assessment of the given concept, keyed by their id.
 Hashtable getKnowledge(String userID, String mBaseID)
          fetches a Hashtable from the studentmodel containing the students mastery values for the supplied concept.
 Date getLastTimeSeen(String userID, String mBaseID)
          gets the Date of the last time the given Item has been seen by the student.
 double getMastery(String userID, String mBaseID)
          gets the student's mastery value for the given item.
 Hashtable getMultipleKnowledge(String userID, Vector mBaseIDs)
          gets a Hashtable containing the supplied mBaseIds as keys, and the corresponding mastery Hashtable as Value as returned by getKnowledge(java.lang.String, java.lang.String).
 Hashtable getProperties(String userId)
          gets the Hashtable containing all the properties stored in the um for the user with login userId.
 String getProperty(String userId, String propertyName)
          gets the value of the requested property for the supplied user as a String.
 List getUserList()
          returns the list of all existing user ids
 void incrementTimesSeen(String userId, String itemId)
          Increments the number of Times an element has been seen
 void logout(String userId)
          log out the given user
 void removeBook(String user, String bookId)
          Removed the given user-generated book from the user.
 boolean removeUser(String userId)
          Deletes the given user from the userModel server
 void setKnowledge(String userID, String mBaseID, Hashtable bloomProps)
          sets user userID's mastery assessment for the given mBaseID to the supplied Hashtable.
 void setProperty(String userId, String propertyName, String value)
          sets the property for the user userId to the supplied key-value pair.
 void update(String userId, String itemId, Map newAssessment, String historyId)
          Temporary: Connectivity for the UM-internal update method.
 

Method Detail

getProperties

Hashtable getProperties(String userId)
gets the Hashtable containing all the properties stored in the um for the user with login userId. (SM)

Parameters:
userId - the login id of the user whose properties to fetch.
Returns:
the Hashtable containing all the user's properties.
See Also:
getProperty(String,String), setProperty(String,String,String)

getProperty

String getProperty(String userId,
                   String propertyName)
gets the value of the requested property for the supplied user as a String. (SM)

Parameters:
userId - the login name of the user to get the property for
propertyName - the name of the property to get the value of
Returns:
the value of the given property as a String
See Also:
getProperties(String), setProperty(String, String, String)

setProperty

void setProperty(String userId,
                 String propertyName,
                 String value)
sets the property for the user userId to the supplied key-value pair. (SM)

Parameters:
userId - the login of the user to set the property for
propertyName - the name of the property to set
value - the value to assign to the property
See Also:
getProperty(String,String), getProperties(String)

getKnowledge

Hashtable getKnowledge(String userID,
                       String mBaseID)
fetches a Hashtable from the studentmodel containing the students mastery values for the supplied concept. For information about our implementation, see org.activemath.studentmodel.StudentModelFacade#getKnowledge(String, String).(SM)

Parameters:
userID - the login of the user to get the mastery assessment for
mBaseID - the MBase ID of the concept to get the mastery assessment for.
Returns:
a Hashtable containing the mastery assessment for the given userID
See Also:
getMultipleKnowledge(String,Vector), setKnowledge(String,String,Hashtable), getMastery(String,String), org.activemath.studentmodel.ModelCentral#getKnowledge(String,String), org.activemath.studentmodel.KnowledgeAtomImpl

getMultipleKnowledge

Hashtable getMultipleKnowledge(String userID,
                               Vector mBaseIDs)
gets a Hashtable containing the supplied mBaseIds as keys, and the corresponding mastery Hashtable as Value as returned by getKnowledge(java.lang.String, java.lang.String).(SM)

Parameters:
userID - the login of the user to get the assessments for
mBaseIDs - a Vector containing MBaseIDs to fetch the user's mastery assessment for.
Returns:
a Hashtable containing the mastery assessments for the supplied mBaseIDs (which are strings).
See Also:
getKnowledge(String,String), setKnowledge(String,String,Hashtable), getMastery(String,String), org.activemath.studentmodel.ModelCentral#getMultipleKnowledge(String,Vector), org.activemath.studentmodel.KnowledgeAtomImpl

setKnowledge

void setKnowledge(String userID,
                  String mBaseID,
                  Hashtable bloomProps)
sets user userID's mastery assessment for the given mBaseID to the supplied Hashtable. The Hashtable must have the structure like those returned by getKnowledge(String,String).(SM)

Parameters:
userID - the login of the user to set the mastery assessment for
mBaseID - the MBase Id of the item to set the mastery assessment for
bloomProps - the Hashtable containing the mastery assessment that is to be set.
See Also:
getKnowledge(String,String), getMultipleKnowledge(String,Vector), getMastery(String,String), org.activemath.studentmodel.ModelCentral#setKnowledge(String,String,Hashtable), org.activemath.studentmodel.KnowledgeAtomImpl

getMastery

double getMastery(String userID,
                  String mBaseID)
gets the student's mastery value for the given item. mastery value means just one double between 0 and 1, representing how good the user masters this concept.(SM)

Parameters:
userID - the login name of the user to get the mean value for
mBaseID - the id of the item to get the mastery for.
Returns:
a double representing the student's mastery for the given item.
See Also:
getKnowledge(String,String), getMultipleKnowledge(String,Vector), setKnowledge(String,String,Hashtable), org.activemath.studentmodel.KnowledgeAtomImpl

alreadySeen

boolean alreadySeen(String userId,
                    String con)
tells wether the user has already seen the given item.(SM)

Parameters:
userId - the login name of the student to check
con - the MBase ID of the item to check
Returns:
true if the user has already seen the concept
See Also:
org.activemath.studentmodel.ModelCentral#getTimesSeen(String,String)

getLastTimeSeen

Date getLastTimeSeen(String userID,
                     String mBaseID)
gets the Date of the last time the given Item has been seen by the student.(SM)

Parameters:
userID - the login name of the student
mBaseID - the MBase ID of the Item.
Returns:
the Date of the last time the item has been seen by the student.
See Also:
alreadySeen(String,String)

createNewUser

void createNewUser(Hashtable hashtable)
                   throws ModelExistsException
creates a new user from the given Hashtable. It has to be in the form specified by the student model component.(SM)

Parameters:
hashtable - the Hashtable containing the information needed to create the model
Throws:
ModelExistsException - if the requested name(contained in the Hashtable) is already in use
See Also:
org.activemath.studentmodel.ModelCentral#createNewUser(Hashtable)

doesUserExist

boolean doesUserExist(String user)
checks if there is a student model for the student with login name user.(SM)

Parameters:
user - the username to check
Returns:
true if such a student model already exists
See Also:
org.activemath.studentmodel.ModelCentral#doesUserExist

getJustificatingSteps

Hashtable getJustificatingSteps(String user,
                                String concept)
gets a Hashtable containing the history elements responsible for the mastery assessment of the given concept, keyed by their id.(SM)

Parameters:
user - the login name of the user
concept - the MBase ID of the Item to get the justification for

getConceptsKnown

Vector getConceptsKnown(String user)
gets a Vector containing the MBase IDs of all Items the user has a mastery assessment for.

Parameters:
user - the login of the user
Returns:
the Vector containing the IDs of all the items known to the user
See Also:
org.activemath.studentmodel.ModelCentral#getConceptsKnown(String), getKnowledge(String,String), getMultipleKnowledge(String,Vector), getMastery(String, String), setKnowledge(String,String,Hashtable)

addBook

void addBook(String user,
             org.jdom.Document book)
Attaches a Document representing a user-generated book to the given user.

Parameters:
user - the user to attach the book to
book - the book as a Document.

removeBook

void removeBook(String user,
                String bookId)
Removed the given user-generated book from the user.

Parameters:
user - the user to remove the book from
bookId - the id of the book to remove

getBooks

Map getBooks(String user)
Fetches a Map of all books attached to the given user

Parameters:
user - the user id to get the books for.
Returns:
a Map containing the given user's books, keys are the ids, values are the content as String.

update

void update(String userId,
            String itemId,
            Map newAssessment,
            String historyId)
Temporary: Connectivity for the UM-internal update method.

Parameters:
userId - The id of the user to update the model for
itemId - the id of the item to update the mastery assessment of
newAssessment - the new mastery assessment to set
historyId - the id of the history item that justifies the update

addToHistory

int addToHistory(String string,
                 String[] itemIds,
                 String page,
                 String type,
                 long start,
                 int duration,
                 double success,
                 String session)
Temporary method needed for the connection to the history in the userModel server.

Parameters:
string -
itemIds -
page -
type -
start -
duration -
success -

removeUser

boolean removeUser(String userId)
Deletes the given user from the userModel server

Parameters:
userId - The id of the user to remove
Returns:
true if the user could be successfully removed

incrementTimesSeen

void incrementTimesSeen(String userId,
                        String itemId)
Increments the number of Times an element has been seen

Parameters:
userId - the id of the user
itemId - the mbase id of the item.

logout

void logout(String userId)
log out the given user


getUserList

List getUserList()
returns the list of all existing user ids

Returns:
the list of all existing user ids