Class StatementEdit

  • public class StatementEdit
    extends Object
    An object which represents an edit on a statement, which can be added or removed and have various merging strategies with existing statements.
    Antonin Delpeuch
    • Field Detail

      • statement

        protected final org.wikidata.wdtk.datamodel.interfaces.Statement statement
    • Constructor Detail

      • StatementEdit

        public StatementEdit​(org.wikidata.wdtk.datamodel.interfaces.Statement statement,
                             StatementEditingMode mode)
        Constructs a statement update with a default merging strategy, useful for backwards compatibility (when no merging strategy could be specified).
        statement -
        mode -
    • Method Detail

      • getStatement

        public org.wikidata.wdtk.datamodel.interfaces.Statement getStatement()
      • withSubjectId

        public StatementEdit withSubjectId​(org.wikidata.wdtk.datamodel.interfaces.EntityIdValue entityId)
        Translates the StatementEdit to apply to a new subject id. This is useful when a statement was planned on an entity which was redirected in the meantime.
        entityId - the new entity id on which the statement should be edited
        a copy of the current StatementEdit, just changing the entity id
      • getPropertyId

        public org.wikidata.wdtk.datamodel.interfaces.PropertyIdValue getPropertyId()
        Convenience method to directly access the property of the statement.
      • hashCode

        public int hashCode()
        hashCode in class Object