Package org.gbif.api.model.registry
Class Identifier
java.lang.Object
org.gbif.api.model.registry.Identifier
- All Implemented Interfaces:
Serializable
,LenientEquals<Identifier>
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date
@Size(min=3) String
@NotNull @Size(min=1) String
Creates a http link for an identifier if possible by passing it to some known resolvers for the specific id type.@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) @Min(1L) Integer
getKey()
@NotNull IdentifierType
getType()
int
hashCode()
boolean
boolean
lenientEquals
(Identifier other) A lenient equality check ignoring server controlled values (createdBy, key etc).void
setCreated
(Date created) void
setCreatedBy
(String createdBy) void
setIdentifier
(String identifier) void
void
setPrimary
(boolean primary) void
setType
(IdentifierType type) toString()
-
Constructor Details
-
Identifier
public Identifier() -
Identifier
-
-
Method Details
-
getKey
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) @Min(1L) public @Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) @Min(1L) Integer getKey() -
setKey
-
getType
-
setType
-
getIdentifier
-
setIdentifier
-
getCreatedBy
-
setCreatedBy
-
getCreated
@Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) public @Null(groups=PrePersist.class) @NotNull(groups=PostPersist.class) Date getCreated() -
setCreated
-
isPrimary
-
setPrimary
-
getIdentifierLink
Creates a http link for an identifier if possible by passing it to some known resolvers for the specific id type. If no link can be constructed, null is returned.- Returns:
- the url or null if it cannot be created
- See Also:
-
equals
-
hashCode
-
toString
-
lenientEquals
A lenient equality check ignoring server controlled values (createdBy, key etc).- Specified by:
lenientEquals
in interfaceLenientEquals<Identifier>
- Parameters:
other
- To compare against- Returns:
- true if...
-