diff options
author | Natanael Arndt <arndtn@gmail.com> | 2021-01-28 13:46:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-28 13:46:37 +0100 |
commit | 3b7f0ed18540c50ff9bfd06d50f8d081ebc8dfcd (patch) | |
tree | 1c7996340075ea7b6508e72d8fbc97373c168079 | |
parent | 8e3c771a5c6a2787b5a34a9288c7d5d6967ecbbe (diff) | |
parent | 07c72de1840bfc7e8ce7ab57b369af9f4a6c675c (diff) | |
download | rdflib-3b7f0ed18540c50ff9bfd06d50f8d081ebc8dfcd.tar.gz |
Merge pull request #1220 from RDFLib/foaf_fix
fix foaf ClosedNamespace
-rw-r--r-- | rdflib/namespace.py | 91 | ||||
-rw-r--r-- | test/test_namespace.py | 7 |
2 files changed, 61 insertions, 37 deletions
diff --git a/rdflib/namespace.py b/rdflib/namespace.py index aa1b4d0d..f9bb86d4 100644 --- a/rdflib/namespace.py +++ b/rdflib/namespace.py @@ -292,53 +292,80 @@ FOAF = ClosedNamespace( terms=[ # all taken from http://xmlns.com/foaf/spec/ "Agent", + "Document", + "Group", + "Image", + "LabelProperty", + "OnlineAccount", + "OnlineChatAccount", + "OnlineEcommerceAccount", + "OnlineGamingAccount", + "Organization", "Person", - "name", - "title", - "img", + "PersonalProfileDocument", + "Project", + "account", + "accountName", + "accountServiceHomepage", + "age", + "aimChatID", + "based_near", + "birthday", + "currentProject", "depiction", "depicts", + "dnaChecksum", "familyName", + "family_name", + "firstName", + "focus", + "fundedBy", + "geekcode", + "gender", "givenName", + "givenname", + "holdsAccount", + "homepage", + "icqChatID", + "img", + "interest", + "isPrimaryTopicOf", + "jabberID", "knows", - "based_near", - "age", + "lastName", + "logo", "made", "maker", - "primaryTopic", - "primaryTopicOf", - "Project", - "Organization", - "Group", + "mbox", + "mbox_sha1sum", "member", - "Document", - "Image", + "membershipClass", + "msnChatID", + "myersBriggs", + "name", "nick", - "mbox", - "homepage", - "weblog", "openid", - "jabberID", - "mbox_sha1sum", - "interest", - "topic_interest", - "topic", "page", - "workplaceHomepage", - "workInfoHomepage", - "schoolHomepage", - "publications", - "currentProject", "pastProject", - "account", - "OnlineAccount", - "accountName", - "accountServiceHomepage", - "PersonalProfileDocument", - "tipjar", + "phone", + "plan", + "primaryTopic", + "publications", + "schoolHomepage", "sha1", + "skypeID", + "status", + "surname", + "theme", "thumbnail", - "logo", + "tipjar", + "title", + "topic", + "topic_interest", + "weblog", + "workInfoHomepage", + "workplaceHomepage", + "yahooChatID" ], ) GEO = ClosedNamespace( diff --git a/test/test_namespace.py b/test/test_namespace.py index 2706467f..8d4f7fd6 100644 --- a/test/test_namespace.py +++ b/test/test_namespace.py @@ -101,13 +101,10 @@ class NamespacePrefixTest(unittest.TestCase): def add_not_in_namespace(s): return FOAF[s] - # a blatantly non-existent FOAF property + # a non-existent FOAF property self.assertRaises(KeyError, add_not_in_namespace, "blah") - # a deprecated FOAF property - self.assertRaises(KeyError, add_not_in_namespace, "firstName") - - # a property name within the core FOAF namespace + # a property name within the FOAF namespace self.assertEqual( add_not_in_namespace("givenName"), URIRef("http://xmlns.com/foaf/0.1/givenName"), |