Class Question
java.lang.Object
eu.dzhw.fdz.metadatamanagement.common.domain.AbstractRdcDomainObject
eu.dzhw.fdz.metadatamanagement.common.domain.AbstractShadowableRdcDomainObject
eu.dzhw.fdz.metadatamanagement.questionmanagement.domain.Question
- All Implemented Interfaces:
Serializable
@CompoundIndex(def="{instrumentId: 1, number: 1}", unique=true) @ValidUniqueQuestionNumber(message="question-management.error.question.unique-question-number") @ValidQuestionIdName(message="question-management.error.question.valid-question-id-name") @ValidShadowId(message="question-management.error.question.id.pattern") public class Question extends AbstractShadowableRdcDomainObject
A question is part of an
Instrument
which has been used in at least one Survey
s.
The responses to a question are stored in Variable
s.- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description private @I18nStringSize(max=1048576,message="question-management.error.question.additional-question-text.i18n-string-size") I18nString
additionalQuestionText
Arbitrary additional question text which has been presented to the participant.private @I18nStringSize(max=2048,message="question-management.error.variable.annotations.i18n-string-size") I18nString
annotations
Arbitrary annotations to this question.private List<@ConceptExists(message="question-management.error.question.concept-ids.not-exists") String>
conceptIds
List of ids ofConcept
s to which this question belongs.private @NotEmpty(message="question-management.error.question.data-acquisition-project-id.not-empty") String
dataAcquisitionProjectId
The id of theDataAcquisitionProject
to which this question belongs.private @NotEmpty(message="question-management.error.question.dataPackage-id.not-empty") String
dataPackageId
The id of theOrderedDataPackage
to which this question belongs.private @NotEmpty(message="question-management.error.question.id.not-empty") @Size(max=512,message="question-management.error.question.id.size") String
id
The id of the question which uniquely identifies the question in this application.private @NotNull(message="question-management.error.question.indexInInstrument.not-null") Integer
indexInInstrument
The index of the question in theInstrument
.private @I18nStringSize(max=1048576,message="question-management.error.question.instruction.i18n-string-size") I18nString
instruction
The instruction for the participant which tells how to give the answers to this question.private @NotEmpty String
instrumentId
The id of theInstrument
to which this question belongs.private @NotNull(message="question-management.error.question.instrument-number.not-null") Integer
instrumentNumber
The number of theInstrument
to which this question belongs.private @I18nStringSize(max=2048,message="question-management.error.question.introduction.i18n-string-size") I18nString
introduction
The introduction of this question which gives more context to the participant before asking the question.private @NotEmpty(message="question-management.error.question.master-id.not-empty") @Size(max=512,message="question-management.error.question.master-id.size") @Pattern(regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.\\$]*$",message="question-management.error.question.master-id.pattern") String
masterId
The master id of the question.private @NotEmpty(message="question-management.error.question.number.not-empty") @Size(max=32,message="question-management.error.question.number.size") @Pattern(regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.]*$",message="question-management.error.question.number.pattern") String
number
The number of the question.private @NotNull(message="question-management.error.question.question-text.not-null") @I18nStringSize(max=2048,message="question-management.error.question.question-text.i18n-string-size") I18nString
questionText
The question theSurvey
s participant was asked.private static long
serialVersionUID
private List<String>
successorNumbers
List of numbers of theQuestion
s which directly follow this question in theInstrument
.private List<String>
successors
List of ids of theQuestion
s which directly follow this question in theInstrument
.private @Valid TechnicalRepresentation
technicalRepresentation
ATechnicalRepresentation
of this question.private @I18nStringSize(max=2048,message="question-management.error.question.topic.i18n-string-size") I18nString
topic
The topic or section in theInstrument
to which this question belongs.private @NotNull(message="question-management.error.question.type.not-null") I18nString
type
The type of the question. -
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
@NotEmpty(message="question-management.error.question.id.not-empty") @Size(max=512, message="question-management.error.question.id.size") private @NotEmpty(message="question-management.error.question.id.not-empty") @Size(max=512,message="question-management.error.question.id.size") String idThe id of the question which uniquely identifies the question in this application. -
masterId
@NotEmpty(message="question-management.error.question.master-id.not-empty") @Size(max=512, message="question-management.error.question.master-id.size") @Pattern(regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.\\$]*$", message="question-management.error.question.master-id.pattern") private @NotEmpty(message="question-management.error.question.master-id.not-empty") @Size(max=512,message="question-management.error.question.master-id.size") @Pattern(regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.\\$]*$",message="question-management.error.question.master-id.pattern") String masterIdThe master id of the question. It must not be empty, must be of the formque-{{dataAcquisitionProjectId}}-ins{{instrumentNumber}}-{{number}}$
and must not contain more than 512 characters. -
dataAcquisitionProjectId
@NotEmpty(message="question-management.error.question.data-acquisition-project-id.not-empty") private @NotEmpty(message="question-management.error.question.data-acquisition-project-id.not-empty") String dataAcquisitionProjectIdThe id of theDataAcquisitionProject
to which this question belongs. The dataAcquisitionProjectId must not be empty. -
number
@NotEmpty(message="question-management.error.question.number.not-empty") @Size(max=32, message="question-management.error.question.number.size") @Pattern(regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.]*$", message="question-management.error.question.number.pattern") private @NotEmpty(message="question-management.error.question.number.not-empty") @Size(max=32,message="question-management.error.question.number.size") @Pattern(regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.]*$",message="question-management.error.question.number.pattern") String numberThe number of the question. Must not be empty and must be unique within theInstrument
. Must contain only (german) alphanumeric characters and "_","-" and "." and must not contain more than 32 characters. -
questionText
@NotNull(message="question-management.error.question.question-text.not-null") @I18nStringNotEmpty(message="question-management.error.question.question-text.i18n-string-not-empty") @I18nStringSize(max=2048, message="question-management.error.question.question-text.i18n-string-size") private @NotNull(message="question-management.error.question.question-text.not-null") @I18nStringSize(max=2048,message="question-management.error.question.question-text.i18n-string-size") I18nString questionTextThe question theSurvey
s participant was asked. It must be specified in at least one language and it must not contain more than 2048 characters. -
topic
@I18nStringSize(max=2048, message="question-management.error.question.topic.i18n-string-size") private @I18nStringSize(max=2048,message="question-management.error.question.topic.i18n-string-size") I18nString topicThe topic or section in theInstrument
to which this question belongs. It must not contain more than 2048 characters. -
indexInInstrument
@NotNull(message="question-management.error.question.indexInInstrument.not-null") private @NotNull(message="question-management.error.question.indexInInstrument.not-null") Integer indexInInstrumentThe index of the question in theInstrument
. Used for sorting the questions. -
instrumentId
The id of theInstrument
to which this question belongs. Must not be empty. -
instrumentNumber
@NotNull(message="question-management.error.question.instrument-number.not-null") private @NotNull(message="question-management.error.question.instrument-number.not-null") Integer instrumentNumberThe number of theInstrument
to which this question belongs. Must not be empty. -
instruction
@I18nStringSize(max=1048576, message="question-management.error.question.instruction.i18n-string-size") private @I18nStringSize(max=1048576,message="question-management.error.question.instruction.i18n-string-size") I18nString instructionThe instruction for the participant which tells how to give the answers to this question. Must not contain more than 1 MB characters. -
introduction
@I18nStringSize(max=2048, message="question-management.error.question.introduction.i18n-string-size") private @I18nStringSize(max=2048,message="question-management.error.question.introduction.i18n-string-size") I18nString introductionThe introduction of this question which gives more context to the participant before asking the question. Must not contain more than 2048 characters. -
type
@NotNull(message="question-management.error.question.type.not-null") @ValidQuestionType(message="question-management.error.question.type.valid-question-type") private @NotNull(message="question-management.error.question.type.not-null") I18nString typeThe type of the question. Must be one of QuestionTypes and must not be empty. -
additionalQuestionText
@I18nStringSize(max=1048576, message="question-management.error.question.additional-question-text.i18n-string-size") private @I18nStringSize(max=1048576,message="question-management.error.question.additional-question-text.i18n-string-size") I18nString additionalQuestionTextArbitrary additional question text which has been presented to the participant. Must not contain more than 1 MB characters. -
annotations
@I18nStringSize(max=2048, message="question-management.error.variable.annotations.i18n-string-size") private @I18nStringSize(max=2048,message="question-management.error.variable.annotations.i18n-string-size") I18nString annotationsArbitrary annotations to this question. Markdown is supported. Must not contain more than 2048 characters. -
technicalRepresentation
ATechnicalRepresentation
of this question. This is optional and can be used to add the source code of the question which was used to generate it. -
successorNumbers
List of numbers of theQuestion
s which directly follow this question in theInstrument
. -
successors
List of ids of theQuestion
s which directly follow this question in theInstrument
. -
dataPackageId
@NotEmpty(message="question-management.error.question.dataPackage-id.not-empty") private @NotEmpty(message="question-management.error.question.dataPackage-id.not-empty") String dataPackageIdThe id of theOrderedDataPackage
to which this question belongs. Must not be empty. -
conceptIds
private List<@ConceptExists(message="question-management.error.question.concept-ids.not-exists") String> conceptIdsList of ids ofConcept
s to which this question belongs.
-
-
Constructor Details
-
Question
-
-
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
-