net.neurowork.mobile.android.fw.levels.impl
Class QuizLevelDataItem

java.lang.Object
  extended by net.neurowork.mobile.android.fw.levels.AppLevelDataItem
      extended by net.neurowork.mobile.android.fw.levels.impl.QuizLevelDataItem

public class QuizLevelDataItem
extends AppLevelDataItem

Class for save information about Quiz. It helps for make a quiz in your app

Author:
neurowork

Constructor Summary
QuizLevelDataItem()
           
 
Method Summary
 void addQuestion(QuestionDataItem question)
          Method for parseUtils.
 java.lang.String getDescription()
           
 java.lang.String getFirst()
          Return the id of the first question of the quiz.
 QuestionDataItem getQuestion(java.lang.String id)
           
 java.util.List<java.lang.String> getQuestionIds()
          Return a list with the IDs of questions contained in the quiz
 int getTime()
           
 boolean isAdventureMode()
           
 void setDescription(java.lang.String description)
           
 void setFirst(java.lang.String id)
          Set the first question of the quiz.
 void setTime(java.lang.String time)
          Method for parseUtils.
 int size()
          Return the number of question
 
Methods inherited from class net.neurowork.mobile.android.fw.levels.AppLevelDataItem
findAllGeoref, findWidthText, getAllImages, getGeoReferencia, getHeaderImageFile, getHeaderText, getId, setGeoReferencia, setHeaderImageFile, setHeaderText, setId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuizLevelDataItem

public QuizLevelDataItem()
Method Detail

isAdventureMode

public boolean isAdventureMode()

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

getTime

public int getTime()

getQuestion

public QuestionDataItem getQuestion(java.lang.String id)

setFirst

public void setFirst(java.lang.String id)
Set the first question of the quiz. If you set a first question then the quiz actives adventure mode.

Parameters:
id -

getFirst

public java.lang.String getFirst()
Return the id of the first question of the quiz. Null if there isn't.

Returns:

size

public int size()
Return the number of question

Returns:

getQuestionIds

public java.util.List<java.lang.String> getQuestionIds()
Return a list with the IDs of questions contained in the quiz

Returns:

setTime

public void setTime(java.lang.String time)
Method for parseUtils. Cast the time to integer.

Parameters:
time -

addQuestion

public void addQuestion(QuestionDataItem question)
Method for parseUtils. Add new question. Question must have ID.

Parameters:
questions -