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 Surveys. The responses to a question are stored in Variables.
See Also:
Serialized Form
  • 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 id
      The 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 masterId
      The master id of the question. It must not be empty, must be of the form que-{{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 dataAcquisitionProjectId
      The id of the DataAcquisitionProject 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 number
      The number of the question. Must not be empty and must be unique within the Instrument. 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 questionText
      The question the Surveys 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 topic
      The topic or section in the Instrument 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 indexInInstrument
      The index of the question in the Instrument. Used for sorting the questions.
    • instrumentId

      @NotEmpty private @NotEmpty String instrumentId
      The id of the Instrument 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 instrumentNumber
      The number of the Instrument 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 instruction
      The 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 introduction
      The 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 type
      The 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 additionalQuestionText
      Arbitrary 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 annotations
      Arbitrary annotations to this question. Markdown is supported. Must not contain more than 2048 characters.
    • technicalRepresentation

      @Valid private @Valid TechnicalRepresentation technicalRepresentation
      A TechnicalRepresentation 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

      private List<String> successorNumbers
      List of numbers of the Questions which directly follow this question in the Instrument.
    • successors

      private List<String> successors
      List of ids of the Questions which directly follow this question in the Instrument.
    • dataPackageId

      @NotEmpty(message="question-management.error.question.dataPackage-id.not-empty") private @NotEmpty(message="question-management.error.question.dataPackage-id.not-empty") String dataPackageId
      The id of the OrderedDataPackage to which this question belongs. Must not be empty.
    • conceptIds

      private List<@ConceptExists(message="question-management.error.question.concept-ids.not-exists") String> conceptIds
      List of ids of Concepts to which this question belongs.
  • Constructor Details

    • Question

      public Question​(Question question)
  • Method Details