mauda
Class MetaData

java.lang.Object
  extended by mauda.MetaData

public class MetaData
extends java.lang.Object

Stores meta-data of exercises.

Author:
Markus Krebs

Field Summary
static int ALL
          Allow inputs on all fields in the meta-data
static int CREATOR
          Allow inputs only to the Creator-Field (Creator of the exercise)
static int EDITOR
          Allow inputs only to the Editor-Field (Student who work on the exercise)
static int EVALUATOR
          Allow inputs only to the Evaluator-Field (Tutor who evaluated the exercise)
 
Constructor Summary
MetaData()
          Creates a MetaData-Object
 
Method Summary
 void actualizeEditorDate()
          Actualizes the date/time of processing the exercise
 void actualizeEvaluatorDate()
          Actualizes the date/time of processing the exercise
 int getDifficulty()
          Gets the difficulty of the exercise
static int getDisplayMode()
          Gets the display-mode
 java.lang.String getEditorFeedback()
          Gets the type of feedback the student chosen
 java.lang.String getEditorState()
          Gets the current working-state of the editor
 java.lang.String getEvaluatorJEAFilename()
          Gets the filename of the jedas-recording-animation-file
 java.lang.String getEvaluatorName()
          Gets the name of the evaluator
 java.lang.String getEvaluatorState()
          Gets the current evaluation-state
 int getMode()
          Gets the mode of the exercise
 java.lang.String getPreviewString()
          Returns a string-representation of this meta-data, which can be used e.g. in the filechooses's preview-panel.
 java.lang.String getType()
          Gets the type of the exercise
 boolean inputDialog()
          Displays an input-dialog-window, where the user can input several values.
 void load(java.lang.Object o)
          Fills this meta-data-object with values from HashMap- representation of the meta-data.
 java.util.HashMap save()
          Converts the meta-data in a format for saving-purposes
 void setComment(java.lang.String c)
          Sets a comment the creator has for this exercise
 void setDifficulty(int d)
          Sets the diffculty of the exercise
static void setDisplayMode(int m)
          Sets the display-mode.
 void setEditorFeedback(java.lang.String s)
          Sets the type of feedback the student chosen
 void setEditorName(java.lang.String n)
          Sets the name of the student who works on the exercise
 void setEditorState(java.lang.String s)
          Sets the current working-state of the editor
 void setEvaluatorJEAFilename(java.lang.String s)
          Sets the filename of the jedas-recording-animation-file, that the current exercise is associated to.
 void setEvaluatorName(java.lang.String s)
          Sets the name of the person who evaluated the exercise.
 void setEvaluatorScore(java.lang.String s)
          Sets the reached score of an evaluated exercise.
 void setEvaluatorState(java.lang.String s)
          Sets the current evaluation-state of the exercise
 void setInitRating(int r)
          Sets the rating of the init-operations
 void setMode(int m)
          Sets the mode of the exercise, e.g.
 void setSource(java.lang.String s)
          Sets the Creator-Name of the exercise, e.g.
 void setTodoRating(int r)
          Sets the rating of the todo-operations
 void setType(java.lang.String t)
          Sets the type of the exercise, e.g.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL

public static final int ALL
Allow inputs on all fields in the meta-data

See Also:
Constant Field Values

CREATOR

public static final int CREATOR
Allow inputs only to the Creator-Field (Creator of the exercise)

See Also:
Constant Field Values

EDITOR

public static final int EDITOR
Allow inputs only to the Editor-Field (Student who work on the exercise)

See Also:
Constant Field Values

EVALUATOR

public static final int EVALUATOR
Allow inputs only to the Evaluator-Field (Tutor who evaluated the exercise)

See Also:
Constant Field Values
Constructor Detail

MetaData

public MetaData()
Creates a MetaData-Object

Method Detail

setDisplayMode

public static void setDisplayMode(int m)
Sets the display-mode.

Parameters:
m -
See Also:
ALL, CREATOR, EDITOR, EVALUATOR

getDisplayMode

public static int getDisplayMode()
Gets the display-mode

Returns:
display-mode-ID
See Also:
setDisplayMode(int)

getPreviewString

public java.lang.String getPreviewString()
Returns a string-representation of this meta-data, which can be used e.g. in the filechooses's preview-panel.

Returns:
string-representation of this meta-data

setType

public void setType(java.lang.String t)
Sets the type of the exercise, e.g. Fibonacci-Heap

Parameters:
t - plugin-type-name

getType

public java.lang.String getType()
Gets the type of the exercise

Returns:
type of exercise

setDifficulty

public void setDifficulty(int d)
Sets the diffculty of the exercise

Parameters:
d - difficulty-ID
See Also:
Difficulties

getDifficulty

public int getDifficulty()
Gets the difficulty of the exercise

Returns:
difficulty-id

setMode

public void setMode(int m)
Sets the mode of the exercise, e.g. NORMAL or FAULT

Parameters:
m - mode-ID
See Also:
ExerciseMode

getMode

public int getMode()
Gets the mode of the exercise

Returns:
mode-ID

setSource

public void setSource(java.lang.String s)
Sets the Creator-Name of the exercise, e.g. AutoGenerator, Tutorname, etc.

Parameters:
s - Creator-Name

setInitRating

public void setInitRating(int r)
Sets the rating of the init-operations

Parameters:
r - Overall-rating of the init-operations

setTodoRating

public void setTodoRating(int r)
Sets the rating of the todo-operations

Parameters:
r - Overall-rating of the todo-operations

setComment

public void setComment(java.lang.String c)
Sets a comment the creator has for this exercise

Parameters:
c - comment

setEditorName

public void setEditorName(java.lang.String n)
Sets the name of the student who works on the exercise

Parameters:
n - student-name

actualizeEditorDate

public void actualizeEditorDate()
Actualizes the date/time of processing the exercise


setEditorState

public void setEditorState(java.lang.String s)
Sets the current working-state of the editor

Parameters:
s - working-state: "unworked", "in process" or "completed"

getEditorState

public java.lang.String getEditorState()
Gets the current working-state of the editor

Returns:
working-state
See Also:
setEditorState(String)

setEditorFeedback

public void setEditorFeedback(java.lang.String s)
Sets the type of feedback the student chosen

Parameters:
s - Feedback-Type-String

getEditorFeedback

public java.lang.String getEditorFeedback()
Gets the type of feedback the student chosen

Returns:
Feedback-Type-String

setEvaluatorName

public void setEvaluatorName(java.lang.String s)
Sets the name of the person who evaluated the exercise. Setting to "AutoEvaluator" means that the exercise was automatically evaluated by the programm.

Parameters:
s - Evaluator-Name

getEvaluatorName

public java.lang.String getEvaluatorName()
Gets the name of the evaluator

Returns:
Evaluator-name

actualizeEvaluatorDate

public void actualizeEvaluatorDate()
Actualizes the date/time of processing the exercise


setEvaluatorState

public void setEvaluatorState(java.lang.String s)
Sets the current evaluation-state of the exercise

Parameters:
s - evaluation-state: "not evaluated" or "evaluated"

getEvaluatorState

public java.lang.String getEvaluatorState()
Gets the current evaluation-state

Returns:
evaluation-state
See Also:
setEvaluatorState(String)

setEvaluatorScore

public void setEvaluatorScore(java.lang.String s)
Sets the reached score of an evaluated exercise. Normally this field have to filled with x of 100, e.g. 89.0 of 100

Parameters:
s - reached score

setEvaluatorJEAFilename

public void setEvaluatorJEAFilename(java.lang.String s)
Sets the filename of the jedas-recording-animation-file, that the current exercise is associated to.

Parameters:
s - jedas-recorder-animation-filename

getEvaluatorJEAFilename

public java.lang.String getEvaluatorJEAFilename()
Gets the filename of the jedas-recording-animation-file

Returns:
filename of the jedas-recording-animation-file

save

public java.util.HashMap save()
Converts the meta-data in a format for saving-purposes

Returns:
HashMap-representation of the meta-data

load

public void load(java.lang.Object o)
Fills this meta-data-object with values from HashMap- representation of the meta-data. This is used for loading meta-data from a xml-file.

Parameters:
o - HashMap-representation of meta-data

inputDialog

public boolean inputDialog()
Displays an input-dialog-window, where the user can input several values. The write access to different fields might be denied which depends on the display-mode of the meta-data.

Returns:
true if Meta-Data have been changed, false otherwise
See Also:
setDisplayMode(int)