Remove general read and read! functions from RDF.Serializations

This commit is contained in:
Marcel Otto 2017-06-16 17:31:52 +02:00
parent de0e656458
commit 31851d3630
2 changed files with 0 additions and 17 deletions

View file

@ -1,19 +1,6 @@
defmodule RDF.Reader do
def read(decoder, file_or_content, opts \\ []) do
if File.exists?(file_or_content) do
read_file(decoder, file_or_content, opts)
else
read_string(decoder, file_or_content, opts)
end
end
def read!(decoder, file_or_content, opts \\ []) do
case read(decoder, file_or_content, opts) do
{:ok, graph} -> graph
{:error, reason} -> raise reason
end
end
def read_string(decoder, content, opts \\ []) do
decoder.decode(content, opts)

View file

@ -23,10 +23,6 @@ defmodule RDF.Serialization do
defoverridable [decoder: 0, encoder: 0, options: 0]
def read(file_or_content, opts \\ []),
do: RDF.Reader.read(decoder(), file_or_content, opts)
def read!(file_or_content, opts \\ []),
do: RDF.Reader.read!(decoder(), file_or_content, opts)
def read_string(content, opts \\ []),
do: RDF.Reader.read_string(decoder(), content, opts)
def read_string!(content, opts \\ []),