Class DataSetAttachmentMetadata
java.lang.Object
eu.dzhw.fdz.metadatamanagement.common.domain.AbstractRdcDomainObject
eu.dzhw.fdz.metadatamanagement.common.domain.AbstractShadowableRdcDomainObject
eu.dzhw.fdz.metadatamanagement.datasetmanagement.domain.DataSetAttachmentMetadata
- All Implemented Interfaces:
Serializable
Metadata which will be stored with each attachment of a
DataSet.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @NotEmpty(message="data-set-management.error.data-set-attachment-metadata.project-id.not-empty") StringThe id of theDataAcquisitionProjectto which theDataSetof this attachment belongs.private @NotEmpty(message="data-set-management.error.data-set-attachment-metadata.data-set-id.not-empty") StringThe id of theDataSetto which this attachment belongs.private @NotNull(message="data-set-management.error.data-set-attachment-metadata.data-set-number.not-null") IntegerThe number of theDataSetto which this attachment belongs.private @NotNull(message="data-set-management.error.data-set-attachment-metadata.description.not-null") @I18nStringSize(max=512,message="data-set-management.error.data-set-attachment-metadata.description.i18n-string-size") I18nStringA description for this attachment.private @Size(max=512,message="attachment.error.doi.size") @Pattern(message="attachment.error.doi.pattern",regexp="^https:\\/\\/doi.org\\/([_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\/\\:.]{1,}$)") StringThe doi of the attachment.private @NotEmpty(message="data-set-management.error.data-set-attachment-metadata.filename.not-empty") @Pattern(message="data-set-management.error.data-set-attachment-metadata.filename.not-valid",regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.]*$") StringThe filename of the attachment.private StringThe id of the attachment.private @NotNull(message="data-set-management.error.data-set-attachment-metadata.index-in-data-set.not-null") IntegerThe index in theDataSetof this attachment.private @NotNull(message="data-set-management.error.data-set-attachment-metadata.language.not-null") @ValidIsoLanguage(message="data-set-management.error.data-set-attachment-metadata.language.not-supported") StringThe language of the attachments content.private Stringprivate static final longprivate @NotEmpty(message="data-set-management.error.data-set-attachment-metadata.title.not-null") @Size(max=2048,message="data-set-management.error.data-set-attachment-metadata.title.string-size") StringThe title of the attachment in the language of the attachment. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidGenerate the id of this attachment from the dataSetId and the fileName.protected voidsetIdInternal(String id) Set id on implementation ofAbstractShadowableRdcDomainObject.protected voidsetMasterIdInternal(String masterId) Set masterId on implementations ofAbstractShadowableRdcDomainObject.Methods inherited from class eu.dzhw.fdz.metadatamanagement.common.domain.AbstractShadowableRdcDomainObject
getMasterId, setId, setMasterIdMethods inherited from class eu.dzhw.fdz.metadatamanagement.common.domain.AbstractRdcDomainObject
getId
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
id
The id of the attachment. Holds the complete path which can be used to download the file. -
masterId
-
dataSetId
@NotEmpty(message="data-set-management.error.data-set-attachment-metadata.data-set-id.not-empty") private @NotEmpty(message="data-set-management.error.data-set-attachment-metadata.data-set-id.not-empty") String dataSetIdThe id of theDataSetto which this attachment belongs. Must not be empty. -
dataAcquisitionProjectId
@NotEmpty(message="data-set-management.error.data-set-attachment-metadata.project-id.not-empty") private @NotEmpty(message="data-set-management.error.data-set-attachment-metadata.project-id.not-empty") String dataAcquisitionProjectIdThe id of theDataAcquisitionProjectto which theDataSetof this attachment belongs. Must not be empty. -
description
@NotNull(message="data-set-management.error.data-set-attachment-metadata.description.not-null") @I18nStringSize(max=512, message="data-set-management.error.data-set-attachment-metadata.description.i18n-string-size") @I18nStringNotEmpty(message="data-set-management.error.data-set-attachment-metadata.description.i18n-string-not-empty") private @NotNull(message="data-set-management.error.data-set-attachment-metadata.description.not-null") @I18nStringSize(max=512,message="data-set-management.error.data-set-attachment-metadata.description.i18n-string-size") I18nString descriptionA description for this attachment. It must be specified in at least one language and it must not contain more than 512 characters. -
title
@NotEmpty(message="data-set-management.error.data-set-attachment-metadata.title.not-null") @Size(max=2048, message="data-set-management.error.data-set-attachment-metadata.title.string-size") private @NotEmpty(message="data-set-management.error.data-set-attachment-metadata.title.not-null") @Size(max=2048,message="data-set-management.error.data-set-attachment-metadata.title.string-size") String titleThe title of the attachment in the language of the attachment. Must not be empty and must not contain more than 2048 characters. -
language
@NotNull(message="data-set-management.error.data-set-attachment-metadata.language.not-null") @ValidIsoLanguage(message="data-set-management.error.data-set-attachment-metadata.language.not-supported") private @NotNull(message="data-set-management.error.data-set-attachment-metadata.language.not-null") @ValidIsoLanguage(message="data-set-management.error.data-set-attachment-metadata.language.not-supported") String languageThe language of the attachments content. Must not be empty and must be specified as ISO 639 language code. -
fileName
@NotEmpty(message="data-set-management.error.data-set-attachment-metadata.filename.not-empty") @Pattern(message="data-set-management.error.data-set-attachment-metadata.filename.not-valid", regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.]*$") private @NotEmpty(message="data-set-management.error.data-set-attachment-metadata.filename.not-empty") @Pattern(message="data-set-management.error.data-set-attachment-metadata.filename.not-valid",regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.]*$") String fileNameThe filename of the attachment. Must not be empty and must contain only (german) alphanumeric characters and "_" and "-" and ".". -
dataSetNumber
@NotNull(message="data-set-management.error.data-set-attachment-metadata.data-set-number.not-null") private @NotNull(message="data-set-management.error.data-set-attachment-metadata.data-set-number.not-null") Integer dataSetNumberThe number of theDataSetto which this attachment belongs. Must not be empty. -
indexInDataSet
@NotNull(message="data-set-management.error.data-set-attachment-metadata.index-in-data-set.not-null") private @NotNull(message="data-set-management.error.data-set-attachment-metadata.index-in-data-set.not-null") Integer indexInDataSet -
doi
@Size(max=512, message="attachment.error.doi.size") @Pattern(message="attachment.error.doi.pattern", regexp="^https:\\/\\/doi.org\\/([_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\/\\:.]{1,}$)") private @Size(max=512,message="attachment.error.doi.size") @Pattern(message="attachment.error.doi.pattern",regexp="^https:\\/\\/doi.org\\/([_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\/\\:.]{1,}$)") String doiThe doi of the attachment. Must not contain more than 512 characters. Must match the pattern of a doi-url https://doi.org/{id}
-
-
Constructor Details
-
DataSetAttachmentMetadata
public DataSetAttachmentMetadata()
-
-
Method Details
-
generateId
public void generateId()Generate the id of this attachment from the dataSetId and the fileName. -
setMasterIdInternal
Description copied from class:AbstractShadowableRdcDomainObjectSet masterId on implementations ofAbstractShadowableRdcDomainObject.- Specified by:
setMasterIdInternalin classAbstractShadowableRdcDomainObject- Parameters:
masterId- Master Id
-
setIdInternal
Description copied from class:AbstractShadowableRdcDomainObjectSet id on implementation ofAbstractShadowableRdcDomainObject.- Specified by:
setIdInternalin classAbstractShadowableRdcDomainObject- Parameters:
id- Id
-