RDF.Graph.put_properties

You're seeing just the function put_properties, go back to RDF.Graph module for more information.
Link to this function

put_properties(graph, input, opts \\ [])

View Source

Specs

put_properties(t(), input(), keyword()) :: t()

Adds statements to a RDF.Graph and overwrites all existing statements with the same subject-predicate combinations given in the input data.

When the statements to be added are given as another RDF.Graph, the prefixes of this graph will be added. In case of conflicting prefix mappings the original prefix from graph will be kept.

RDF-star annotations to be added to all of the given statements can be specified with the :add_annotations, :put_annotations or :put_annotation_properties keyword options. They have different addition semantics similar to the add_annotations/3, put_annotations/3 and put_annotation_properties/3 counterparts.

What should happen with the annotations of statement which got delete during the overwrite, can be controlled with these keyword options:

  • :delete_annotations_on_deleted: deletes all or some annotations of the deleted statements (see delete_annotations/3 on possible values)
  • :add_annotations_on_deleted, :put_annotations_on_deleted, :put_annotation_properties_on_deleted: add annotations about the deleted statements with the respective addition semantics similar to the keyword options with the _on_deleted suffix mentioned above

Examples

iex> RDF.Graph.new([{EX.S1, EX.P1, EX.O1}, {EX.S2, EX.P2, EX.O2}])
...> |> RDF.Graph.put_properties([{EX.S1, EX.P2, EX.O3}, {EX.S2, EX.P2, EX.O3}])
RDF.Graph.new([{EX.S1, EX.P1, EX.O1}, {EX.S1, EX.P2, EX.O3}, {EX.S2, EX.P2, EX.O3}])