public abstract class ExternalAnswer<V extends ExternalAnswerValue<R>,R extends ExternalResponseValue> extends Answer<ExternalAnswerValuePart,V,R>
Constructor and Description |
---|
ExternalAnswer(java.lang.String classType,
java.lang.String uid) |
Modifier and Type | Method and Description |
---|---|
AnswerEvalType |
getAnswerType()
Returns the evaluation type for this answer.
|
java.lang.String |
getAnswerValue()
Returns the data value for this answer.
|
ExternalAnswerValuePart |
getValuePart()
Returns the single value part for this answer.
|
protected boolean |
isMatch(R response,
java.util.Map<java.lang.String,java.lang.String> args)
Determines whether the provided response (that is to say the student's response to a question)
matches this Answer.
|
void |
validate()
Check this object's data for inconsistencies
Subclasses must (by informal contract) implement this method!
|
getBuggyMessage, getIsCorrect, getTeacherValue, isCorrect, isMatchDefault, preventIsMatch, setBuggyMessage, setCorrect, setTeacherValue, toString
getDescription, getName, setDescription, setName
createKey, createKey, equals, extractType, extractUID, getKey, getShortKey, getShortKey, getType, getUID, getValidatorUtilities, setValidatorUtilities, validateKey
public ExternalAnswer(java.lang.String classType, java.lang.String uid)
protected boolean isMatch(R response, java.util.Map<java.lang.String,java.lang.String> args)
Answer
isMatch
in class Answer<ExternalAnswerValuePart,V extends ExternalAnswerValue<R>,R extends ExternalResponseValue>
response
- A subclass of AnswerValueargs
- Map for problem specific properties that will
be used in calculating correctness for the problem.#isMatchDefault(StudentResponseValue)
,
#isCorrect(StudentResponseValue)
public ExternalAnswerValuePart getValuePart()
getAnswerValue()
,
getAnswerType()
public java.lang.String getAnswerValue()
getAnswerType()
public AnswerEvalType getAnswerType()
getAnswerValue()
public void validate() throws ValidationException
SelfValidating
validate
in interface SelfValidating
validate
in class Persistable
ValidationException
- if the data is invalid