Class ReconEntityIdValue
- java.lang.Object
-
- org.openrefine.wikibase.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
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.- Author:
- Antonin Delpeuch
-
-
Constructor Summary
Constructors Constructor Description ReconEntityIdValue(Recon match, String cellValue)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <T> Taccept(org.wikidata.wdtk.datamodel.interfaces.ValueVisitor<T> valueVisitor)booleanequals(Object other)abstract StringgetEntityType()StringgetId()Returns the id of the reconciled entityStringgetIri()StringgetLabel()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.RecongetRecon()Returns the reconciliation object corresponding to this entity.longgetReconInternalId()Returns the integer used internally in OpenRefine to identify the new entity.StringgetSiteIri()List<String>getTypes()Returns a list of types for this entity.inthashCode()booleanisMatched()booleanisNew()StringtoString()
-
-
-
Method Detail
-
isMatched
public boolean isMatched()
-
isNew
public boolean isNew()
-
getLabel
public String 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
public List<String> 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
public abstract String 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
public Recon getRecon()
Returns the reconciliation object corresponding to this entity.- Returns:
- the full reconciliation metadata of the corresponding cell
-
getId
public String getId()
Returns the id of the reconciled entity- Specified by:
getIdin interfaceorg.wikidata.wdtk.datamodel.interfaces.EntityIdValue
-
getSiteIri
public String getSiteIri()
- Specified by:
getSiteIriin interfaceorg.wikidata.wdtk.datamodel.interfaces.EntityIdValue
-
getIri
public String 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
-
-