Class ReconEntityIdValue
java.lang.Object
org.openrefine.wikidata.schema.entityvalues.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
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.
- Author:
- Antonin Delpeuch
-
Field Summary
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(org.wikidata.wdtk.datamodel.interfaces.ValueVisitor<T> valueVisitor) booleanabstract StringgetId()Returns the id of the reconciled entitygetIri()getLabel()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.getRecon()Returns the reconciliation object corresponding to this entity.longReturns the integer used internally in OpenRefine to identify the new entity.getTypes()Returns a list of types for this entity.inthashCode()booleanbooleanisNew()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.wikidata.wdtk.datamodel.interfaces.EntityIdValue
isPlaceholder
-
Constructor Details
-
ReconEntityIdValue
-
-
Method Details
-
isMatched
public boolean isMatched() -
isNew
public boolean isNew() -
getLabel
Description copied from interface:PrefetchedEntityIdValueThis 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:
getLabelin interfacePrefetchedEntityIdValue- Returns:
- the preferred label of the entity
-
getTypes
Description copied from interface:PrefetchedEntityIdValueReturns 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:
getTypesin interfacePrefetchedEntityIdValue
-
getEntityType
- Specified by:
getEntityTypein interfaceorg.wikidata.wdtk.datamodel.interfaces.EntityIdValue
-
getReconInternalId
public long getReconInternalId()Returns the integer used internally in OpenRefine to identify the new entity.- Returns:
- the reconciliation id of the reconciled cell
-
getRecon
Returns the reconciliation object corresponding to this entity.- Returns:
- the full reconciliation metadata of the corresponding cell
-
getId
Returns the id of the reconciled entity- Specified by:
getIdin interfaceorg.wikidata.wdtk.datamodel.interfaces.EntityIdValue
-
getSiteIri
- Specified by:
getSiteIriin interfaceorg.wikidata.wdtk.datamodel.interfaces.EntityIdValue
-
getIri
- Specified by:
getIriin interfaceorg.wikidata.wdtk.datamodel.interfaces.IriIdentifiedValue
-
accept
public <T> T accept(org.wikidata.wdtk.datamodel.interfaces.ValueVisitor<T> valueVisitor) - Specified by:
acceptin interfaceorg.wikidata.wdtk.datamodel.interfaces.Value
-
equals
-
hashCode
public int hashCode() -
toString
-