Class InstrumentAttachmentMetadata

All Implemented Interfaces:
Serializable

public class InstrumentAttachmentMetadata
extends AbstractShadowableRdcDomainObject
Metadata which will be stored with each attachment of a Instrument.
See Also:
Serialized Form
  • Field Summary

    Fields
    Modifier and Type Field Description
    private @NotEmpty(message="instrument-management.error.instrument-attachment-metadata.project-id.not-empty") String dataAcquisitionProjectId
    The id of the DataAcquisitionProject to which the Instrument of this attachment belongs.
    private @NotNull(message="instrument-management.error.instrument-attachment-metadata.description.not-null") @I18nStringSize(max=512,message="instrument-management.error.instrument-attachment-metadata.description.i18n-string-size") I18nString description
    A 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,}$)") String doi
    The doi of the attachment.
    private @NotEmpty(message="instrument-management.error.instrument-attachment-metadata.filename.not-empty") @Pattern(message="instrument-management.error.instrument-attachment-metadata.filename.not-valid",regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.]*$") String fileName
    The filename of the attachment.
    private String id
    The id of the attachment.
    private @NotNull(message="instrument-management.error.instrument-attachment-metadata.index-in-instrument.not-null") Integer indexInInstrument
    The index in the Instrument of this attachment.
    private @NotEmpty(message="instrument-management.error.instrument-attachment-metadata.instrument-id.not-empty") String instrumentId
    The id of the Instrument to which this attachment belongs.
    private @NotNull(message="instrument-management.error.instrument-attachment-metadata.instrument-number.not-null") Integer instrumentNumber
    The number of the Instrument to which this attachment belongs.
    private @NotNull(message="instrument-management.error.instrument-attachment-metadata.language.not-null") @ValidIsoLanguage(message="instrument-management.error.instrument-attachment-metadata.language.not-supported") String language
    The language of the attachments content.
    private String masterId
    The master id of the instrument attachment metadata.
    private static long serialVersionUID  
    private @NotNull(message="instrument-management.error.instrument-attachment-metadata.type.not-null") @I18nStringSize(min=1,max=32,message="instrument-management.error.instrument-attachment-metadata.type.i18n-string-size") I18nString type
    The type of this attachment.
  • Constructor Summary

    Constructors
    Constructor Description
    InstrumentAttachmentMetadata()  
  • Method Summary

    Modifier and Type Method Description
    void generateId()
    Generate the id of this attachment from the instrumentId and the fileName.
    protected void setIdInternal​(String id)
    Set id on implementation of AbstractShadowableRdcDomainObject.
    protected void setMasterIdInternal​(String masterId)
    Set masterId on implementations of AbstractShadowableRdcDomainObject.

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
      Constant Field Values
    • id

      private String id
      The id of the attachment. Holds the complete path which can be used to download the file.
    • masterId

      private String masterId
      The master id of the instrument attachment metadata.
    • instrumentId

      @NotEmpty(message="instrument-management.error.instrument-attachment-metadata.instrument-id.not-empty") private @NotEmpty(message="instrument-management.error.instrument-attachment-metadata.instrument-id.not-empty") String instrumentId
      The id of the Instrument to which this attachment belongs. Must not be empty.
    • dataAcquisitionProjectId

      @NotEmpty(message="instrument-management.error.instrument-attachment-metadata.project-id.not-empty") private @NotEmpty(message="instrument-management.error.instrument-attachment-metadata.project-id.not-empty") String dataAcquisitionProjectId
      The id of the DataAcquisitionProject to which the Instrument of this attachment belongs. Must not be empty.
    • type

      @NotNull(message="instrument-management.error.instrument-attachment-metadata.type.not-null") @I18nStringSize(min=1, max=32, message="instrument-management.error.instrument-attachment-metadata.type.i18n-string-size") @ValidInstrumentAttachmentType(message="instrument-management.error.instrument-attachment-metadata.type.valid-type") private @NotNull(message="instrument-management.error.instrument-attachment-metadata.type.not-null") @I18nStringSize(min=1,max=32,message="instrument-management.error.instrument-attachment-metadata.type.i18n-string-size") I18nString type
      The type of this attachment. Must not be empty and must be one of InstrumentAttachmentTypes.
    • description

      @NotNull(message="instrument-management.error.instrument-attachment-metadata.description.not-null") @I18nStringSize(max=512, message="instrument-management.error.instrument-attachment-metadata.description.i18n-string-size") @I18nStringNotEmpty(message="instrument-management.error.instrument-attachment-metadata.description.i18n-string-not-empty") private @NotNull(message="instrument-management.error.instrument-attachment-metadata.description.not-null") @I18nStringSize(max=512,message="instrument-management.error.instrument-attachment-metadata.description.i18n-string-size") I18nString description
      A description for this attachment. It must be specified in at least one language and it must not contain more than 512 characters.
    • language

      @NotNull(message="instrument-management.error.instrument-attachment-metadata.language.not-null") @ValidIsoLanguage(message="instrument-management.error.instrument-attachment-metadata.language.not-supported") private @NotNull(message="instrument-management.error.instrument-attachment-metadata.language.not-null") @ValidIsoLanguage(message="instrument-management.error.instrument-attachment-metadata.language.not-supported") String language
      The language of the attachments content. Must not be empty and must be specified as ISO 639 language code.
    • fileName

      @NotEmpty(message="instrument-management.error.instrument-attachment-metadata.filename.not-empty") @Pattern(message="instrument-management.error.instrument-attachment-metadata.filename.not-valid", regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.]*$") private @NotEmpty(message="instrument-management.error.instrument-attachment-metadata.filename.not-empty") @Pattern(message="instrument-management.error.instrument-attachment-metadata.filename.not-valid",regexp="^[_A-Za-z0-9\u00e4\u00f6\u00fc\u00c4\u00d6\u00dc\u00df\\-\\.]*$") String fileName
      The filename of the attachment. Must not be empty and must contain only (german) alphanumeric characters and "_" and "-" and ".".
    • instrumentNumber

      @NotNull(message="instrument-management.error.instrument-attachment-metadata.instrument-number.not-null") private @NotNull(message="instrument-management.error.instrument-attachment-metadata.instrument-number.not-null") Integer instrumentNumber
      The number of the Instrument to which this attachment belongs. Must not be empty.
    • indexInInstrument

      @NotNull(message="instrument-management.error.instrument-attachment-metadata.index-in-instrument.not-null") private @NotNull(message="instrument-management.error.instrument-attachment-metadata.index-in-instrument.not-null") Integer indexInInstrument
      The index in the Instrument of this attachment. Used for sorting the attachments of this Instrument. Must not be empty.
    • 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 doi
      The 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

    • InstrumentAttachmentMetadata

      public InstrumentAttachmentMetadata()
  • Method Details