Class PointerExtractor
- java.lang.Object
-
- org.openrefine.wikibase.updates.scheduler.PointerExtractor
-
- All Implemented Interfaces:
org.wikidata.wdtk.datamodel.interfaces.ValueVisitor<Set<ReconEntityIdValue>>
public class PointerExtractor extends Object implements org.wikidata.wdtk.datamodel.interfaces.ValueVisitor<Set<ReconEntityIdValue>>
A class that extracts the new entity ids referred to in a statement.- Author:
- Antonin Delpeuch
-
-
Constructor Summary
Constructors Constructor Description PointerExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<ReconEntityIdValue>
extractPointers(List<org.wikidata.wdtk.datamodel.interfaces.SnakGroup> snakGroups)
Extracts all the new entities mentioned by this list of snak groups.Set<ReconEntityIdValue>
extractPointers(org.wikidata.wdtk.datamodel.interfaces.Snak snak)
Extracts all new entities mentioned by this snak group.Set<ReconEntityIdValue>
extractPointers(org.wikidata.wdtk.datamodel.interfaces.SnakGroup snakGroup)
Extracts all the new entities mentioned by this snak group.Set<ReconEntityIdValue>
extractPointers(org.wikidata.wdtk.datamodel.interfaces.Statement statement)
Extracts all the new entities mentioned by this statement.Set<ReconEntityIdValue>
extractPointers(org.wikidata.wdtk.datamodel.interfaces.Value value)
Extracts any new entity from the value.Set<ReconEntityIdValue>
visit(org.wikidata.wdtk.datamodel.interfaces.EntityIdValue value)
Set<ReconEntityIdValue>
visit(org.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValue value)
Set<ReconEntityIdValue>
visit(org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue value)
Set<ReconEntityIdValue>
visit(org.wikidata.wdtk.datamodel.interfaces.QuantityValue value)
Set<ReconEntityIdValue>
visit(org.wikidata.wdtk.datamodel.interfaces.StringValue value)
Set<ReconEntityIdValue>
visit(org.wikidata.wdtk.datamodel.interfaces.TimeValue value)
Set<ReconEntityIdValue>
visit(org.wikidata.wdtk.datamodel.interfaces.UnsupportedValue value)
-
-
-
Method Detail
-
extractPointers
public Set<ReconEntityIdValue> extractPointers(org.wikidata.wdtk.datamodel.interfaces.Statement statement)
Extracts all the new entities mentioned by this statement. This does not include the subject of the statement.- Parameters:
statement
- the statement to inspect- Returns:
- the set of all new entities mentioned by the statement
-
extractPointers
public Set<ReconEntityIdValue> extractPointers(List<org.wikidata.wdtk.datamodel.interfaces.SnakGroup> snakGroups)
Extracts all the new entities mentioned by this list of snak groups.- Parameters:
snakGroups
-- Returns:
-
extractPointers
public Set<ReconEntityIdValue> extractPointers(org.wikidata.wdtk.datamodel.interfaces.SnakGroup snakGroup)
Extracts all the new entities mentioned by this snak group.- Parameters:
snakGroup
-- Returns:
-
extractPointers
public Set<ReconEntityIdValue> extractPointers(org.wikidata.wdtk.datamodel.interfaces.Snak snak)
Extracts all new entities mentioned by this snak group. Currently there will be at most one: the target of the snak (as property ids cannot be new for now).- Parameters:
snak
-- Returns:
-
extractPointers
public Set<ReconEntityIdValue> extractPointers(org.wikidata.wdtk.datamodel.interfaces.Value value)
Extracts any new entity from the value.- Parameters:
value
-- Returns:
-
visit
public Set<ReconEntityIdValue> visit(org.wikidata.wdtk.datamodel.interfaces.EntityIdValue value)
- Specified by:
visit
in interfaceorg.wikidata.wdtk.datamodel.interfaces.ValueVisitor<Set<ReconEntityIdValue>>
-
visit
public Set<ReconEntityIdValue> visit(org.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValue value)
- Specified by:
visit
in interfaceorg.wikidata.wdtk.datamodel.interfaces.ValueVisitor<Set<ReconEntityIdValue>>
-
visit
public Set<ReconEntityIdValue> visit(org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue value)
- Specified by:
visit
in interfaceorg.wikidata.wdtk.datamodel.interfaces.ValueVisitor<Set<ReconEntityIdValue>>
-
visit
public Set<ReconEntityIdValue> visit(org.wikidata.wdtk.datamodel.interfaces.QuantityValue value)
- Specified by:
visit
in interfaceorg.wikidata.wdtk.datamodel.interfaces.ValueVisitor<Set<ReconEntityIdValue>>
-
visit
public Set<ReconEntityIdValue> visit(org.wikidata.wdtk.datamodel.interfaces.StringValue value)
- Specified by:
visit
in interfaceorg.wikidata.wdtk.datamodel.interfaces.ValueVisitor<Set<ReconEntityIdValue>>
-
visit
public Set<ReconEntityIdValue> visit(org.wikidata.wdtk.datamodel.interfaces.TimeValue value)
- Specified by:
visit
in interfaceorg.wikidata.wdtk.datamodel.interfaces.ValueVisitor<Set<ReconEntityIdValue>>
-
visit
public Set<ReconEntityIdValue> visit(org.wikidata.wdtk.datamodel.interfaces.UnsupportedValue value)
- Specified by:
visit
in interfaceorg.wikidata.wdtk.datamodel.interfaces.ValueVisitor<Set<ReconEntityIdValue>>
-
-