public interface EntityIdValue extends IriIdentifiedValue
When considering entities from multiple sites, the (local) ID alone is not enough to identify an entity unambiguously. In this case, the site IRI also needs to be taken into account.
An alternative to using the local ID and site IRI together is to use the full IRI. By default, this is computed by appending the local ID to the site IRI. However, for some sites and some entity types, more elaborate computations might be required, so this construction scheme for IRIs should not be presumed.
The full IRI of an entity is used in export formats like RDF, but also internally, e.g., for identifying the calendar model of time values.
Modifier and Type | Field and Description |
---|---|
static String |
ET_FORM
IRI of the type of an entity that is a form.
|
static String |
ET_ITEM
IRI of the type of an entity that is an item.
|
static String |
ET_LEXEME
IRI of the type of an entity that is a lexeme.
|
static String |
ET_MEDIA_INFO
IRI of the type of an entity that is a media info.
|
static String |
ET_PROPERTY
IRI of the type of an entity that is a property.
|
static String |
ET_SENSE
IRI of the type of an entity that is a sense.
|
static String |
ET_UNSUPPORTED
IRI of the type of an unsupported entity, when no type could be
detected from the JSON representation.
|
static String |
SITE_LOCAL
The site IRI of "local" identifiers.
|
Modifier and Type | Method and Description |
---|---|
String |
getEntityType()
Returns the type of this entity.
|
String |
getId()
Returns the id of this entity.
|
String |
getSiteIri()
Returns an IRI that identifies the site that this entity comes from,,
e.g., "http://www.wikidata.org/entity/" for Wikidata.
|
boolean |
isPlaceholder()
Checks whether this is a placeholder ID.
|
getIri
static final String ET_ITEM
static final String ET_PROPERTY
static final String ET_LEXEME
static final String ET_FORM
static final String ET_SENSE
static final String ET_MEDIA_INFO
static final String ET_UNSUPPORTED
static final String SITE_LOCAL
String getEntityType()
ET_ITEM
or
ET_PROPERTY
.String getId()
String getSiteIri()
boolean isPlaceholder()
ItemIdValue.NULL
, are often used when creating new entities.true
if this is a placeholder ID, false
otherwiseCopyright © 2014–2024 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage