Class QuestionImageMetadata
java.lang.Object
eu.dzhw.fdz.metadatamanagement.common.domain.AbstractRdcDomainObject
eu.dzhw.fdz.metadatamanagement.common.domain.AbstractShadowableRdcDomainObject
eu.dzhw.fdz.metadatamanagement.questionmanagement.domain.QuestionImageMetadata
- All Implemented Interfaces:
Serializable
public class QuestionImageMetadata extends AbstractShadowableRdcDomainObject
The metadata for one question images. One question image displays the question in one language
with one given resolution.
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description private @NotNull(message="question-management.error.question-image-metadata.contains-annotations.not-null") Boolean
containsAnnotations
Flag indicating whether the image contains annotations which highlight parts that were only visible to specific participants.private @NotEmpty(message="question-management.error.question-image-metadata.data-acquisition-project-id.not-empty") String
dataAcquisitionProjectId
The id of theDataAcquisitionProject
of theQuestion
to which this image belongs.private @NotEmpty(message="question-management.error.question-image-metadata.file-name.not-empty") @Pattern(message="question-management.error.question-image-metadata.file-name.not-valid",regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.]*$") String
fileName
The name of the images file.private String
id
private @NotNull(message="question-management.error.question-image-metadata.image-type.not-null") ImageType
imageType
The type of this image.private @NotNull(message="question-management.error.question-image-metadata.index-in-question.not-null") Integer
indexInQuestion
The index in theQuestion
of this image.private @NotEmpty(message="question-management.error.question-image-metadata.language.not-empty") @Size(max=32,message="question-management.error.question-image-metadata.language.size") @ValidIsoLanguage(message="question-management.error.question-image-metadata.language.not-supported") String
language
The language of the question text on this image.private String
masterId
The master id of question image metadata.private @NotEmpty(message="question-management.error.question-image-metadata.question-id.not-empty") String
questionId
The id of theQuestion
to which this image belongs.private @Valid Resolution
resolution
The resolution of the image.private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description QuestionImageMetadata()
-
Method Summary
Modifier and Type Method Description void
generateId()
Generate the id of this attachment from the questionId and the fileName.String
getId()
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
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
- Constant Field Values
-
id
-
masterId
The master id of question image metadata. -
imageType
@NotNull(message="question-management.error.question-image-metadata.image-type.not-null") @ValidQuestionImageType(message="question-management.error.question-image-metadata.image-type.valid-question-image-type") private @NotNull(message="question-management.error.question-image-metadata.image-type.not-null") ImageType imageTypeThe type of this image. Must be one ofImageType
and must not be empty. -
language
@NotEmpty(message="question-management.error.question-image-metadata.language.not-empty") @Size(max=32, message="question-management.error.question-image-metadata.language.size") @ValidIsoLanguage(message="question-management.error.question-image-metadata.language.not-supported") private @NotEmpty(message="question-management.error.question-image-metadata.language.not-empty") @Size(max=32,message="question-management.error.question-image-metadata.language.size") @ValidIsoLanguage(message="question-management.error.question-image-metadata.language.not-supported") String languageThe language of the question text on this image. Must not be empty and must be a valid ISO 639 code. -
resolution
The resolution of the image. -
fileName
@NotEmpty(message="question-management.error.question-image-metadata.file-name.not-empty") @Pattern(message="question-management.error.question-image-metadata.file-name.not-valid", regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.]*$") private @NotEmpty(message="question-management.error.question-image-metadata.file-name.not-empty") @Pattern(message="question-management.error.question-image-metadata.file-name.not-valid",regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.]*$") String fileNameThe name of the images file. Must not be empty and must only contain (german) alphanumeric characters and "_","-" and ".". -
containsAnnotations
@NotNull(message="question-management.error.question-image-metadata.contains-annotations.not-null") private @NotNull(message="question-management.error.question-image-metadata.contains-annotations.not-null") Boolean containsAnnotationsFlag indicating whether the image contains annotations which highlight parts that were only visible to specific participants. These annotations were not visible to the participants. -
indexInQuestion
@NotNull(message="question-management.error.question-image-metadata.index-in-question.not-null") private @NotNull(message="question-management.error.question-image-metadata.index-in-question.not-null") Integer indexInQuestion -
questionId
@NotEmpty(message="question-management.error.question-image-metadata.question-id.not-empty") private @NotEmpty(message="question-management.error.question-image-metadata.question-id.not-empty") String questionIdThe id of theQuestion
to which this image belongs. Must not be empty. -
dataAcquisitionProjectId
@NotEmpty(message="question-management.error.question-image-metadata.data-acquisition-project-id.not-empty") private @NotEmpty(message="question-management.error.question-image-metadata.data-acquisition-project-id.not-empty") String dataAcquisitionProjectIdThe id of theDataAcquisitionProject
of theQuestion
to which this image belongs. Must not be empty.
-
-
Constructor Details
-
QuestionImageMetadata
public QuestionImageMetadata()
-
-
Method Details
-
getId
- Specified by:
getId
in classAbstractRdcDomainObject
-
generateId
public void generateId()Generate the id of this attachment from the questionId and the fileName. -
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
-