Package org.gbif.api.model.collections
Class Collection
- java.lang.Object
-
- org.gbif.api.model.collections.Collection
-
- All Implemented Interfaces:
Serializable
,CollectionEntity
,Contactable
,OccurrenceMappeable
,Commentable
,Identifiable
,LenientEquals<Collection>
,MachineTaggable
,Taggable
public class Collection extends Object implements CollectionEntity, LenientEquals<Collection>
A group of specimens or other natural history objects. Types of collections can be: specimens, original artwork, archives, observations, library materials, datasets, photographs or mixed collections such as those that result from expeditions and voyages of discovery.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Collection()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMachineTag(MachineTag machineTag)
@Valid Address
getAddress()
Address where this collection is situated.List<AlternativeCode>
getAlternativeCodes()
Alternative codes for a collection.List<URI>
getApiUrls()
Machine consumable endpoint of information about a collection.List<URI>
getCatalogUrls()
URI that exposes data about the catalog associated to a collection.String
getCity()
@NotNull(groups=PrePersist.class) String
getCode()
Collection code: identifies a collection at the owner's location.@NotNull List<Comment>
getComments()
@Valid List<Contact>
getContactPersons()
List of associated contacts.String
getCountry()
Date
getCreated()
Date when the records as created.String
getCreatedBy()
Creator of the database record.Date
getDeleted()
Date when the records was (logically) deleted.@Size(min=1) String
getDescription()
Textual description/summary of the contents of a collection.Boolean
getDisplayOnNHCPortal()
Flag to display the entity in the NHC portal.List<String>
getEmail()
Emails of the entityString
getFeaturedImageAttribution()
License
getFeaturedImageLicense()
URI
getFeaturedImageUrl()
URI
getHomepage()
URL containing information about a collection.List<Identifier>
getIdentifiers()
List of alternative identifiers: UUIDs, external system identifiers, LSIDs, etc..UUID
getKey()
GBIF Unique identifier of this collection.@Valid @NotNull List<MachineTag>
getMachineTags()
@Valid Address
getMailingAddress()
Address used to send/receive physical mail.MasterSourceType
getMasterSource()
Master source of the entity.MasterSourceMetadata
getMasterSourceMetadata()
Master source metadataDate
getModified()
Date when the records was last modified.String
getModifiedBy()
Person or agent that modified the database record.@NotNull String
getName()
Descriptive name of a collection.@NotNull List<OccurrenceMapping>
getOccurrenceMappings()
List<String>
getPhone()
Phones of the entityString
getProvince()
UUID
getReplacedBy()
Replacement of the entity (if applies).@Valid List<Tag>
getTags()
(Meta)Tags or labels.String
getTemporalCoverage()
boolean
isActive()
Is this collection currently active/maintained.boolean
lenientEquals(Collection other)
Leniently tests if the objects are the same.void
setActive(boolean active)
void
setAddress(Address address)
void
setAlternativeCodes(List<AlternativeCode> alternativeCodes)
void
setCode(String code)
void
setComments(List<Comment> comments)
void
setContactPersons(List<Contact> contactPersons)
void
setCreated(Date created)
void
setCreatedBy(String createdBy)
void
setDeleted(Date deleted)
void
setDescription(String description)
void
setDisplayOnNHCPortal(Boolean displayOnNHCPortal)
void
setEmail(List<String> email)
void
setFeaturedImageAttribution(String featuredImageAttribution)
void
setFeaturedImageLicense(License featuredImageLicense)
void
setFeaturedImageUrl(URI featuredImageUrl)
void
setIdentifiers(List<Identifier> identifiers)
void
setKey(UUID key)
void
setMachineTags(List<MachineTag> machineTags)
void
setMailingAddress(Address mailingAddress)
void
setMasterSource(MasterSourceType masterSource)
void
setMasterSourceMetadata(MasterSourceMetadata masterSourceMetadata)
void
setModified(Date modified)
void
setModifiedBy(String modifiedBy)
void
setName(String name)
void
setOccurrenceMappings(List<OccurrenceMapping> occurrenceMappings)
void
setPhone(List<String> phone)
void
setReplacedBy(UUID replacedBy)
void
setTags(List<Tag> tags)
-
-
-
Constructor Detail
-
Collection
public Collection()
-
-
Method Detail
-
getIdentifiers
public List<Identifier> getIdentifiers()
List of alternative identifiers: UUIDs, external system identifiers, LSIDs, etc..- Specified by:
getIdentifiers
in interfaceIdentifiable
-
setIdentifiers
public void setIdentifiers(List<Identifier> identifiers)
- Specified by:
setIdentifiers
in interfaceIdentifiable
-
getKey
public UUID getKey()
GBIF Unique identifier of this collection.- Specified by:
getKey
in interfaceCollectionEntity
-
setKey
public void setKey(UUID key)
- Specified by:
setKey
in interfaceCollectionEntity
-
getCode
@NotNull(groups=PrePersist.class) public @NotNull(groups=PrePersist.class) String getCode()
Collection code: identifies a collection at the owner's location.- Specified by:
getCode
in interfaceCollectionEntity
-
setCode
public void setCode(String code)
- Specified by:
setCode
in interfaceCollectionEntity
-
getName
@NotNull public @NotNull String getName()
Descriptive name of a collection.- Specified by:
getName
in interfaceCollectionEntity
-
setName
public void setName(String name)
- Specified by:
setName
in interfaceCollectionEntity
-
getDescription
@Size(min=1) public @Size(min=1) String getDescription()
Textual description/summary of the contents of a collection.- Specified by:
getDescription
in interfaceCollectionEntity
-
setDescription
public void setDescription(String description)
- Specified by:
setDescription
in interfaceCollectionEntity
-
isActive
public boolean isActive()
Is this collection currently active/maintained.- Specified by:
isActive
in interfaceCollectionEntity
-
setActive
public void setActive(boolean active)
- Specified by:
setActive
in interfaceCollectionEntity
-
getEmail
public List<String> getEmail()
Description copied from interface:CollectionEntity
Emails of the entity- Specified by:
getEmail
in interfaceCollectionEntity
-
setEmail
public void setEmail(List<String> email)
- Specified by:
setEmail
in interfaceCollectionEntity
-
getPhone
public List<String> getPhone()
Description copied from interface:CollectionEntity
Phones of the entity- Specified by:
getPhone
in interfaceCollectionEntity
-
setPhone
public void setPhone(List<String> phone)
- Specified by:
setPhone
in interfaceCollectionEntity
-
getHomepage
@Nullable public URI getHomepage()
URL containing information about a collection.
-
getCatalogUrls
@Nullable public List<URI> getCatalogUrls()
URI that exposes data about the catalog associated to a collection.
-
getApiUrls
@Nullable public List<URI> getApiUrls()
Machine consumable endpoint of information about a collection.
-
getMailingAddress
@Nullable @Valid public @Valid Address getMailingAddress()
Address used to send/receive physical mail.- Specified by:
getMailingAddress
in interfaceContactable
-
setMailingAddress
public void setMailingAddress(Address mailingAddress)
- Specified by:
setMailingAddress
in interfaceContactable
-
getAddress
@Nullable @Valid public @Valid Address getAddress()
Address where this collection is situated.- Specified by:
getAddress
in interfaceContactable
-
setAddress
public void setAddress(Address address)
- Specified by:
setAddress
in interfaceContactable
-
getCreatedBy
public String getCreatedBy()
Description copied from interface:CollectionEntity
Creator of the database record.- Specified by:
getCreatedBy
in interfaceCollectionEntity
-
setCreatedBy
public void setCreatedBy(String createdBy)
- Specified by:
setCreatedBy
in interfaceCollectionEntity
-
getModifiedBy
public String getModifiedBy()
Description copied from interface:CollectionEntity
Person or agent that modified the database record.- Specified by:
getModifiedBy
in interfaceCollectionEntity
-
setModifiedBy
public void setModifiedBy(String modifiedBy)
- Specified by:
setModifiedBy
in interfaceCollectionEntity
-
getCreated
public Date getCreated()
Description copied from interface:CollectionEntity
Date when the records as created.- Specified by:
getCreated
in interfaceCollectionEntity
-
setCreated
public void setCreated(Date created)
- Specified by:
setCreated
in interfaceCollectionEntity
-
getModified
public Date getModified()
Description copied from interface:CollectionEntity
Date when the records was last modified.- Specified by:
getModified
in interfaceCollectionEntity
-
setModified
public void setModified(Date modified)
- Specified by:
setModified
in interfaceCollectionEntity
-
getDeleted
public Date getDeleted()
Description copied from interface:CollectionEntity
Date when the records was (logically) deleted.- Specified by:
getDeleted
in interfaceCollectionEntity
-
setDeleted
public void setDeleted(Date deleted)
- Specified by:
setDeleted
in interfaceCollectionEntity
-
getContactPersons
@Valid public @Valid List<Contact> getContactPersons()
Description copied from interface:Contactable
List of associated contacts.- Specified by:
getContactPersons
in interfaceContactable
-
setContactPersons
public void setContactPersons(List<Contact> contactPersons)
- Specified by:
setContactPersons
in interfaceContactable
-
getMachineTags
@Valid @NotNull public @Valid @NotNull List<MachineTag> getMachineTags()
- Specified by:
getMachineTags
in interfaceMachineTaggable
-
setMachineTags
public void setMachineTags(List<MachineTag> machineTags)
- Specified by:
setMachineTags
in interfaceMachineTaggable
-
addMachineTag
public void addMachineTag(MachineTag machineTag)
- Specified by:
addMachineTag
in interfaceMachineTaggable
-
getAlternativeCodes
public List<AlternativeCode> getAlternativeCodes()
Alternative codes for a collection.- Specified by:
getAlternativeCodes
in interfaceCollectionEntity
-
setAlternativeCodes
public void setAlternativeCodes(List<AlternativeCode> alternativeCodes)
- Specified by:
setAlternativeCodes
in interfaceCollectionEntity
-
getComments
@NotNull public @NotNull List<Comment> getComments()
- Specified by:
getComments
in interfaceCommentable
-
setComments
public void setComments(List<Comment> comments)
- Specified by:
setComments
in interfaceCommentable
-
getOccurrenceMappings
@NotNull public @NotNull List<OccurrenceMapping> getOccurrenceMappings()
- Specified by:
getOccurrenceMappings
in interfaceOccurrenceMappeable
-
setOccurrenceMappings
public void setOccurrenceMappings(List<OccurrenceMapping> occurrenceMappings)
- Specified by:
setOccurrenceMappings
in interfaceOccurrenceMappeable
-
getReplacedBy
public UUID getReplacedBy()
Description copied from interface:CollectionEntity
Replacement of the entity (if applies).- Specified by:
getReplacedBy
in interfaceCollectionEntity
-
setReplacedBy
public void setReplacedBy(UUID replacedBy)
- Specified by:
setReplacedBy
in interfaceCollectionEntity
-
getMasterSource
public MasterSourceType getMasterSource()
Description copied from interface:CollectionEntity
Master source of the entity.- Specified by:
getMasterSource
in interfaceCollectionEntity
-
setMasterSource
public void setMasterSource(MasterSourceType masterSource)
- Specified by:
setMasterSource
in interfaceCollectionEntity
-
getMasterSourceMetadata
public MasterSourceMetadata getMasterSourceMetadata()
Description copied from interface:CollectionEntity
Master source metadata- Specified by:
getMasterSourceMetadata
in interfaceCollectionEntity
-
setMasterSourceMetadata
public void setMasterSourceMetadata(MasterSourceMetadata masterSourceMetadata)
- Specified by:
setMasterSourceMetadata
in interfaceCollectionEntity
-
getDisplayOnNHCPortal
public Boolean getDisplayOnNHCPortal()
Description copied from interface:CollectionEntity
Flag to display the entity in the NHC portal.- Specified by:
getDisplayOnNHCPortal
in interfaceCollectionEntity
-
setDisplayOnNHCPortal
public void setDisplayOnNHCPortal(Boolean displayOnNHCPortal)
- Specified by:
setDisplayOnNHCPortal
in interfaceCollectionEntity
-
getFeaturedImageUrl
@Nullable public URI getFeaturedImageUrl()
- Specified by:
getFeaturedImageUrl
in interfaceCollectionEntity
-
setFeaturedImageUrl
public void setFeaturedImageUrl(URI featuredImageUrl)
- Specified by:
setFeaturedImageUrl
in interfaceCollectionEntity
-
getFeaturedImageLicense
@Nullable public License getFeaturedImageLicense()
- Specified by:
getFeaturedImageLicense
in interfaceCollectionEntity
-
setFeaturedImageLicense
public void setFeaturedImageLicense(License featuredImageLicense)
- Specified by:
setFeaturedImageLicense
in interfaceCollectionEntity
-
getTemporalCoverage
@Nullable public String getTemporalCoverage()
-
getCountry
public String getCountry()
-
getProvince
public String getProvince()
-
getFeaturedImageAttribution
@Nullable public String getFeaturedImageAttribution()
- Specified by:
getFeaturedImageAttribution
in interfaceCollectionEntity
-
setFeaturedImageAttribution
public void setFeaturedImageAttribution(String featuredImageAttribution)
- Specified by:
setFeaturedImageAttribution
in interfaceCollectionEntity
-
lenientEquals
public boolean lenientEquals(Collection other)
Description copied from interface:LenientEquals
Leniently tests if the objects are the same. Implementors should declare what this means in practice.- Specified by:
lenientEquals
in interfaceLenientEquals<Collection>
- Parameters:
other
- To compare against- Returns:
- true if...
-
-