Class ReconEntityIdValue

  • All Implemented Interfaces:
    PrefetchedEntityIdValue, org.wikidata.wdtk.datamodel.interfaces.EntityIdValue, org.wikidata.wdtk.datamodel.interfaces.IriIdentifiedValue, org.wikidata.wdtk.datamodel.interfaces.Value
    Direct Known Subclasses:
    ReconItemIdValue, ReconMediaInfoIdValue, ReconPropertyIdValue

    public abstract class ReconEntityIdValue
    extends Object
    implements PrefetchedEntityIdValue
    An EntityIdValue that holds not just the id but also the label as fetched by either the reconciliation interface or the suggester and its type, both stored as reconciliation candidates. This label will be localized depending on the language chosen by the user for OpenRefine's interface. Storing it lets us reuse it later on without having to re-fetch it. Storing the types also lets us perform some constraint checks without re-fetching the types of many entities.
    Antonin Delpeuch
    • Constructor Detail

      • ReconEntityIdValue

        public ReconEntityIdValue​(Recon match,
                                  String cellValue)
    • Method Detail

      • isMatched

        public boolean isMatched()
      • isNew

        public boolean isNew()
      • getLabel

        public String getLabel()
        Description copied from interface: PrefetchedEntityIdValue
        This should return the label "as we got it", with no guarantee that it is current or that its language matches that of the user. In general though, that should be the case if the user always uses OpenRefine with the same language settings.
        Specified by:
        getLabel in interface PrefetchedEntityIdValue
        the preferred label of the entity
      • getTypes

        public List<String> getTypes()
        Description copied from interface: PrefetchedEntityIdValue
        Returns a list of types for this entity. Again these are the types as they were originally fetched from the reconciliation interface: they can diverge from what is currently on the entity. Empty lists should be returned for
        Specified by:
        getTypes in interface PrefetchedEntityIdValue
      • getEntityType

        public abstract String getEntityType()
        Specified by:
        getEntityType in interface org.wikidata.wdtk.datamodel.interfaces.EntityIdValue
      • getReconInternalId

        public long getReconInternalId()
        Returns the integer used internally in OpenRefine to identify the new entity.
        the reconciliation id of the reconciled cell
      • getRecon

        public Recon getRecon()
        Returns the reconciliation object corresponding to this entity.
        the full reconciliation metadata of the corresponding cell
      • getId

        public String getId()
        Returns the id of the reconciled entity
        Specified by:
        getId in interface org.wikidata.wdtk.datamodel.interfaces.EntityIdValue
      • getSiteIri

        public String getSiteIri()
        Specified by:
        getSiteIri in interface org.wikidata.wdtk.datamodel.interfaces.EntityIdValue
      • getIri

        public String getIri()
        Specified by:
        getIri in interface org.wikidata.wdtk.datamodel.interfaces.IriIdentifiedValue
      • accept

        public <T> T accept​(org.wikidata.wdtk.datamodel.interfaces.ValueVisitor<T> valueVisitor)
        Specified by:
        accept in interface org.wikidata.wdtk.datamodel.interfaces.Value
      • hashCode

        public int hashCode()
        hashCode in class Object