RDF.Graph.put

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

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

View Source

Specs

put(t(), input(), keyword()) :: t()

Adds statements to a RDF.Graph overwriting existing statements with the subjects 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([{EX.S1, EX.P3, EX.O3}])
RDF.Graph.new([{EX.S1, EX.P3, EX.O3}, {EX.S2, EX.P2, EX.O2}])