diff --git a/lib/rdf/description.ex b/lib/rdf/description.ex index 57864c2..c3fdbf0 100644 --- a/lib/rdf/description.ex +++ b/lib/rdf/description.ex @@ -344,6 +344,8 @@ defmodule RDF.Description do |> MapSet.union(predicates(description)) end + def triples(description = %RDF.Description{}), do: Enum.to_list(description) + @doc """ Returns the number of statements of a `RDF.Description`. diff --git a/lib/rdf/graph.ex b/lib/rdf/graph.ex index d420fb0..43d1e21 100644 --- a/lib/rdf/graph.ex +++ b/lib/rdf/graph.ex @@ -344,6 +344,7 @@ defmodule RDF.Graph do end) |> MapSet.union(subjects(graph)) end + def triples(graph = %RDF.Graph{}), do: Enum.to_list(graph) def include?(%RDF.Graph{descriptions: descriptions}, triple = {subject, _, _}) do