Class UnsupportedEntityIdValueImpl

java.lang.Object
org.wikidata.wdtk.datamodel.implementation.ValueImpl
org.wikidata.wdtk.datamodel.implementation.UnsupportedEntityIdValueImpl
All Implemented Interfaces:
EntityIdValue, IriIdentifiedValue, UnsupportedEntityIdValue, Value

public class UnsupportedEntityIdValueImpl extends ValueImpl implements UnsupportedEntityIdValue
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
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getEntityType

      public String getEntityType()
      Description copied from interface: EntityIdValue
      Returns the type of this entity. This should be an IRI that identifies an entity type, such as EntityIdValue.ET_ITEM or EntityIdValue.ET_PROPERTY.
      Specified by:
      getEntityType in interface EntityIdValue
      Returns:
      IRI string to identify the type of the entity
    • getId

      public String getId()
      Description copied from interface: EntityIdValue
      Returns the id of this entity.
      Specified by:
      getId in interface EntityIdValue
      Returns:
      String id of this entity
    • getInnerValue

      protected org.wikidata.wdtk.datamodel.implementation.UnsupportedEntityIdValueImpl.JacksonIdValue getInnerValue()
    • getSiteIri

      public String 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 interface EntityIdValue
      Returns:
      the site IRI string
    • getIri

      public String getIri()
      Description copied from interface: IriIdentifiedValue
      Get the IRI of this entity.
      Specified by:
      getIri in interface IriIdentifiedValue
      Returns:
      String with the IRI
    • isPlaceholder

      public boolean isPlaceholder()
      Description copied from interface: EntityIdValue
      Checks whether this is a placeholder ID. Placeholder IDs, for example ItemIdValue.NULL, are often used when creating new entities.
      Specified by:
      isPlaceholder in interface EntityIdValue
      Returns:
      true if this is a placeholder ID, false otherwise
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • accept

      public <T> T accept(ValueVisitor<T> valueVisitor)
      Description copied from interface: Value
      Accept a ValueVisitor and return its output.
      Specified by:
      accept in interface Value
      Parameters:
      valueVisitor - the ValueVisitor
      Returns:
      output of the visitor
    • getEntityTypeJsonString

      public String getEntityTypeJsonString()
      Description copied from interface: UnsupportedEntityIdValue
      The type of entity as represented in the JSON serialization.
      Specified by:
      getEntityTypeJsonString in interface UnsupportedEntityIdValue