From 31851d3630d8dd09f8a3bcd9988e162a84709320 Mon Sep 17 00:00:00 2001 From: Marcel Otto Date: Fri, 16 Jun 2017 17:31:52 +0200 Subject: [PATCH] Remove general read and read! functions from RDF.Serializations --- lib/rdf/reader.ex | 13 ------------- lib/rdf/serialization.ex | 4 ---- 2 files changed, 17 deletions(-) diff --git a/lib/rdf/reader.ex b/lib/rdf/reader.ex index 0c7ee7a..8526f09 100644 --- a/lib/rdf/reader.ex +++ b/lib/rdf/reader.ex @@ -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) diff --git a/lib/rdf/serialization.ex b/lib/rdf/serialization.ex index a852046..c34e5f2 100644 --- a/lib/rdf/serialization.ex +++ b/lib/rdf/serialization.ex @@ -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 \\ []),