Class 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 Detail

      • PointerExtractor

        public PointerExtractor()
    • 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 interface org.wikidata.wdtk.datamodel.interfaces.ValueVisitor<Set<ReconEntityIdValue>>
      • visit

        public Set<ReconEntityIdValue> visit​(org.wikidata.wdtk.datamodel.interfaces.GlobeCoordinatesValue value)
        Specified by:
        visit in interface org.wikidata.wdtk.datamodel.interfaces.ValueVisitor<Set<ReconEntityIdValue>>
      • visit

        public Set<ReconEntityIdValue> visit​(org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue value)
        Specified by:
        visit in interface org.wikidata.wdtk.datamodel.interfaces.ValueVisitor<Set<ReconEntityIdValue>>
      • visit

        public Set<ReconEntityIdValue> visit​(org.wikidata.wdtk.datamodel.interfaces.QuantityValue value)
        Specified by:
        visit in interface org.wikidata.wdtk.datamodel.interfaces.ValueVisitor<Set<ReconEntityIdValue>>
      • visit

        public Set<ReconEntityIdValue> visit​(org.wikidata.wdtk.datamodel.interfaces.StringValue value)
        Specified by:
        visit in interface org.wikidata.wdtk.datamodel.interfaces.ValueVisitor<Set<ReconEntityIdValue>>
      • visit

        public Set<ReconEntityIdValue> visit​(org.wikidata.wdtk.datamodel.interfaces.TimeValue value)
        Specified by:
        visit in interface org.wikidata.wdtk.datamodel.interfaces.ValueVisitor<Set<ReconEntityIdValue>>
      • visit

        public Set<ReconEntityIdValue> visit​(org.wikidata.wdtk.datamodel.interfaces.UnsupportedValue value)
        Specified by:
        visit in interface org.wikidata.wdtk.datamodel.interfaces.ValueVisitor<Set<ReconEntityIdValue>>