RDF.Description.add

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

add(description, input, opts \\ [])

View Source

Specs

add(t(), input(), keyword()) :: t()

Add statements to a RDF.Description.

Note: When the statements to be added are given as another RDF.Description, the subject must not match subject of the description to which the statements are added. As opposed to that RDF.Data.merge/2 will produce a RDF.Graph containing both descriptions.

Examples

iex> RDF.Description.new(EX.S, init: {EX.P1, EX.O1})
...> |> RDF.Description.add({EX.P2, EX.O2})
RDF.Description.new(EX.S, init: [{EX.P1, EX.O1}, {EX.P2, EX.O2}])

iex> RDF.Description.new(EX.S, init: {EX.P, EX.O1})
...> |> RDF.Description.add({EX.P, [EX.O2, EX.O3]})
RDF.Description.new(EX.S, init: [{EX.P, EX.O1}, {EX.P, EX.O2}, {EX.P, EX.O3}])