diff env/lib/python3.7/site-packages/rdflib/plugins/parsers/nt.py @ 5:9b1c78e6ba9c draft default tip

"planemo upload commit 6c0a8142489327ece472c84e558c47da711a9142"
author shellac
date Mon, 01 Jun 2020 08:59:25 -0400
parents 79f47841a781
children
line wrap: on
line diff
--- a/env/lib/python3.7/site-packages/rdflib/plugins/parsers/nt.py	Thu May 14 16:47:39 2020 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-from rdflib.parser import Parser
-from rdflib.plugins.parsers.ntriples import NTriplesParser
-
-__all__ = ['NTSink', 'NTParser']
-
-
-class NTSink(object):
-    def __init__(self, graph):
-        self.graph = graph
-
-    def triple(self, s, p, o):
-        self.graph.add((s, p, o))
-
-
-class NTParser(Parser):
-    """parser for the ntriples format, often stored with the .nt extension
-
-    See http://www.w3.org/TR/rdf-testcases/#ntriples"""
-
-    def __init__(self):
-        super(NTParser, self).__init__()
-
-    def parse(self, source, sink, baseURI=None):
-        f = source.getByteStream()  # TODO getCharacterStream?
-        parser = NTriplesParser(NTSink(sink))
-        parser.parse(f)
-        f.close()