[Python-modules-commits] [python-pyld] 90/276: Handle @type blank node IRIs.
Wolfgang Borgert
debacle at moszumanska.debian.org
Wed Oct 8 23:47:57 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 8d1a0542fb2cb54d5da65d20a15afad80053466c
Author: Dave Longley <dlongley at digitalbazaar.com>
Date: Mon May 21 17:41:33 2012 -0400
Handle @type blank node IRIs.
---
lib/pyld/jsonld.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py
index 50be27a..d51c0fb 100644
--- a/lib/pyld/jsonld.py
+++ b/lib/pyld/jsonld.py
@@ -1966,8 +1966,8 @@ class JsonLdProcessor:
if prop == '@id':
continue
- # copy keywords
- if _is_keyword(prop):
+ # copy non- at type keywords
+ if prop != '@type' and _is_keyword(prop):
subject[prop] = objects
continue
@@ -1992,6 +1992,9 @@ class JsonLdProcessor:
self._flatten(
subjects, o['@list'], namer, name, olist)
o = {'@list': olist}
+ # special-handle @type IRIs
+ elif prop == '@type' and o.startswith('_:'):
+ o = namer.get_name(o)
# add non-subject
JsonLdProcessor.add_value(subject, prop, o, True)
--
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