Class ItemIdValueImpl

All Implemented Interfaces:
EntityIdValue, IriIdentifiedValue, ItemIdValue, Value

public class ItemIdValueImpl extends EntityIdValueImpl implements ItemIdValue
Jackson implementation of ItemIdValue.
Author:
Fredo Erxleben, Antonin Delpeuch
  • Constructor Details

    • ItemIdValueImpl

      public ItemIdValueImpl(String id, String siteIri)
      Constructor.
      Parameters:
      id - the identifier of the entity, such as "Q42"
      siteIri - the siteIRI that this value refers to
  • Method Details

    • 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
    • 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
    • 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
    • hashCode

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

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object