# Variable¶

public class Variable extends AbstractRdcDomainObject

A variable contains the results from at least one Survey. These results can be the responses from participants of an online survey, hence a variable can result from RelatedQuestions. A variable is part of exactly one DataSet.

## Fields¶

### accessWays¶

private List<String> accessWays

The access way of this variable. Depends on the sensitivity of the data and describes how the data user will be able to work with the data. Must not be empty and be one of AccessWays.

### annotations¶

private I18nString annotations

Arbitrary additional text for this variable. Must not contain more than 2048 characters.

### dataAcquisitionProjectId¶

private String dataAcquisitionProjectId

The id of the DataAcquisitionProject to which this variable belongs. The dataAcquisitionProjectId must not be empty.

### dataSetId¶

private String dataSetId

The id of the DataSet to which this variable belongs. Must not be empty.

### dataSetNumber¶

private Integer dataSetNumber

The number of the DataSet to which this variable belongs. Must not be empty.

### dataType¶

private I18nString dataType

The technical type which the ValidResponses have. Must be one of DataTypes and must not be empty.

### derivedVariablesIdentifier¶

private String derivedVariablesIdentifier

### indexInDataSet¶

private Integer indexInDataSet

The index in the DataSet of this variable. Used for sorting the variables of this DataSet and for displaying successors and predecessors of this variable. Must not be empty and the successor of this variable must have indexInDataSet incremented by one.

### label¶

private I18nString label

The label of the variable should describe its content. It must be specified in at least one language and it must not contain more than 512 characters.

### name¶

private String name

The name of the variable as it is used in the DataSet. It must not be empty and must be unique in the DataSet. It must contain only alphanumeric (english) characters and „_“. The first character must not be a number. It must not contain more than 32 characters.

### panelIdentifier¶

private String panelIdentifier

Identifier used to group variables within this DataSet which measure the same across multiple waves. Must be of the form {{dataAcquisitionProjectId}}-ds{{dataSetNumber}}-{{string}}\$. Must not contain more than 512 characters and must contain only (german) alphanumeric characters and „_“ and „-„.

### relatedQuestions¶

private List<RelatedQuestion> relatedQuestions

List of RelatedQuestions which have been asked to generate the values of this variable.

### relatedVariables¶

private List<String> relatedVariables

List of ids of variables which are „related“ to this variable. The type of relation is arbitrary.

### scaleLevel¶

private I18nString scaleLevel

The scale level (or level of measurement) classifies the nature of information within the values assigned to this variable (ValidResponses). It determines which mathematical operations can be performed with the values. It must be one of ScaleLevels and must not be empty. If the data type of this variable is DataTypes.DATE then the ScaleLevel must be ScaleLevels.ORDINAL.

### storageType¶

private String storageType

Associated with each data type is a storage type. For instance numerics can be stored as integer or double. Must be one of StorageTypes and must not be empty.

### studyId¶

private String studyId

Id of the Study to which this variable belongs.

### surveyIds¶

private List<String> surveyIds

List of ids of Surveys which have been conducted to create this variable. Must not be empty.

### surveyNumbers¶

private List<Integer> surveyNumbers

List of numbers of Surveys which have been conducted to create this variable. Must not be empty.