{"action":"created","comment":{"url":"https://api.github.com/repos/vertexproject/synapse/pulls/comments/187666072","pull_request_review_id":119498363,"id":187666072,"diff_hunk":"@@ -1,41 +1,238 @@\n-import synapse.lib.tufo as s_tufo\n+import synapse.lib.types as s_types\n import synapse.lib.module as s_module\n-from synapse.lib.types import DataType\n \n-# FIXME identify/handle possibly as seeds\n-# tony stark\n-# tony logan stark\n-# stark,tony logan\n-# stark,tony l.\n-\n-class Name(DataType):\n-    subprops = (\n-        ('sur', {'ptype': 'ps:tokn'}),\n-        ('given', {'ptype': 'ps:tokn'}),\n-        ('middle', {'ptype': 'ps:tokn'}),\n-        ('parts', {'ptype': 'int', 'doc': 'Number of ps:tokn elements in ps:name'}),\n-    )\n-\n-    def norm(self, valu, oldval=None):\n-        subs = {}\n-\n-        valu = valu.lower().strip()\n-        if not valu:\n-            self._raiseBadValu(valu)\n-\n-        parts = [v.strip().strip('.').lower() for v in valu.split(',')]\n-        if len(parts) >= 2:\n-            subs['sur'] = parts[0]\n-            subs['given'] = parts[1]\n-            if len(parts) >= 3:\n-                subs['middle'] = parts[2]\n-\n-        subs['parts'] = len(parts)\n-        valu = ','.join(parts)\n-        return valu, subs\n+class PsModule(s_module.CoreModule):\n+    def getModelDefs(self):\n+        modl = {\n+            'types': (\n+                ('ps:tokn', ('str', {'lower': True, 'strip': True}), {\n+                    'doc': 'A single name element (potentially given or sur).',\n+                    'ex': 'robert'\n+                }),\n+                ('ps:name', ('str', {'lower': True, 'onespace': True}), {\n+                    'doc': 'An arbitrary, lower spaced string with normalized whitespace.',\n+                    'ex': 'robert grey'\n+                }),\n+                # FIXME - 00x ps model supported guid alias 'ps:person:guidname'\n+                ('ps:person', ('guid', {}), {\n+                    'doc': 'A GUID for a person.',\n+                }),\n+                # FIXME - 00x ps model supported guid alias 'ps:persona:guidname'\n+                ('ps:persona', ('guid', {}), {\n+                    'doc': 'A GUID for a suspected person.',\n+                }),\n+                ('ps:person:has', ('comp', {'fields': (('person', 'ps:person'), ('node', 'ndef'))}), {\n+                    'doc': 'A person owns, controls, or has exclusive use of an object or'\n+                           ' resource, potentially during a specific period of time.'\n+                }),\n+                ('ps:persona:has', ('comp', {'fields': (('persona', 'ps:persona'), ('node', 'ndef'))}), {\n+                    'doc': 'A persona owns, controls, or has exclusive use of an object or'\n+                           ' resource, potentially during a specific period of time.'\n+                }),\n+                # FIXME requires file:bytes","path":"synapse/models/person.py","position":65,"original_position":65,"commit_id":"fdaae1681a2908c717fa75488f4f96329e5945f8","original_commit_id":"2db39efd1ea78119382d33358807891dc3c72ced","user":{"login":"vEpiphyte","id":26100278,"avatar_url":"https://avatars2.githubusercontent.com/u/26100278?v=4","gravatar_id":"","url":"https://api.github.com/users/vEpiphyte","html_url":"https://github.com/vEpiphyte","followers_url":"https://api.github.com/users/vEpiphyte/followers","following_url":"https://api.github.com/users/vEpiphyte/following{/other_user}","gists_url":"https://api.github.com/users/vEpiphyte/gists{/gist_id}","starred_url":"https://api.github.com/users/vEpiphyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vEpiphyte/subscriptions","organizations_url":"https://api.github.com/users/vEpiphyte/orgs","repos_url":"https://api.github.com/users/vEpiphyte/repos","events_url":"https://api.github.com/users/vEpiphyte/events{/privacy}","received_events_url":"https://api.github.com/users/vEpiphyte/received_events","type":"User","site_admin":false},"body":"i want to add file:bytes when we've stablized on what file:bytes is going to be","created_at":"2018-05-11T16:29:22Z","updated_at":"2018-05-11T16:29:22Z","html_url":"https://github.com/vertexproject/synapse/pull/772#discussion_r187666072","pull_request_url":"https://api.github.com/repos/vertexproject/synapse/pulls/772","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/vertexproject/synapse/pulls/comments/187666072"},"html":{"href":"https://github.com/vertexproject/synapse/pull/772#discussion_r187666072"},"pull_request":{"href":"https://api.github.com/repos/vertexproject/synapse/pulls/772"}},"in_reply_to_id":187609629},"pull_request":{"url":"https://api.github.com/repos/vertexproject/synapse/pulls/772","id":187282181,"html_url":"https://github.com/vertexproject/synapse/pull/772","diff_url":"https://github.com/vertexproject/synapse/pull/772.diff","patch_url":"https://github.com/vertexproject/synapse/pull/772.patch","issue_url":"https://api.github.com/repos/vertexproject/synapse/issues/772","number":772,"state":"open","locked":false,"title":"010 person","user":{"login":"vEpiphyte","id":26100278,"avatar_url":"https://avatars2.githubusercontent.com/u/26100278?v=4","gravatar_id":"","url":"https://api.github.com/users/vEpiphyte","html_url":"https://github.com/vEpiphyte","followers_url":"https://api.github.com/users/vEpiphyte/followers","following_url":"https://api.github.com/users/vEpiphyte/following{/other_user}","gists_url":"https://api.github.com/users/vEpiphyte/gists{/gist_id}","starred_url":"https://api.github.com/users/vEpiphyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vEpiphyte/subscriptions","organizations_url":"https://api.github.com/users/vEpiphyte/orgs","repos_url":"https://api.github.com/users/vEpiphyte/repos","events_url":"https://api.github.com/users/vEpiphyte/events{/privacy}","received_events_url":"https://api.github.com/users/vEpiphyte/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-10T19:20:26Z","updated_at":"2018-05-11T16:29:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7258ae347733e0f00b12991e6685c12e75eb8f5","assignee":{"login":"vEpiphyte","id":26100278,"avatar_url":"https://avatars2.githubusercontent.com/u/26100278?v=4","gravatar_id":"","url":"https://api.github.com/users/vEpiphyte","html_url":"https://github.com/vEpiphyte","followers_url":"https://api.github.com/users/vEpiphyte/followers","following_url":"https://api.github.com/users/vEpiphyte/following{/other_user}","gists_url":"https://api.github.com/users/vEpiphyte/gists{/gist_id}","starred_url":"https://api.github.com/users/vEpiphyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vEpiphyte/subscriptions","organizations_url":"https://api.github.com/users/vEpiphyte/orgs","repos_url":"https://api.github.com/users/vEpiphyte/repos","events_url":"https://api.github.com/users/vEpiphyte/events{/privacy}","received_events_url":"https://api.github.com/users/vEpiphyte/received_events","type":"User","site_admin":false},"assignees":[{"login":"vEpiphyte","id":26100278,"avatar_url":"https://avatars2.githubusercontent.com/u/26100278?v=4","gravatar_id":"","url":"https://api.github.com/users/vEpiphyte","html_url":"https://github.com/vEpiphyte","followers_url":"https://api.github.com/users/vEpiphyte/followers","following_url":"https://api.github.com/users/vEpiphyte/following{/other_user}","gists_url":"https://api.github.com/users/vEpiphyte/gists{/gist_id}","starred_url":"https://api.github.com/users/vEpiphyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vEpiphyte/subscriptions","organizations_url":"https://api.github.com/users/vEpiphyte/orgs","repos_url":"https://api.github.com/users/vEpiphyte/repos","events_url":"https://api.github.com/users/vEpiphyte/events{/privacy}","received_events_url":"https://api.github.com/users/vEpiphyte/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":222989314,"url":"https://api.github.com/repos/vertexproject/synapse/labels/enhancement","name":"enhancement","color":"0052cc","default":true}],"milestone":{"url":"https://api.github.com/repos/vertexproject/synapse/milestones/50","html_url":"https://github.com/vertexproject/synapse/milestone/50","labels_url":"https://api.github.com/repos/vertexproject/synapse/milestones/50/labels","id":3313157,"number":50,"title":"v0.1.0","description":"Synapse v0.1.0","creator":{"login":"vEpiphyte","id":26100278,"avatar_url":"https://avatars2.githubusercontent.com/u/26100278?v=4","gravatar_id":"","url":"https://api.github.com/users/vEpiphyte","html_url":"https://github.com/vEpiphyte","followers_url":"https://api.github.com/users/vEpiphyte/followers","following_url":"https://api.github.com/users/vEpiphyte/following{/other_user}","gists_url":"https://api.github.com/users/vEpiphyte/gists{/gist_id}","starred_url":"https://api.github.com/users/vEpiphyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vEpiphyte/subscriptions","organizations_url":"https://api.github.com/users/vEpiphyte/orgs","repos_url":"https://api.github.com/users/vEpiphyte/repos","events_url":"https://api.github.com/users/vEpiphyte/events{/privacy}","received_events_url":"https://api.github.com/users/vEpiphyte/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":24,"state":"open","created_at":"2018-05-02T00:18:15Z","updated_at":"2018-05-11T00:27:53Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/vertexproject/synapse/pulls/772/commits","review_comments_url":"https://api.github.com/repos/vertexproject/synapse/pulls/772/comments","review_comment_url":"https://api.github.com/repos/vertexproject/synapse/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vertexproject/synapse/issues/772/comments","statuses_url":"https://api.github.com/repos/vertexproject/synapse/statuses/fdaae1681a2908c717fa75488f4f96329e5945f8","head":{"label":"vertexproject:010_person","ref":"010_person","sha":"fdaae1681a2908c717fa75488f4f96329e5945f8","user":{"login":"vertexproject","id":21201579,"avatar_url":"https://avatars2.githubusercontent.com/u/21201579?v=4","gravatar_id":"","url":"https://api.github.com/users/vertexproject","html_url":"https://github.com/vertexproject","followers_url":"https://api.github.com/users/vertexproject/followers","following_url":"https://api.github.com/users/vertexproject/following{/other_user}","gists_url":"https://api.github.com/users/vertexproject/gists{/gist_id}","starred_url":"https://api.github.com/users/vertexproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vertexproject/subscriptions","organizations_url":"https://api.github.com/users/vertexproject/orgs","repos_url":"https://api.github.com/users/vertexproject/repos","events_url":"https://api.github.com/users/vertexproject/events{/privacy}","received_events_url":"https://api.github.com/users/vertexproject/received_events","type":"Organization","site_admin":false},"repo":{"id":37228107,"name":"synapse","full_name":"vertexproject/synapse","owner":{"login":"vertexproject","id":21201579,"avatar_url":"https://avatars2.githubusercontent.com/u/21201579?v=4","gravatar_id":"","url":"https://api.github.com/users/vertexproject","html_url":"https://github.com/vertexproject","followers_url":"https://api.github.com/users/vertexproject/followers","following_url":"https://api.github.com/users/vertexproject/following{/other_user}","gists_url":"https://api.github.com/users/vertexproject/gists{/gist_id}","starred_url":"https://api.github.com/users/vertexproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vertexproject/subscriptions","organizations_url":"https://api.github.com/users/vertexproject/orgs","repos_url":"https://api.github.com/users/vertexproject/repos","events_url":"https://api.github.com/users/vertexproject/events{/privacy}","received_events_url":"https://api.github.com/users/vertexproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vertexproject/synapse","description":"Distributed Key-Value Hypergraph Analysis Framework","fork":false,"url":"https://api.github.com/repos/vertexproject/synapse","forks_url":"https://api.github.com/repos/vertexproject/synapse/forks","keys_url":"https://api.github.com/repos/vertexproject/synapse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vertexproject/synapse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vertexproject/synapse/teams","hooks_url":"https://api.github.com/repos/vertexproject/synapse/hooks","issue_events_url":"https://api.github.com/repos/vertexproject/synapse/issues/events{/number}","events_url":"https://api.github.com/repos/vertexproject/synapse/events","assignees_url":"https://api.github.com/repos/vertexproject/synapse/assignees{/user}","branches_url":"https://api.github.com/repos/vertexproject/synapse/branches{/branch}","tags_url":"https://api.github.com/repos/vertexproject/synapse/tags","blobs_url":"https://api.github.com/repos/vertexproject/synapse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vertexproject/synapse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vertexproject/synapse/git/refs{/sha}","trees_url":"https://api.github.com/repos/vertexproject/synapse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vertexproject/synapse/statuses/{sha}","languages_url":"https://api.github.com/repos/vertexproject/synapse/languages","stargazers_url":"https://api.github.com/repos/vertexproject/synapse/stargazers","contributors_url":"https://api.github.com/repos/vertexproject/synapse/contributors","subscribers_url":"https://api.github.com/repos/vertexproject/synapse/subscribers","subscription_url":"https://api.github.com/repos/vertexproject/synapse/subscription","commits_url":"https://api.github.com/repos/vertexproject/synapse/commits{/sha}","git_commits_url":"https://api.github.com/repos/vertexproject/synapse/git/commits{/sha}","comments_url":"https://api.github.com/repos/vertexproject/synapse/comments{/number}","issue_comment_url":"https://api.github.com/repos/vertexproject/synapse/issues/comments{/number}","contents_url":"https://api.github.com/repos/vertexproject/synapse/contents/{+path}","compare_url":"https://api.github.com/repos/vertexproject/synapse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vertexproject/synapse/merges","archive_url":"https://api.github.com/repos/vertexproject/synapse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vertexproject/synapse/downloads","issues_url":"https://api.github.com/repos/vertexproject/synapse/issues{/number}","pulls_url":"https://api.github.com/repos/vertexproject/synapse/pulls{/number}","milestones_url":"https://api.github.com/repos/vertexproject/synapse/milestones{/number}","notifications_url":"https://api.github.com/repos/vertexproject/synapse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vertexproject/synapse/labels{/name}","releases_url":"https://api.github.com/repos/vertexproject/synapse/releases{/id}","deployments_url":"https://api.github.com/repos/vertexproject/synapse/deployments","created_at":"2015-06-10T23:29:41Z","updated_at":"2018-05-09T20:35:15Z","pushed_at":"2018-05-11T16:29:01Z","git_url":"git://github.com/vertexproject/synapse.git","ssh_url":"git@github.com:vertexproject/synapse.git","clone_url":"https://github.com/vertexproject/synapse.git","svn_url":"https://github.com/vertexproject/synapse","homepage":"","size":7782,"stargazers_count":43,"watchers_count":43,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":28,"mirror_url":null,"archived":false,"open_issues_count":61,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":28,"open_issues":61,"watchers":43,"default_branch":"master"}},"base":{"label":"vertexproject:010","ref":"010","sha":"175a18ff3b928ad4fd892a556b34a96171bc3bb7","user":{"login":"vertexproject","id":21201579,"avatar_url":"https://avatars2.githubusercontent.com/u/21201579?v=4","gravatar_id":"","url":"https://api.github.com/users/vertexproject","html_url":"https://github.com/vertexproject","followers_url":"https://api.github.com/users/vertexproject/followers","following_url":"https://api.github.com/users/vertexproject/following{/other_user}","gists_url":"https://api.github.com/users/vertexproject/gists{/gist_id}","starred_url":"https://api.github.com/users/vertexproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vertexproject/subscriptions","organizations_url":"https://api.github.com/users/vertexproject/orgs","repos_url":"https://api.github.com/users/vertexproject/repos","events_url":"https://api.github.com/users/vertexproject/events{/privacy}","received_events_url":"https://api.github.com/users/vertexproject/received_events","type":"Organization","site_admin":false},"repo":{"id":37228107,"name":"synapse","full_name":"vertexproject/synapse","owner":{"login":"vertexproject","id":21201579,"avatar_url":"https://avatars2.githubusercontent.com/u/21201579?v=4","gravatar_id":"","url":"https://api.github.com/users/vertexproject","html_url":"https://github.com/vertexproject","followers_url":"https://api.github.com/users/vertexproject/followers","following_url":"https://api.github.com/users/vertexproject/following{/other_user}","gists_url":"https://api.github.com/users/vertexproject/gists{/gist_id}","starred_url":"https://api.github.com/users/vertexproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vertexproject/subscriptions","organizations_url":"https://api.github.com/users/vertexproject/orgs","repos_url":"https://api.github.com/users/vertexproject/repos","events_url":"https://api.github.com/users/vertexproject/events{/privacy}","received_events_url":"https://api.github.com/users/vertexproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vertexproject/synapse","description":"Distributed Key-Value Hypergraph Analysis Framework","fork":false,"url":"https://api.github.com/repos/vertexproject/synapse","forks_url":"https://api.github.com/repos/vertexproject/synapse/forks","keys_url":"https://api.github.com/repos/vertexproject/synapse/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vertexproject/synapse/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vertexproject/synapse/teams","hooks_url":"https://api.github.com/repos/vertexproject/synapse/hooks","issue_events_url":"https://api.github.com/repos/vertexproject/synapse/issues/events{/number}","events_url":"https://api.github.com/repos/vertexproject/synapse/events","assignees_url":"https://api.github.com/repos/vertexproject/synapse/assignees{/user}","branches_url":"https://api.github.com/repos/vertexproject/synapse/branches{/branch}","tags_url":"https://api.github.com/repos/vertexproject/synapse/tags","blobs_url":"https://api.github.com/repos/vertexproject/synapse/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vertexproject/synapse/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vertexproject/synapse/git/refs{/sha}","trees_url":"https://api.github.com/repos/vertexproject/synapse/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vertexproject/synapse/statuses/{sha}","languages_url":"https://api.github.com/repos/vertexproject/synapse/languages","stargazers_url":"https://api.github.com/repos/vertexproject/synapse/stargazers","contributors_url":"https://api.github.com/repos/vertexproject/synapse/contributors","subscribers_url":"https://api.github.com/repos/vertexproject/synapse/subscribers","subscription_url":"https://api.github.com/repos/vertexproject/synapse/subscription","commits_url":"https://api.github.com/repos/vertexproject/synapse/commits{/sha}","git_commits_url":"https://api.github.com/repos/vertexproject/synapse/git/commits{/sha}","comments_url":"https://api.github.com/repos/vertexproject/synapse/comments{/number}","issue_comment_url":"https://api.github.com/repos/vertexproject/synapse/issues/comments{/number}","contents_url":"https://api.github.com/repos/vertexproject/synapse/contents/{+path}","compare_url":"https://api.github.com/repos/vertexproject/synapse/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vertexproject/synapse/merges","archive_url":"https://api.github.com/repos/vertexproject/synapse/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vertexproject/synapse/downloads","issues_url":"https://api.github.com/repos/vertexproject/synapse/issues{/number}","pulls_url":"https://api.github.com/repos/vertexproject/synapse/pulls{/number}","milestones_url":"https://api.github.com/repos/vertexproject/synapse/milestones{/number}","notifications_url":"https://api.github.com/repos/vertexproject/synapse/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vertexproject/synapse/labels{/name}","releases_url":"https://api.github.com/repos/vertexproject/synapse/releases{/id}","deployments_url":"https://api.github.com/repos/vertexproject/synapse/deployments","created_at":"2015-06-10T23:29:41Z","updated_at":"2018-05-09T20:35:15Z","pushed_at":"2018-05-11T16:29:01Z","git_url":"git://github.com/vertexproject/synapse.git","ssh_url":"git@github.com:vertexproject/synapse.git","clone_url":"https://github.com/vertexproject/synapse.git","svn_url":"https://github.com/vertexproject/synapse","homepage":"","size":7782,"stargazers_count":43,"watchers_count":43,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":28,"mirror_url":null,"archived":false,"open_issues_count":61,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":28,"open_issues":61,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vertexproject/synapse/pulls/772"},"html":{"href":"https://github.com/vertexproject/synapse/pull/772"},"issue":{"href":"https://api.github.com/repos/vertexproject/synapse/issues/772"},"comments":{"href":"https://api.github.com/repos/vertexproject/synapse/issues/772/comments"},"review_comments":{"href":"https://api.github.com/repos/vertexproject/synapse/pulls/772/comments"},"review_comment":{"href":"https://api.github.com/repos/vertexproject/synapse/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vertexproject/synapse/pulls/772/commits"},"statuses":{"href":"https://api.github.com/repos/vertexproject/synapse/statuses/fdaae1681a2908c717fa75488f4f96329e5945f8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vEpiphyte"}}