Class PropertyOnlyStatementMerger

java.lang.Object
org.openrefine.wikidata.schema.strategies.PropertyOnlyStatementMerger
All Implemented Interfaces:
StatementMerger

public class PropertyOnlyStatementMerger extends Object implements StatementMerger
Merging strategy which only looks at the main property of the statements to determine if they match.
Author:
Antonin Delpeuch
  • Field Summary

    Fields inherited from interface org.openrefine.wikidata.schema.strategies.StatementMerger

    FORMER_DEFAULT_STRATEGY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    boolean
    match(org.wikidata.wdtk.datamodel.interfaces.Statement existing, org.wikidata.wdtk.datamodel.interfaces.Statement added)
    Determines if the existing statement matches the statement to add (or remove)
    org.wikidata.wdtk.datamodel.interfaces.Statement
    merge(org.wikidata.wdtk.datamodel.interfaces.Statement existing, org.wikidata.wdtk.datamodel.interfaces.Statement added)
    Return the result of merging the statement to add with the existing statement.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PropertyOnlyStatementMerger

      public PropertyOnlyStatementMerger()
  • Method Details

    • match

      public boolean match(org.wikidata.wdtk.datamodel.interfaces.Statement existing, org.wikidata.wdtk.datamodel.interfaces.Statement added)
      Description copied from interface: StatementMerger
      Determines if the existing statement matches the statement to add (or remove)
      Specified by:
      match in interface StatementMerger
      Parameters:
      existing - the statement currently on the entity
      added - the statement to add or remove
      Returns:
    • merge

      public org.wikidata.wdtk.datamodel.interfaces.Statement merge(org.wikidata.wdtk.datamodel.interfaces.Statement existing, org.wikidata.wdtk.datamodel.interfaces.Statement added)
      Description copied from interface: StatementMerger
      Return the result of merging the statement to add with the existing statement. This method can assume that the two statements are matching (i.e. the method above has returned true on them).
      Specified by:
      merge in interface StatementMerger
      Parameters:
      existing - the statement currently on the entity
      added - the statement to add or remove
      Returns:
      the merged statement obtained out of the two
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object