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> T
accept(org.wikidata.wdtk.datamodel.interfaces.ValueVisitor<T> valueVisitor)
boolean
equals(Object other)
abstract String
getEntityType()
String
getId()
Returns the id of the reconciled entityString
getIri()
String
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.Recon
getRecon()
Returns the reconciliation object corresponding to this entity.long
getReconInternalId()
Returns the integer used internally in OpenRefine to identify the new entity.String
getSiteIri()
List<String>
getTypes()
Returns a list of types for this entity.int
hashCode()
boolean
isMatched()
boolean
isNew()
String
toString()
-
-
-
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 interfacePrefetchedEntityIdValue
- Returns:
- 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 interfacePrefetchedEntityIdValue
-
getEntityType
public abstract String getEntityType()
- Specified by:
getEntityType
in 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:
getId
in interfaceorg.wikidata.wdtk.datamodel.interfaces.EntityIdValue
-
getSiteIri
public String getSiteIri()
- Specified by:
getSiteIri
in interfaceorg.wikidata.wdtk.datamodel.interfaces.EntityIdValue
-
getIri
public String getIri()
- Specified by:
getIri
in interfaceorg.wikidata.wdtk.datamodel.interfaces.IriIdentifiedValue
-
accept
public <T> T accept(org.wikidata.wdtk.datamodel.interfaces.ValueVisitor<T> valueVisitor)
- Specified by:
accept
in interfaceorg.wikidata.wdtk.datamodel.interfaces.Value
-
-