Class Variable
java.lang.Object
eu.dzhw.fdz.metadatamanagement.common.domain.AbstractRdcDomainObject
eu.dzhw.fdz.metadatamanagement.common.domain.AbstractShadowableRdcDomainObject
eu.dzhw.fdz.metadatamanagement.variablemanagement.domain.Variable
- All Implemented Interfaces:
Serializable
@CompoundIndex(def="{name: 1, dataSetId: 1}",unique=true) @CompoundIndex(def="{indexInDataSet: 1, dataSetId: 1}",unique=false) @ValidShadowId(message="variable-management.error.variable.id.pattern") @ValidVariableIdName(message="variable-management.error.variable.valid-variable-name") @ValidRepeatedMeasurementIdentifier(message="variable-management.error.variable.valid-repeated-measurement-identifier") @ValidDerivedVariablesIdentifier(message="variable-management.error.variable.valid-derived-variables-identifier") @UniqueVariableNameInDataSet(message="variable-management.error.variable.unique-variable-name-in-data-set") @RestrictedScaleLevelForDateDataType(message="variable-management.error.variable.restricted-scale-level-for-date-data-type") @ValidResponseValueMustBeAnIsoDateOnDateDataType(message="variable-management.error.variable.valid-response-value-must-be-an-iso-date-on-date-data-type") @StatisticsMinimumMustBeAnIsoDateOnDateDataType(message="variable-management.error.variable.statistics-minimum-must-be-an-iso-date-on-date-data-type") @StatisticsMaximumMustBeAnIsoDateOnDateDataType(message="variable-management.error.variable.statistics-maximum-must-be-an-iso-date-on-date-data-type") @StatisticsMedianMustBeAnIsoDateOnDateDataType(message="variable-management.error.variable.statistics-median-must-be-an-iso-date-on-date-data-type") @StatisticsFirstQuartileMustBeAnIsoDateOnDateDataType(message="variable-management.error.variable.statistics-first-quartile-must-be-an-iso-date-on-date-data-type") @StatisticsThirdQuartileMustBeAnIsoDateOnDateDataType(message="variable-management.error.variable.statistics-third-quartile-must-be-an-iso-date-on-date-data-type") @ValidResponseValueMustBeANumberOnNumericDataType(message="variable-management.error.variable.valid-response-value-must-be-a-number-on-numeric-data-type") @StatisticsMinimumMustBeANumberOnNumericDataType(message="variable-management.error.variable.statistics-minimum-must-be-a-number-on-numeric-data-type") @StatisticsMaximumMustBeANumberOnNumericDataType(message="variable-management.error.variable.statistics-maximum-must-be-a-number-on-numeric-data-type") @StatisticsMedianMustBeANumberOnNumericDataType(message="variable-management.error.variable.statistics-median-must-be-a-number-on-numeric-data-type") @StatisticsFirstQuartileMustBeANumberOnNumericDataType(message="variable-management.error.variable.statistics-first-quartile-must-be-a-number-on-numeric-data-type") @StatisticsThirdQuartileMustBeANumberOnNumericDataType(message="variable-management.error.variable.statistics-third-quartile-must-be-a-number-on-numeric-data-type") public class Variable extends AbstractShadowableRdcDomainObject
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
RelatedQuestion
s. A variable is part of exactly one DataSet
.- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description private @NotEmpty(message="variable-management.error.variable.access-ways.not-empty") List<String>
accessWays
The access way of this variable.private @I18nStringSize(max=2048,message="variable-management.error.variable.annotations.i18n-string-size") I18nString
annotations
Arbitrary additional text for this variable.private @NotEmpty(message="variable-management.error.variable.data-acquisition-project.id.not-empty") String
dataAcquisitionProjectId
The id of theDataAcquisitionProject
to which this variable belongs.private @NotEmpty(message="variable-management.error.variable.dataPackage-id.not-empty") String
dataPackageId
Id of theDataPackage
to which this variable belongs.private @NotEmpty(message="variable-management.error.variable.data-set-id-not-empty") String
dataSetId
The id of theDataSet
to which this variable belongs.private @NotNull(message="variable-management.error.variable.data-set-number-not-null") Integer
dataSetNumber
The number of theDataSet
to which this variable belongs.private @NotNull(message="variable-management.error.variable.data-type.not-null") I18nString
dataType
The technical type which theValidResponse
s have.private @Size(max=512,message="variable-management.error.variable.derived-variables-identifier-size") @Pattern(regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-]*$",message="variable-management.error.variable.derived-variables-identifier-pattern") String
derivedVariablesIdentifier
Identifier used to group variables within thisDataSet
which have been derived from each other.private @Valid Distribution
distribution
TheDistribution
contains the descriptives of this variable meaningValidResponse
s,Missing
s andStatistics
.private Boolean
doNotDisplayThousandsSeparator
Flag indicating whether theValidResponse
s should be displayed with a thousands separator or not.private @Valid FilterDetails
filterDetails
FilterDetails
of a variable describe the condition which must have evaluated to true before a participant was asked aQuestion
resulting in this variable.private @Valid GenerationDetails
generationDetails
GenerationDetails
describe how this variable was generated from one or more input variables.private String
id
The id of the variable which uniquely identifies the variable in this application.private @NotNull(message="variable-management.error.variable.data-set-index-not-null") Integer
indexInDataSet
The index in theDataSet
of this variable.private @NotNull(message="variable-management.error.variable.label.not-null") @I18nStringSize(max=512,message="variable-management.error.variable.label.i18n-string-size") I18nString
label
The label of the variable should describe its content.private @NotEmpty(message="variable-management.error.variable.master-id.not-empty") @Size(max=512,message="variable-management.error.variable.master-id.size") @Pattern(regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\$]*$",message="variable-management.error.variable.master-id.pattern") String
masterId
private @NotEmpty(message="variable-management.error.variable.name.not-empty") @Size(max=32,message="variable-management.error.variable.name.size") @Pattern(regexp="^[_a-zA-Z][_a-zA-Z0-9]*$",message="variable-management.error.variable.name.pattern") String
name
The name of the variable as it is used in theDataSet
.private @Valid List<RelatedQuestion>
relatedQuestions
List ofRelatedQuestion
s which have been asked to generate the values of this variable.private List<String>
relatedVariables
List of ids of variables which are "related" to this variable.private @Size(max=512,message="variable-management.error.variable.repeated-measurement-identifier-size") @Pattern(regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-]*$",message="variable-management.error.variable.repeated-measurement-pattern") String
repeatedMeasurementIdentifier
Identifier used to group variables within thisDataSet
which measure the same across multiple waves.private @NotNull(message="variable-management.error.variable.scaleLevel.not-null") I18nString
scaleLevel
The scale level (or level of measurement) classifies the nature of information within the values assigned to this variable (ValidResponse
s).private static long
serialVersionUID
private @NotNull(message="variable-management.error.variable.storage-type.not-null") String
storageType
Associated with each data type is a storage type.private List<String>
surveyIds
List of ids ofSurvey
s which have been conducted to create this variable.private @NotEmpty(message="variable-management.error.variable.survey-numbers-not-empty") List<Integer>
surveyNumbers
List of numbers ofSurvey
s which have been conducted to create this variable. -
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected void
setIdInternal(String id)
Set id on implementation ofAbstractShadowableRdcDomainObject
.protected void
setMasterIdInternal(String masterId)
Set masterId on implementations ofAbstractShadowableRdcDomainObject
.Methods inherited from class eu.dzhw.fdz.metadatamanagement.common.domain.AbstractShadowableRdcDomainObject
getMasterId, setId, setMasterId
Methods inherited from class eu.dzhw.fdz.metadatamanagement.common.domain.AbstractRdcDomainObject
getId
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
- Constant Field Values
-
id
The id of the variable which uniquely identifies the variable in this application. The id must not be empty and must be of the form var-{{dataAcquisitionProjectId}}-ds{{dataSetNumber}}-{{name}}$. The id must not contain more than 512 characters. -
masterId
@NotEmpty(message="variable-management.error.variable.master-id.not-empty") @Size(max=512, message="variable-management.error.variable.master-id.size") @Pattern(regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\$]*$", message="variable-management.error.variable.master-id.pattern") private @NotEmpty(message="variable-management.error.variable.master-id.not-empty") @Size(max=512,message="variable-management.error.variable.master-id.size") @Pattern(regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\$]*$",message="variable-management.error.variable.master-id.pattern") String masterId -
dataAcquisitionProjectId
@NotEmpty(message="variable-management.error.variable.data-acquisition-project.id.not-empty") private @NotEmpty(message="variable-management.error.variable.data-acquisition-project.id.not-empty") String dataAcquisitionProjectIdThe id of theDataAcquisitionProject
to which this variable belongs. The dataAcquisitionProjectId must not be empty. -
name
@NotEmpty(message="variable-management.error.variable.name.not-empty") @Size(max=32, message="variable-management.error.variable.name.size") @Pattern(regexp="^[_a-zA-Z][_a-zA-Z0-9]*$", message="variable-management.error.variable.name.pattern") private @NotEmpty(message="variable-management.error.variable.name.not-empty") @Size(max=32,message="variable-management.error.variable.name.size") @Pattern(regexp="^[_a-zA-Z][_a-zA-Z0-9]*$",message="variable-management.error.variable.name.pattern") String name -
label
@NotNull(message="variable-management.error.variable.label.not-null") @I18nStringSize(max=512, message="variable-management.error.variable.label.i18n-string-size") @I18nStringNotEmpty(message="variable-management.error.variable.label.i18n-string-not-empty") private @NotNull(message="variable-management.error.variable.label.not-null") @I18nStringSize(max=512,message="variable-management.error.variable.label.i18n-string-size") I18nString labelThe 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. -
annotations
@I18nStringSize(max=2048, message="variable-management.error.variable.annotations.i18n-string-size") private @I18nStringSize(max=2048,message="variable-management.error.variable.annotations.i18n-string-size") I18nString annotationsArbitrary additional text for this variable. Markdown is supported. Must not contain more than 2048 characters. -
dataSetId
@NotEmpty(message="variable-management.error.variable.data-set-id-not-empty") private @NotEmpty(message="variable-management.error.variable.data-set-id-not-empty") String dataSetIdThe id of theDataSet
to which this variable belongs. Must not be empty. -
dataSetNumber
@NotNull(message="variable-management.error.variable.data-set-number-not-null") private @NotNull(message="variable-management.error.variable.data-set-number-not-null") Integer dataSetNumberThe number of theDataSet
to which this variable belongs. Must not be empty. -
dataType
@NotNull(message="variable-management.error.variable.data-type.not-null") @ValidDataType(message="variable-management.error.variable.data-type.valid-data-type") private @NotNull(message="variable-management.error.variable.data-type.not-null") I18nString dataTypeThe technical type which theValidResponse
s have. Must be one ofDataTypes
and must not be empty. -
storageType
@NotNull(message="variable-management.error.variable.storage-type.not-null") @ValidStorageType(message="variable-management.error.variable.storage-type.valid-storage-type") private @NotNull(message="variable-management.error.variable.storage-type.not-null") String storageTypeAssociated with each data type is a storage type. For instance numerics can be stored as integer or double. Must be one ofStorageTypes
and must not be empty. -
scaleLevel
@NotNull(message="variable-management.error.variable.scaleLevel.not-null") @ValidScaleLevel(message="variable-management.error.variable.scaleLevel.valid-scale-level") private @NotNull(message="variable-management.error.variable.scaleLevel.not-null") I18nString scaleLevelThe scale level (or level of measurement) classifies the nature of information within the values assigned to this variable (ValidResponse
s). It determines which mathematical operations can be performed with the values. It must be one ofScaleLevels
and must not be empty. If the data type of this variable isDataTypes.DATE
then the ScaleLevel must beScaleLevels.ORDINAL
,ScaleLevels.INTERVAL
orScaleLevels.NOMINAL
. -
accessWays
@NotEmpty(message="variable-management.error.variable.access-ways.not-empty") @ValidAccessWays(message="variable-management.error.variable.access-ways.valid-access-ways") private @NotEmpty(message="variable-management.error.variable.access-ways.not-empty") List<String> accessWaysThe 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 ofAccessWays
. -
indexInDataSet
@NotNull(message="variable-management.error.variable.data-set-index-not-null") private @NotNull(message="variable-management.error.variable.data-set-index-not-null") Integer indexInDataSet -
surveyNumbers
@NotEmpty(message="variable-management.error.variable.survey-numbers-not-empty") private @NotEmpty(message="variable-management.error.variable.survey-numbers-not-empty") List<Integer> surveyNumbersList of numbers ofSurvey
s which have been conducted to create this variable. Must not be empty. -
repeatedMeasurementIdentifier
@Size(max=512, message="variable-management.error.variable.repeated-measurement-identifier-size") @Pattern(regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-]*$", message="variable-management.error.variable.repeated-measurement-pattern") private @Size(max=512,message="variable-management.error.variable.repeated-measurement-identifier-size") @Pattern(regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-]*$",message="variable-management.error.variable.repeated-measurement-pattern") String repeatedMeasurementIdentifierIdentifier used to group variables within thisDataSet
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 "-". -
derivedVariablesIdentifier
@Size(max=512, message="variable-management.error.variable.derived-variables-identifier-size") @Pattern(regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-]*$", message="variable-management.error.variable.derived-variables-identifier-pattern") private @Size(max=512,message="variable-management.error.variable.derived-variables-identifier-size") @Pattern(regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-]*$",message="variable-management.error.variable.derived-variables-identifier-pattern") String derivedVariablesIdentifierIdentifier used to group variables within thisDataSet
which have been derived from each other. For instance one variable might be an aggregated version of the other. 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 "-". -
filterDetails
FilterDetails
of a variable describe the condition which must have evaluated to true before a participant was asked aQuestion
resulting in this variable. -
generationDetails
GenerationDetails
describe how this variable was generated from one or more input variables. -
distribution
TheDistribution
contains the descriptives of this variable meaningValidResponse
s,Missing
s andStatistics
. -
doNotDisplayThousandsSeparator
Flag indicating whether theValidResponse
s should be displayed with a thousands separator or not. For instance years (1970) are numeric but should not be displayed with a thousands separator. Default value is false indicating that theValidResponse
s are displayed with thousands separator. -
dataPackageId
@NotEmpty(message="variable-management.error.variable.dataPackage-id.not-empty") private @NotEmpty(message="variable-management.error.variable.dataPackage-id.not-empty") String dataPackageIdId of theDataPackage
to which this variable belongs. -
surveyIds
List of ids ofSurvey
s which have been conducted to create this variable. Must not be empty.
-
-
Constructor Details
-
Variable
-
-
Method Details
-
setMasterIdInternal
Description copied from class:AbstractShadowableRdcDomainObject
Set masterId on implementations ofAbstractShadowableRdcDomainObject
.- Specified by:
setMasterIdInternal
in classAbstractShadowableRdcDomainObject
- Parameters:
masterId
- Master Id
-
setIdInternal
Description copied from class:AbstractShadowableRdcDomainObject
Set id on implementation ofAbstractShadowableRdcDomainObject
.- Specified by:
setIdInternal
in classAbstractShadowableRdcDomainObject
- Parameters:
id
- Id
-