core: Description.triples and Graph.triples
This commit is contained in:
parent
1db0dfd797
commit
9764a01753
2 changed files with 3 additions and 0 deletions
|
@ -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`.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue