|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.problets.lib.io.input.DataInputModel
public class DataInputModel
Provides methods to process input file that specifies the questions and answering options that must be presented to the user.
Field Summary | |
---|---|
static java.lang.String |
CHECKBOX
String used to specify a check box question - where user can select any number of the options presented |
static java.lang.String |
COMBOBOX
String used to specify a combo box question - where user select one option from a drop-down box |
static java.lang.String |
DATEINPUT
String used to specify a question asking for a date in month/day/year format |
static java.lang.String |
LABEL
String used to specify uneditable text as the pre-specified answer to a question |
static java.lang.String |
LIKERT
String used to specify a likert question - where user can select from among 5 Likert scale options |
static java.lang.String |
PASSWORD
String used to specify a password question - user input is masked |
static java.lang.String |
RADIOBUTTON
String used to specify a radiobutton question - where user can select only one of many options |
static java.lang.String |
RANKEDCHOICE
String used to specify a ranked choice question - where user must uniquely rank all the presented options |
static java.lang.String |
REQUIRED
String used to indicate that answering a question is mandatory |
static java.lang.String |
SUBTITLE
String used to specify subtitle of a segment of questions - no user input is expected for a subtitle |
static java.lang.String |
TEXT
String used to specify output text in one-column format, usable for messages |
static java.lang.String |
TEXTAREA
String used to specify a text area question - where user can enter multiple lines of text |
static java.lang.String |
TEXTFIELD
String used to specify a text field question - where user can enter one line of text |
static java.lang.String |
TITLE
String used to specify title of a segment of questions - no user input is expected for a title |
Constructor Summary | |
---|---|
DataInputModel()
|
Method Summary | |
---|---|
static java.util.Vector |
getContentVector(java.lang.String fileName)
Processes the text file whose name has been provided and returns a vector of InputItem objects, each object containing information about the type (see class constants), prompt, answering options and mandatory nature of one question. |
static java.util.Vector |
getContentVector(java.lang.String path,
java.lang.String fileName)
Processes the text file at the specified path and returns a vector of InputItem objects, each object containing information about the type (see class constants), prompt, answering options and mandatory nature of one question. |
static void |
main(java.lang.String[] args)
Used for testing this class |
static void |
printQuestionnaire(java.util.Vector questionnaire)
Prints the questions on a form |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RADIOBUTTON
public static final java.lang.String LIKERT
public static final java.lang.String TEXTFIELD
public static final java.lang.String TEXTAREA
public static final java.lang.String COMBOBOX
public static final java.lang.String CHECKBOX
public static final java.lang.String TITLE
public static final java.lang.String SUBTITLE
public static final java.lang.String TEXT
public static final java.lang.String RANKEDCHOICE
public static final java.lang.String DATEINPUT
public static final java.lang.String LABEL
public static final java.lang.String PASSWORD
public static final java.lang.String REQUIRED
Constructor Detail |
---|
public DataInputModel()
Method Detail |
---|
public static java.util.Vector getContentVector(java.lang.String fileName)
fileName
- String representing the name of the file where questions, their types and possible answering options have been listed
public static java.util.Vector getContentVector(java.lang.String path, java.lang.String fileName)
path
- String representing the path in the org.problets package where the input text file is located.fileName
- String representing the name of the file where questions, their types and possible answering options have been listed
public static void printQuestionnaire(java.util.Vector questionnaire)
questionnaire
- Vector of InputItem objects containing the questions asked on a formpublic static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |