[Python-modules-commits] [python-pyld] 161/276: Do not produce generalized RDF when normalizing.

Wolfgang Borgert debacle at moszumanska.debian.org
Wed Oct 8 23:48:05 UTC 2014


This is an automated email from the git hooks/post-receive script.

debacle pushed a commit to branch master
in repository python-pyld.

commit c912f7340110846d9b69479ba99a6cf0156a8321
Author: Dave Longley <dlongley at digitalbazaar.com>
Date:   Tue Aug 6 14:06:21 2013 -0400

    Do not produce generalized RDF when normalizing.
---
 lib/pyld/jsonld.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py
index 5752143..82bbbf9 100644
--- a/lib/pyld/jsonld.py
+++ b/lib/pyld/jsonld.py
@@ -694,6 +694,7 @@ class JsonLdProcessor:
             opts = copy.deepcopy(options)
             if 'format' in opts:
                 del opts['format']
+            opts['produceGeneralizedRdf'] = False
             dataset = self.to_rdf(input_, opts)
         except JsonLdError as cause:
             raise JsonLdError(
@@ -757,6 +758,8 @@ class JsonLdProcessor:
           [base] the base IRI to use.
           [format] the format if input is a string:
             'application/nquads' for N-Quads.
+          [produceGeneralizedRdf] true to output generalized RDF, false
+            to produce only standard RDF (default: false).
           [documentLoader(url)] the document loader
             (default: _default_document_loader).
 
@@ -765,6 +768,7 @@ class JsonLdProcessor:
         # set default options
         options = options or {}
         options.setdefault('base', input_ if _is_string(input_) else '')
+        options.setdefault('produceGeneralizedRdf', False)
         options.setdefault('documentLoader', _default_document_loader)
 
         try:
@@ -2306,7 +2310,7 @@ class JsonLdProcessor:
 
         return rval
 
-    def _graph_to_rdf(self, graph, namer):
+    def _graph_to_rdf(self, graph, namer, options):
         """
         Creates an array of RDF triples for the given graph.
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pyld.git



More information about the Python-modules-commits mailing list