public abstract class EntityIdValueImpl extends ValueImpl implements EntityIdValue
EntityIdValue for Jackson.| Modifier and Type | Field and Description |
|---|---|
static String |
JSON_ENTITY_TYPE_FORM
The string used in JSON to denote the type of entity id values that are
lexemes forms.
|
static String |
JSON_ENTITY_TYPE_ITEM
The string used in JSON to denote the type of entity id values that are
items.
|
static String |
JSON_ENTITY_TYPE_LEXEME
The string used in JSON to denote the type of entity id values that are
lexemes.
|
static String |
JSON_ENTITY_TYPE_MEDIA_INFO
The string used in JSON to denote the type of entity id values that are
media info.
|
static String |
JSON_ENTITY_TYPE_PROPERTY
The string used in JSON to denote the type of entity id values that are
properties.
|
static String |
JSON_ENTITY_TYPE_SENSE
The string used in JSON to denote the type of entity id values that are
lexemes senses.
|
JSON_VALUE_TYPE_ENTITY_ID, JSON_VALUE_TYPE_GLOBE_COORDINATES, JSON_VALUE_TYPE_MONOLINGUAL_TEXT, JSON_VALUE_TYPE_QUANTITY, JSON_VALUE_TYPE_STRING, JSON_VALUE_TYPE_TIMEET_FORM, ET_ITEM, ET_LEXEME, ET_MEDIA_INFO, ET_PROPERTY, ET_SENSE, ET_UNSUPPORTED, SITE_LOCAL| Modifier | Constructor and Description |
|---|---|
protected |
EntityIdValueImpl(org.wikidata.wdtk.datamodel.implementation.EntityIdValueImpl.JacksonInnerEntityId value,
String siteIri)
Constructor used for deserialization with Jackson.
|
protected |
EntityIdValueImpl(String id,
String siteIri)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertHasJsonEntityType(String expectedType) |
static EntityIdValue |
fromId(String id,
String siteIri)
Parses an item id
|
String |
getId()
Returns the id of this entity.
|
String |
getIri()
Get the IRI 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.
|
org.wikidata.wdtk.datamodel.implementation.EntityIdValueImpl.JacksonInnerEntityId |
getValue()
Returns the inner value helper object.
|
static String |
guessEntityTypeFromId(String id)
Returns the entity type of the id like "item" or "property"
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEntityType, isPlaceholderpublic static final String JSON_ENTITY_TYPE_ITEM
public static final String JSON_ENTITY_TYPE_PROPERTY
public static final String JSON_ENTITY_TYPE_LEXEME
public static final String JSON_ENTITY_TYPE_FORM
public static final String JSON_ENTITY_TYPE_SENSE
public static final String JSON_ENTITY_TYPE_MEDIA_INFO
protected EntityIdValueImpl(String id, String siteIri)
id - the identifier of the entity, such as "Q42"siteIri - the siteIRI that this value refers toprotected EntityIdValueImpl(org.wikidata.wdtk.datamodel.implementation.EntityIdValueImpl.JacksonInnerEntityId value,
String siteIri)
public static EntityIdValue fromId(String id, String siteIri)
id - the identifier of the entity, such as "Q42"siteIri - the siteIRI that this value refers toIllegalArgumentException - if the id is invalidpublic static String guessEntityTypeFromId(String id)
id - the identifier of the entity, such as "Q42"IllegalArgumentException - if the id is invalidpublic org.wikidata.wdtk.datamodel.implementation.EntityIdValueImpl.JacksonInnerEntityId getValue()
public String getIri()
IriIdentifiedValuegetIri in interface IriIdentifiedValuepublic String getId()
EntityIdValuegetId in interface EntityIdValuepublic String getSiteIri()
EntityIdValuegetSiteIri in interface EntityIdValueprotected void assertHasJsonEntityType(String expectedType)
Copyright © 2014–2022 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage