Package org.gbif.api.model.common
Class Identifier
- java.lang.Object
-
- org.gbif.api.model.common.Identifier
-
public class Identifier extends Object
Identifier Model Object represents an alternative identifier for an occurrence or name usage.- See Also:
- Identifier Definition
-
-
Constructor Summary
Constructors Constructor Description Identifier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
@NotNull String
getIdentifier()
Other known identifier used for the same taxon.String
getIdentifierLink()
Creates an HTTP link for an identifier if possible by passing it to some known resolvers for the specific id type.String
getTitle()
The optional title of an identifier, mostly for linking.@NotNull IdentifierType
getType()
Type of identifier.int
hashCode()
void
setIdentifier(String identifier)
void
setTitle(String title)
void
setType(IdentifierType type)
String
toString()
-
-
-
Constructor Detail
-
Identifier
public Identifier()
-
-
Method Detail
-
getIdentifier
@NotNull public @NotNull String getIdentifier()
Other known identifier used for the same taxon. Can be a URL pointing to a webpage, an XML or RDF document, a DOI, UUID or any other identifer.Example: urn:lsid:ipni.org:names:692570-1:1.4
- Returns:
- the identifier.
-
setIdentifier
public void setIdentifier(String identifier)
- Parameters:
identifier
- the identifier to set
-
getTitle
@Nullable public String getTitle()
The optional title of an identifier, mostly for linking.- Returns:
- the title
-
getType
@NotNull public @NotNull IdentifierType getType()
Type of identifier.- Returns:
- the type
- See Also:
IdentifierType
-
setType
public void setType(IdentifierType type)
- Parameters:
type
- the type to set
-
getIdentifierLink
@Nullable public String getIdentifierLink()
Creates an 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:
IdentifierUtils.getIdentifierLink(String, org.gbif.api.vocabulary.IdentifierType)
-
-