Class UnsupportedEntityIdValueImpl
java.lang.Object
org.wikidata.wdtk.datamodel.implementation.ValueImpl
org.wikidata.wdtk.datamodel.implementation.UnsupportedEntityIdValueImpl
- All Implemented Interfaces:
EntityIdValue
,IriIdentifiedValue
,UnsupportedEntityIdValue
,Value
Represents a entity id value of an unsupported type.
We can still "deserialize" it by just storing its
JSON representation, so that it can be serialized
back to its original representation.
This avoids parsing failures on documents containing
these values.
- Author:
- Antonin Delpeuch
-
Field Summary
Fields inherited from class org.wikidata.wdtk.datamodel.implementation.ValueImpl
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_TIME
Fields inherited from interface org.wikidata.wdtk.datamodel.interfaces.EntityIdValue
ET_FORM, ET_ITEM, ET_LEXEME, ET_MEDIA_INFO, ET_PROPERTY, ET_SENSE, ET_UNSUPPORTED, SITE_LOCAL
-
Method Summary
Modifier and TypeMethodDescription<T> T
accept
(ValueVisitor<T> valueVisitor) Accept a ValueVisitor and return its output.boolean
Returns the type of this entity.The type of entity as represented in the JSON serialization.getId()
Returns the id of this entity.protected org.wikidata.wdtk.datamodel.implementation.UnsupportedEntityIdValueImpl.JacksonIdValue
getIri()
Get the IRI of this entity.Returns an IRI that identifies the site that this entity comes from,, e.g., "http://www.wikidata.org/entity/" for Wikidata.int
hashCode()
boolean
Checks whether this is a placeholder ID.toString()
-
Method Details
-
toString
-
getEntityType
Description copied from interface:EntityIdValue
Returns the type of this entity. This should be an IRI that identifies an entity type, such asEntityIdValue.ET_ITEM
orEntityIdValue.ET_PROPERTY
.- Specified by:
getEntityType
in interfaceEntityIdValue
- Returns:
- IRI string to identify the type of the entity
-
getId
Description copied from interface:EntityIdValue
Returns the id of this entity.- Specified by:
getId
in interfaceEntityIdValue
- Returns:
- String id of this entity
-
getInnerValue
protected org.wikidata.wdtk.datamodel.implementation.UnsupportedEntityIdValueImpl.JacksonIdValue getInnerValue() -
getSiteIri
Description copied from interface:EntityIdValue
Returns an IRI that identifies the site that this entity comes from,, e.g., "http://www.wikidata.org/entity/" for Wikidata.- Specified by:
getSiteIri
in interfaceEntityIdValue
- Returns:
- the site IRI string
-
getIri
Description copied from interface:IriIdentifiedValue
Get the IRI of this entity.- Specified by:
getIri
in interfaceIriIdentifiedValue
- Returns:
- String with the IRI
-
isPlaceholder
public boolean isPlaceholder()Description copied from interface:EntityIdValue
Checks whether this is a placeholder ID. Placeholder IDs, for exampleItemIdValue.NULL
, are often used when creating new entities.- Specified by:
isPlaceholder
in interfaceEntityIdValue
- Returns:
true
if this is a placeholder ID,false
otherwise
-
hashCode
public int hashCode() -
equals
-
accept
Description copied from interface:Value
Accept a ValueVisitor and return its output. -
getEntityTypeJsonString
Description copied from interface:UnsupportedEntityIdValue
The type of entity as represented in the JSON serialization.- Specified by:
getEntityTypeJsonString
in interfaceUnsupportedEntityIdValue
-