{"action":"created","comment":{"url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/pulls/comments/45812172","id":45812172,"diff_hunk":"@@ -299,11 +356,17 @@ def parse(cls, root):\n         mdtype = root.get('MDTYPE')\n         if not mdtype:\n             raise exceptions.ParseError('mdWrap must have a MDTYPE')\n+        if mdtype in MDWrap.MDTYPE_CLASSES.keys():\n+            mdtype_class = MDWrap.MDTYPE_CLASSES[mdtype]()\n+            data = mdtype_class.parse(root.find('mets:xmlData', namespaces=utils.NAMESPACES)).__dict__","path":"metsrw/metadata.py","position":85,"original_position":85,"commit_id":"f7bf9e5b5cdb1e331f52c7a4ae03f385802ee95c","original_commit_id":"f7bf9e5b5cdb1e331f52c7a4ae03f385802ee95c","user":{"login":"Hwesta","id":3166226,"avatar_url":"https://avatars.githubusercontent.com/u/3166226?v=3","gravatar_id":"","url":"https://api.github.com/users/Hwesta","html_url":"https://github.com/Hwesta","followers_url":"https://api.github.com/users/Hwesta/followers","following_url":"https://api.github.com/users/Hwesta/following{/other_user}","gists_url":"https://api.github.com/users/Hwesta/gists{/gist_id}","starred_url":"https://api.github.com/users/Hwesta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hwesta/subscriptions","organizations_url":"https://api.github.com/users/Hwesta/orgs","repos_url":"https://api.github.com/users/Hwesta/repos","events_url":"https://api.github.com/users/Hwesta/events{/privacy}","received_events_url":"https://api.github.com/users/Hwesta/received_events","type":"User","site_admin":false},"body":"Why store the `__dict__` of this instead of the parsed class itself?","created_at":"2015-11-24T23:47:16Z","updated_at":"2015-11-24T23:47:16Z","html_url":"https://github.com/artefactual-labs/mets-reader-writer/pull/14#discussion_r45812172","pull_request_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/pulls/comments/45812172"},"html":{"href":"https://github.com/artefactual-labs/mets-reader-writer/pull/14#discussion_r45812172"},"pull_request":{"href":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/pulls/14","id":51721295,"html_url":"https://github.com/artefactual-labs/mets-reader-writer/pull/14","diff_url":"https://github.com/artefactual-labs/mets-reader-writer/pull/14.diff","patch_url":"https://github.com/artefactual-labs/mets-reader-writer/pull/14.patch","issue_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/issues/14","number":14,"state":"open","locked":false,"title":"Dev/issue 8894 rest api v3","user":{"login":"mcantelon","id":49010,"avatar_url":"https://avatars.githubusercontent.com/u/49010?v=3","gravatar_id":"","url":"https://api.github.com/users/mcantelon","html_url":"https://github.com/mcantelon","followers_url":"https://api.github.com/users/mcantelon/followers","following_url":"https://api.github.com/users/mcantelon/following{/other_user}","gists_url":"https://api.github.com/users/mcantelon/gists{/gist_id}","starred_url":"https://api.github.com/users/mcantelon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcantelon/subscriptions","organizations_url":"https://api.github.com/users/mcantelon/orgs","repos_url":"https://api.github.com/users/mcantelon/repos","events_url":"https://api.github.com/users/mcantelon/events{/privacy}","received_events_url":"https://api.github.com/users/mcantelon/received_events","type":"User","site_admin":false},"body":"METS parsing work and REST server.","created_at":"2015-11-24T21:42:38Z","updated_at":"2015-11-24T23:47:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e9cf0fd7833656da8b5759d7a547fed050194ec2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/pulls/14/commits","review_comments_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/pulls/14/comments","review_comment_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/issues/14/comments","statuses_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/statuses/f7bf9e5b5cdb1e331f52c7a4ae03f385802ee95c","head":{"label":"mcantelon:dev/issue-8894-rest-api-v3","ref":"dev/issue-8894-rest-api-v3","sha":"f7bf9e5b5cdb1e331f52c7a4ae03f385802ee95c","user":{"login":"mcantelon","id":49010,"avatar_url":"https://avatars.githubusercontent.com/u/49010?v=3","gravatar_id":"","url":"https://api.github.com/users/mcantelon","html_url":"https://github.com/mcantelon","followers_url":"https://api.github.com/users/mcantelon/followers","following_url":"https://api.github.com/users/mcantelon/following{/other_user}","gists_url":"https://api.github.com/users/mcantelon/gists{/gist_id}","starred_url":"https://api.github.com/users/mcantelon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcantelon/subscriptions","organizations_url":"https://api.github.com/users/mcantelon/orgs","repos_url":"https://api.github.com/users/mcantelon/repos","events_url":"https://api.github.com/users/mcantelon/events{/privacy}","received_events_url":"https://api.github.com/users/mcantelon/received_events","type":"User","site_admin":false},"repo":{"id":44779402,"name":"mets-reader-writer","full_name":"mcantelon/mets-reader-writer","owner":{"login":"mcantelon","id":49010,"avatar_url":"https://avatars.githubusercontent.com/u/49010?v=3","gravatar_id":"","url":"https://api.github.com/users/mcantelon","html_url":"https://github.com/mcantelon","followers_url":"https://api.github.com/users/mcantelon/followers","following_url":"https://api.github.com/users/mcantelon/following{/other_user}","gists_url":"https://api.github.com/users/mcantelon/gists{/gist_id}","starred_url":"https://api.github.com/users/mcantelon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcantelon/subscriptions","organizations_url":"https://api.github.com/users/mcantelon/orgs","repos_url":"https://api.github.com/users/mcantelon/repos","events_url":"https://api.github.com/users/mcantelon/events{/privacy}","received_events_url":"https://api.github.com/users/mcantelon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mcantelon/mets-reader-writer","description":"Library to parse and create METS files, especially for Archivematica.","fork":true,"url":"https://api.github.com/repos/mcantelon/mets-reader-writer","forks_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/forks","keys_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/teams","hooks_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/hooks","issue_events_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/issues/events{/number}","events_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/events","assignees_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/assignees{/user}","branches_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/branches{/branch}","tags_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/tags","blobs_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/git/refs{/sha}","trees_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/statuses/{sha}","languages_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/languages","stargazers_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/stargazers","contributors_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/contributors","subscribers_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/subscribers","subscription_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/subscription","commits_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/commits{/sha}","git_commits_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/git/commits{/sha}","comments_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/comments{/number}","issue_comment_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/issues/comments{/number}","contents_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/contents/{+path}","compare_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/merges","archive_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/downloads","issues_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/issues{/number}","pulls_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/pulls{/number}","milestones_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/milestones{/number}","notifications_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/labels{/name}","releases_url":"https://api.github.com/repos/mcantelon/mets-reader-writer/releases{/id}","created_at":"2015-10-22T23:36:08Z","updated_at":"2015-10-22T23:36:09Z","pushed_at":"2015-11-24T21:33:59Z","git_url":"git://github.com/mcantelon/mets-reader-writer.git","ssh_url":"git@github.com:mcantelon/mets-reader-writer.git","clone_url":"https://github.com/mcantelon/mets-reader-writer.git","svn_url":"https://github.com/mcantelon/mets-reader-writer","homepage":null,"size":157,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"artefactual-labs:master","ref":"master","sha":"46017b78fd0633f5073c7c1ab67eefc5e94e6a1a","user":{"login":"artefactual-labs","id":11890453,"avatar_url":"https://avatars.githubusercontent.com/u/11890453?v=3","gravatar_id":"","url":"https://api.github.com/users/artefactual-labs","html_url":"https://github.com/artefactual-labs","followers_url":"https://api.github.com/users/artefactual-labs/followers","following_url":"https://api.github.com/users/artefactual-labs/following{/other_user}","gists_url":"https://api.github.com/users/artefactual-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/artefactual-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artefactual-labs/subscriptions","organizations_url":"https://api.github.com/users/artefactual-labs/orgs","repos_url":"https://api.github.com/users/artefactual-labs/repos","events_url":"https://api.github.com/users/artefactual-labs/events{/privacy}","received_events_url":"https://api.github.com/users/artefactual-labs/received_events","type":"Organization","site_admin":false},"repo":{"id":42131415,"name":"mets-reader-writer","full_name":"artefactual-labs/mets-reader-writer","owner":{"login":"artefactual-labs","id":11890453,"avatar_url":"https://avatars.githubusercontent.com/u/11890453?v=3","gravatar_id":"","url":"https://api.github.com/users/artefactual-labs","html_url":"https://github.com/artefactual-labs","followers_url":"https://api.github.com/users/artefactual-labs/followers","following_url":"https://api.github.com/users/artefactual-labs/following{/other_user}","gists_url":"https://api.github.com/users/artefactual-labs/gists{/gist_id}","starred_url":"https://api.github.com/users/artefactual-labs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artefactual-labs/subscriptions","organizations_url":"https://api.github.com/users/artefactual-labs/orgs","repos_url":"https://api.github.com/users/artefactual-labs/repos","events_url":"https://api.github.com/users/artefactual-labs/events{/privacy}","received_events_url":"https://api.github.com/users/artefactual-labs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/artefactual-labs/mets-reader-writer","description":"Library to parse and create METS files, especially for Archivematica.","fork":false,"url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer","forks_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/forks","keys_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/teams","hooks_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/hooks","issue_events_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/issues/events{/number}","events_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/events","assignees_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/assignees{/user}","branches_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/branches{/branch}","tags_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/tags","blobs_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/git/refs{/sha}","trees_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/statuses/{sha}","languages_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/languages","stargazers_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/stargazers","contributors_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/contributors","subscribers_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/subscribers","subscription_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/subscription","commits_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/commits{/sha}","git_commits_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/git/commits{/sha}","comments_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/comments{/number}","issue_comment_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/issues/comments{/number}","contents_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/contents/{+path}","compare_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/merges","archive_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/downloads","issues_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/issues{/number}","pulls_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/pulls{/number}","milestones_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/milestones{/number}","notifications_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/labels{/name}","releases_url":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/releases{/id}","created_at":"2015-09-08T18:32:19Z","updated_at":"2015-09-08T18:36:05Z","pushed_at":"2015-11-24T21:42:39Z","git_url":"git://github.com/artefactual-labs/mets-reader-writer.git","ssh_url":"git@github.com:artefactual-labs/mets-reader-writer.git","clone_url":"https://github.com/artefactual-labs/mets-reader-writer.git","svn_url":"https://github.com/artefactual-labs/mets-reader-writer","homepage":null,"size":161,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/pulls/14"},"html":{"href":"https://github.com/artefactual-labs/mets-reader-writer/pull/14"},"issue":{"href":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/issues/14"},"comments":{"href":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/artefactual-labs/mets-reader-writer/statuses/f7bf9e5b5cdb1e331f52c7a4ae03f385802ee95c"}}}}