|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.jsurveyor.Report
This class is made for containing and calculating on the evaluations that users write in. It's only input is a questionnaireID where the rest is taking from the database, and it is used by ReportOutput to generate a pdf document. The calculations done in this class is getting the newest evaluations and adding the multiplechoice answers together. There will only be get and creation of the report method in this Class because it's not the idea to change the data that is retrieved from the database.
| Nested Class Summary | |
class |
Report.InnerAnswerFreeText
|
class |
Report.InnerAnswerMultipleChoice
This class contains all the values needed from the MultipleChoiceAnswers, like how the answers are distributed over each choice |
class |
Report.InnerQuestionFreeText
|
| Constructor Summary | |
Report()
Default Constructor for Report, with no inputs and values |
|
Report(int questionnaireID)
Constructor for Report, this is the most used constructor for report it takes the questionnaireID as an input for knowing which quesionnaire to take, and calls 2 methods: getEvaluations(questionnaireID) and findTypeOfInnerAnswers() |
|
| Method Summary | |
void |
cycleFreeTexts(int answerNumber,
int evaluationNumber)
The method retrieves from the database and instantiate a tempAnswer from the evaluation evaluationNumber, where the tempAnswer is at the position answerNumber in the evaluations answers list. |
void |
cycleMultipleChoices(int answerNumber,
int evaluationNumber)
The method retrieves from the database and instantiate a tempAnswer from the evaluation evaluationNumber, where the tempAnswer is at the position answerNumber in the evaluations answers list. |
void |
findTypeOfInnerAnswers()
The method is called after the evaluations are put into order, where it goes through each usable evaluation and finds out which type of answer it contains, which are send to their cyclemethod for their type. |
int |
getAllEvaluationsSize()
The method returns the size of the Arraylist allEvaluations that contains the reference to all evaluations taken from the database |
void |
getEvaluations(int questionnaireID)
Method getEvaluations, this method runs through all evaluations for that questionnaire and takes out each of them and compares them with the ones already in the ArrayList usableEvaluations. |
java.util.ArrayList |
getInnerAnswerMultipleChoice()
The method return the ArrayList innerAnswerMultipleChoice which contains the references to the instances of InnerAnswerMultipleChoice in the report |
int[] |
getInnerAnswerMultipleChoiceDistribution(int j)
The method gets the instance of the type InnerAnswerMultipleChoice at the index j in the ArrayLisy innerAnswerMultipleChoice. |
java.lang.String |
getInnerAnswerMultipleChoiceQuestionText(int j)
Method getInnerAnswerMultipleChoiceQuestionText |
int |
getInnerAnswerMultipleChoiceSize()
The method return the size of the ArrayList |
java.lang.String[] |
getInnerAnswerMultipleChoiceText(int j)
The method returns a String Array for a specific InnerAnswerMultipleChoice, where the String contains the text for each choice posibility |
int |
getInnerAnswerSize(int number)
The method returns the number of answers to this instance of InnerQuestionFreeText. |
java.lang.String[] |
getInnerAnswerText(int number)
The method returns a String Array consisting of all the answers for that instanceOf InnerQuestionFreeText. |
int |
getInnerFreeTextSize()
This method returns the size of the Arraylist that contains the references to the objects of the Class. |
java.lang.String |
getInnerQuestionFreeText(int i)
The method return the Question text for the instance of InnerQuestionFreeText |
int |
getInnerQuestionFreeTextSize(int i)
this returns the number of answers for the Question at index i in the ArrayList innerQuestionFreeText. |
java.lang.String[] |
getInnerUserText(int number)
The method returns a String Array consisting of all the users for that instanceOf InnerQuestionFreeText. |
java.lang.String |
getQuestionnaireIntroText()
The method returns the text that was in the intro in the used questionnaire |
java.lang.String |
getQuestionnaireName()
The method returns the name for the questionnaire |
int |
getUsableEvaluationsSize()
The method returns the size of the Arraylist usableEvaluations which contains the references to the newest evaluations for each user |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Report()
public Report(int questionnaireID)
questionnaireID - int| Method Detail |
public void getEvaluations(int questionnaireID)
questionnaireID - intpublic void findTypeOfInnerAnswers()
public int getInnerFreeTextSize()
public java.lang.String getQuestionnaireIntroText()
public java.lang.String getQuestionnaireName()
public int getAllEvaluationsSize()
public int getUsableEvaluationsSize()
public java.util.ArrayList getInnerAnswerMultipleChoice()
public int getInnerAnswerMultipleChoiceSize()
public java.lang.String getInnerAnswerMultipleChoiceQuestionText(int j)
j - int
public java.lang.String[] getInnerAnswerMultipleChoiceText(int j)
j - int
public int[] getInnerAnswerMultipleChoiceDistribution(int j)
j - int
public void cycleMultipleChoices(int answerNumber,
int evaluationNumber)
answerNumber - intevaluationNumber - int
public void cycleFreeTexts(int answerNumber,
int evaluationNumber)
answerNumber - intevaluationNumber - intpublic int getInnerQuestionFreeTextSize(int i)
i - int
public java.lang.String getInnerQuestionFreeText(int i)
i - int
public int getInnerAnswerSize(int number)
number - int
public java.lang.String[] getInnerAnswerText(int number)
number - int
public java.lang.String[] getInnerUserText(int number)
number - int
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||