|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.sourceforge.espro.model.AbstractModel
org.sourceforge.espro.model.Questionnaire
public class Questionnaire
The questionnaire.
The questionnaire is a set of questions which are using the elicitation objects, that are used for one questionnaire. Here we will also store the results of the subjects.
| Field Summary | |
|---|---|
protected java.util.ArrayList<Item> |
items
A list of items in the questionnaire. |
protected Settings |
settings
The settings. |
| Fields inherited from class org.sourceforge.espro.model.AbstractModel |
|---|
pcs |
| Constructor Summary | |
|---|---|
Questionnaire()
The constructor of the Questionnaire. |
|
| Method Summary | |
|---|---|
void |
addItem(Item item)
Adds an item to the questionnaire. |
void |
addItem(Item item,
int index)
Adds an item to the given position into the item list. |
void |
addItemListeners()
This method has to be called whenever a questionnaire is created without the normal methods of the questionnaire. |
void |
cleanData()
Removes all data from the questionnaire. |
void |
freeze()
|
Item |
getCurrent()
Returns the current item from the questionnaire. |
QData |
getData()
Returns the questionnaire data |
java.io.File |
getFile()
Returns the File object of the questionniare. |
Item |
getItem(java.lang.String id)
Returns an item by a given id. |
java.util.ArrayList<Item> |
getItems()
Returns the items. |
RunnableQuestionnaire |
getRunnable()
Returns a runnable copy of the questionnaire. |
Settings |
getSettings()
Returns the settings |
boolean |
isFrozen()
|
int |
ItemCount()
Returns the number of items the questionnaire currently has. |
Item |
newItem()
Creates a new item to the questionnaire. |
void |
removeCurrentItem()
Removes the current item from the Questionnaire. |
void |
setCurrent(Item currentItem)
Sets the currentItem |
boolean |
setCurrentItem(java.lang.String id)
Sets the current item from the given id (as string). |
void |
setData(QData data)
Sets the questionnaire data. |
void |
setFile(java.io.File file)
Sets the file where the questionnaire is stored. |
void |
setFrozen(boolean frozen)
|
void |
setItemOrder(java.util.Vector itemVector)
Sets the order of the items. |
void |
setItems(java.util.ArrayList<Item> items)
Sets the Items of the questionnaire. |
void |
setSaved(boolean saved)
We need to set all items to be saved if we save a questionnaire. |
void |
setSettings(Settings settings)
Sets the settings. |
java.lang.String |
toString()
Returns a String about an object. |
java.lang.String |
validate()
Validates the questionnaire. |
| Methods inherited from class org.sourceforge.espro.model.AbstractModel |
|---|
addPropertyChangeListener, addPropertyChangeListener, isSaved, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Settings settings
protected java.util.ArrayList<Item> items
| Constructor Detail |
|---|
public Questionnaire()
| Method Detail |
|---|
public void addItem(Item item)
item - The item to add.
public void addItem(Item item,
int index)
item - The item to add.index - The position to insert the item.public void removeCurrentItem()
public java.io.File getFile()
public java.util.ArrayList<Item> getItems()
public Settings getSettings()
public Item newItem()
public void setFile(java.io.File file)
QuestionnaireManager,
there should be no use for the users.
file - the file to setpublic void setItems(java.util.ArrayList<Item> items)
items - the items to setpublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public Item getCurrent()
public void setCurrent(Item currentItem)
currentItem - The currentItem to set.public boolean setCurrentItem(java.lang.String id)
id - The id of the new current item.
public void setSaved(boolean saved)
setSaved in class AbstractModelsaved - true if it is saved.AbstractModel.setSaved(boolean)public void addItemListeners()
public int ItemCount()
public Item getItem(java.lang.String id)
id - The item id.
public RunnableQuestionnaire getRunnable()
public void setSettings(Settings settings)
settings - The settings.public QData getData()
public void setData(QData data)
data - The data.public void cleanData()
public void setItemOrder(java.util.Vector itemVector)
Item.readableString() method.
itemVector - The vector of strings.public java.lang.String validate()
public void freeze()
public boolean isFrozen()
public void setFrozen(boolean frozen)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||