{"action":"created","comment":{"url":"https://api.github.com/repos/meta-network/go-meta/pulls/comments/143237118","pull_request_review_id":67724752,"id":143237118,"diff_hunk":"@@ -0,0 +1,101 @@\n+// This file is part of the go-meta library.\n+//\n+// Copyright (C) 2017 JAAK MUSIC LTD\n+//\n+// This program is free software: you can redistribute it and/or modify\n+// it under the terms of the GNU Lesser General Public License as published by\n+// the Free Software Foundation, either version 3 of the License, or\n+// (at your option) any later version.\n+//\n+// This program is distributed in the hope that it will be useful,\n+// but WITHOUT ANY WARRANTY; without even the implied warranty of\n+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+// GNU General Public License for more details.\n+//\n+// You should have received a copy of the GNU Lesser General Public License\n+// along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+//\n+// If you have any questions please contact yo@jaak.io\n+\n+package eidr\n+\n+import (\n+\t\"database/sql\"\n+\t\"net/http\"\n+\n+\t\"github.com/julienschmidt/httprouter\"\n+\t\"github.com/meta-network/go-meta\"\n+\t//\"github.com/neelance/graphql-go\"\n+\t//\"github.com/neelance/graphql-go/relay\"\n+)\n+\n+// API is a http.Handler which serves GraphQL query responses using a Resolver.\n+type API struct {\n+\tdb     *sql.DB\n+\tstore  *meta.Store\n+\trouter *httprouter.Router\n+}\n+\n+func NewAPI(db *sql.DB, store *meta.Store) (*API, error) {\n+\t//\tschema, err := graphql.ParseSchema(\n+\t//\t\tGraphQLSchema,\n+\t//\t\tNewResolver(db, store),\n+\t//\t)\n+\t//\tif err != nil {\n+\t//\t\treturn nil, err\n+\t//\t}\n+\tapi := &API{\n+\t\tdb:     db,\n+\t\tstore:  store,\n+\t\trouter: httprouter.New(),\n+\t}\n+\tapi.router.GET(\"/\", api.HandleIndex)\n+\t//api.router.Handler(\"POST\", \"/graphql\", &relay.Handler{Schema: schema})","path":"eidr/api.go","position":53,"original_position":53,"commit_id":"724d4f298f494d895ce0b7459ceecee0e942b0c1","original_commit_id":"724d4f298f494d895ce0b7459ceecee0e942b0c1","user":{"login":"nolash","id":9886925,"avatar_url":"https://avatars1.githubusercontent.com/u/9886925?v=4","gravatar_id":"","url":"https://api.github.com/users/nolash","html_url":"https://github.com/nolash","followers_url":"https://api.github.com/users/nolash/followers","following_url":"https://api.github.com/users/nolash/following{/other_user}","gists_url":"https://api.github.com/users/nolash/gists{/gist_id}","starred_url":"https://api.github.com/users/nolash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolash/subscriptions","organizations_url":"https://api.github.com/users/nolash/orgs","repos_url":"https://api.github.com/users/nolash/repos","events_url":"https://api.github.com/users/nolash/events{/privacy}","received_events_url":"https://api.github.com/users/nolash/received_events","type":"User","site_admin":false},"body":"There isn't. But there will be, and this is just a boilerplate file which will be used in next turn. Do you want me to remove it?","created_at":"2017-10-06T16:39:19Z","updated_at":"2017-10-06T16:39:19Z","html_url":"https://github.com/meta-network/go-meta/pull/25#discussion_r143237118","pull_request_url":"https://api.github.com/repos/meta-network/go-meta/pulls/25","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/meta-network/go-meta/pulls/comments/143237118"},"html":{"href":"https://github.com/meta-network/go-meta/pull/25#discussion_r143237118"},"pull_request":{"href":"https://api.github.com/repos/meta-network/go-meta/pulls/25"}},"in_reply_to_id":143150597},"pull_request":{"url":"https://api.github.com/repos/meta-network/go-meta/pulls/25","id":144997161,"html_url":"https://github.com/meta-network/go-meta/pull/25","diff_url":"https://github.com/meta-network/go-meta/pull/25.diff","patch_url":"https://github.com/meta-network/go-meta/pull/25.patch","issue_url":"https://api.github.com/repos/meta-network/go-meta/issues/25","number":25,"state":"open","locked":false,"title":"Initial EIDR ingestion","user":{"login":"nolash","id":9886925,"avatar_url":"https://avatars1.githubusercontent.com/u/9886925?v=4","gravatar_id":"","url":"https://api.github.com/users/nolash","html_url":"https://github.com/nolash","followers_url":"https://api.github.com/users/nolash/followers","following_url":"https://api.github.com/users/nolash/following{/other_user}","gists_url":"https://api.github.com/users/nolash/gists{/gist_id}","starred_url":"https://api.github.com/users/nolash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolash/subscriptions","organizations_url":"https://api.github.com/users/nolash/orgs","repos_url":"https://api.github.com/users/nolash/repos","events_url":"https://api.github.com/users/nolash/events{/privacy}","received_events_url":"https://api.github.com/users/nolash/received_events","type":"User","site_admin":false},"body":"This is the first implementation of ingestion of EIDR data. It performs the following steps:\r\n\r\n* retrieve xml objects from corresponding doi ids from the eidr doi proxy\r\n* convert xml to meta objects\r\n* index meta objects to sqlite database\r\n\r\nThe implememenation aims to follow the constraints and descriptions [EIDR 2.0 Data fields reference guide][1]. However, the scope of data recognition is limitied to the data available in the xml retreived by the provided testset list (see folder eidr/testdata/readme.txt). The data set can be summarized as follows:\r\n\r\n```\r\nRows: 72\r\nReferenceTypes: Season (7), TV (64), Series (1)\r\nStructuralTypes: Abstraction (72)\r\nAlternateIDs: Proprietary (2), IMDB (35)\r\nDerivedTypes: Clip (0), Edit (0), Episode (64), Manifestation (0), Season (7)\r\n```\r\n\r\nIn this stage in the implementation, only the Episode derived type (ExtraMetadata) has been implemented.\r\n\r\nThe aim for (graphql) index retrieval is that it is possible to query per actual object type, constituting the combined onthology of BaseObject.ReferentType and the enumerated elements of ExtraMetaDataObject (Series, Season, Episode etc). The database structure layout is thus designed with this in mind. Retrieval should then look something like this (example):\r\n\r\n```\r\nObject: TV\r\nID: <doi.ID>\r\nSubtype: Series\r\nParent: <doi.ID>\r\n<Baseobject fields...>\r\n<Extraobject fields...>\r\n```\r\n\r\n---\r\n\r\nThe PR also introduces a primitive logger object, intended for general use in meta.\r\n\r\n[1]: http://eidr.org/documents/EIDR_2.0_Data_Fields.pdf ","created_at":"2017-10-05T19:11:20Z","updated_at":"2017-10-06T16:39:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83b5bb23401f58074d2338f799ae5f53e0aecb95","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/meta-network/go-meta/pulls/25/commits","review_comments_url":"https://api.github.com/repos/meta-network/go-meta/pulls/25/comments","review_comment_url":"https://api.github.com/repos/meta-network/go-meta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/meta-network/go-meta/issues/25/comments","statuses_url":"https://api.github.com/repos/meta-network/go-meta/statuses/724d4f298f494d895ce0b7459ceecee0e942b0c1","head":{"label":"meta-network:eidr","ref":"eidr","sha":"724d4f298f494d895ce0b7459ceecee0e942b0c1","user":{"login":"meta-network","id":30271048,"avatar_url":"https://avatars1.githubusercontent.com/u/30271048?v=4","gravatar_id":"","url":"https://api.github.com/users/meta-network","html_url":"https://github.com/meta-network","followers_url":"https://api.github.com/users/meta-network/followers","following_url":"https://api.github.com/users/meta-network/following{/other_user}","gists_url":"https://api.github.com/users/meta-network/gists{/gist_id}","starred_url":"https://api.github.com/users/meta-network/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meta-network/subscriptions","organizations_url":"https://api.github.com/users/meta-network/orgs","repos_url":"https://api.github.com/users/meta-network/repos","events_url":"https://api.github.com/users/meta-network/events{/privacy}","received_events_url":"https://api.github.com/users/meta-network/received_events","type":"Organization","site_admin":false},"repo":{"id":98303763,"name":"go-meta","full_name":"meta-network/go-meta","owner":{"login":"meta-network","id":30271048,"avatar_url":"https://avatars1.githubusercontent.com/u/30271048?v=4","gravatar_id":"","url":"https://api.github.com/users/meta-network","html_url":"https://github.com/meta-network","followers_url":"https://api.github.com/users/meta-network/followers","following_url":"https://api.github.com/users/meta-network/following{/other_user}","gists_url":"https://api.github.com/users/meta-network/gists{/gist_id}","starred_url":"https://api.github.com/users/meta-network/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meta-network/subscriptions","organizations_url":"https://api.github.com/users/meta-network/orgs","repos_url":"https://api.github.com/users/meta-network/repos","events_url":"https://api.github.com/users/meta-network/events{/privacy}","received_events_url":"https://api.github.com/users/meta-network/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/meta-network/go-meta","description":"The Go META library","fork":false,"url":"https://api.github.com/repos/meta-network/go-meta","forks_url":"https://api.github.com/repos/meta-network/go-meta/forks","keys_url":"https://api.github.com/repos/meta-network/go-meta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meta-network/go-meta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meta-network/go-meta/teams","hooks_url":"https://api.github.com/repos/meta-network/go-meta/hooks","issue_events_url":"https://api.github.com/repos/meta-network/go-meta/issues/events{/number}","events_url":"https://api.github.com/repos/meta-network/go-meta/events","assignees_url":"https://api.github.com/repos/meta-network/go-meta/assignees{/user}","branches_url":"https://api.github.com/repos/meta-network/go-meta/branches{/branch}","tags_url":"https://api.github.com/repos/meta-network/go-meta/tags","blobs_url":"https://api.github.com/repos/meta-network/go-meta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meta-network/go-meta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meta-network/go-meta/git/refs{/sha}","trees_url":"https://api.github.com/repos/meta-network/go-meta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meta-network/go-meta/statuses/{sha}","languages_url":"https://api.github.com/repos/meta-network/go-meta/languages","stargazers_url":"https://api.github.com/repos/meta-network/go-meta/stargazers","contributors_url":"https://api.github.com/repos/meta-network/go-meta/contributors","subscribers_url":"https://api.github.com/repos/meta-network/go-meta/subscribers","subscription_url":"https://api.github.com/repos/meta-network/go-meta/subscription","commits_url":"https://api.github.com/repos/meta-network/go-meta/commits{/sha}","git_commits_url":"https://api.github.com/repos/meta-network/go-meta/git/commits{/sha}","comments_url":"https://api.github.com/repos/meta-network/go-meta/comments{/number}","issue_comment_url":"https://api.github.com/repos/meta-network/go-meta/issues/comments{/number}","contents_url":"https://api.github.com/repos/meta-network/go-meta/contents/{+path}","compare_url":"https://api.github.com/repos/meta-network/go-meta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meta-network/go-meta/merges","archive_url":"https://api.github.com/repos/meta-network/go-meta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meta-network/go-meta/downloads","issues_url":"https://api.github.com/repos/meta-network/go-meta/issues{/number}","pulls_url":"https://api.github.com/repos/meta-network/go-meta/pulls{/number}","milestones_url":"https://api.github.com/repos/meta-network/go-meta/milestones{/number}","notifications_url":"https://api.github.com/repos/meta-network/go-meta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meta-network/go-meta/labels{/name}","releases_url":"https://api.github.com/repos/meta-network/go-meta/releases{/id}","deployments_url":"https://api.github.com/repos/meta-network/go-meta/deployments","created_at":"2017-07-25T12:28:39Z","updated_at":"2017-09-06T16:21:06Z","pushed_at":"2017-10-05T19:11:20Z","git_url":"git://github.com/meta-network/go-meta.git","ssh_url":"git@github.com:meta-network/go-meta.git","clone_url":"https://github.com/meta-network/go-meta.git","svn_url":"https://github.com/meta-network/go-meta","homepage":null,"size":2443,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":3,"default_branch":"master"}},"base":{"label":"meta-network:master","ref":"master","sha":"adb81d009a32e2ded79c750ccb6a2f82215d6e8c","user":{"login":"meta-network","id":30271048,"avatar_url":"https://avatars1.githubusercontent.com/u/30271048?v=4","gravatar_id":"","url":"https://api.github.com/users/meta-network","html_url":"https://github.com/meta-network","followers_url":"https://api.github.com/users/meta-network/followers","following_url":"https://api.github.com/users/meta-network/following{/other_user}","gists_url":"https://api.github.com/users/meta-network/gists{/gist_id}","starred_url":"https://api.github.com/users/meta-network/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meta-network/subscriptions","organizations_url":"https://api.github.com/users/meta-network/orgs","repos_url":"https://api.github.com/users/meta-network/repos","events_url":"https://api.github.com/users/meta-network/events{/privacy}","received_events_url":"https://api.github.com/users/meta-network/received_events","type":"Organization","site_admin":false},"repo":{"id":98303763,"name":"go-meta","full_name":"meta-network/go-meta","owner":{"login":"meta-network","id":30271048,"avatar_url":"https://avatars1.githubusercontent.com/u/30271048?v=4","gravatar_id":"","url":"https://api.github.com/users/meta-network","html_url":"https://github.com/meta-network","followers_url":"https://api.github.com/users/meta-network/followers","following_url":"https://api.github.com/users/meta-network/following{/other_user}","gists_url":"https://api.github.com/users/meta-network/gists{/gist_id}","starred_url":"https://api.github.com/users/meta-network/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meta-network/subscriptions","organizations_url":"https://api.github.com/users/meta-network/orgs","repos_url":"https://api.github.com/users/meta-network/repos","events_url":"https://api.github.com/users/meta-network/events{/privacy}","received_events_url":"https://api.github.com/users/meta-network/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/meta-network/go-meta","description":"The Go META library","fork":false,"url":"https://api.github.com/repos/meta-network/go-meta","forks_url":"https://api.github.com/repos/meta-network/go-meta/forks","keys_url":"https://api.github.com/repos/meta-network/go-meta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meta-network/go-meta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meta-network/go-meta/teams","hooks_url":"https://api.github.com/repos/meta-network/go-meta/hooks","issue_events_url":"https://api.github.com/repos/meta-network/go-meta/issues/events{/number}","events_url":"https://api.github.com/repos/meta-network/go-meta/events","assignees_url":"https://api.github.com/repos/meta-network/go-meta/assignees{/user}","branches_url":"https://api.github.com/repos/meta-network/go-meta/branches{/branch}","tags_url":"https://api.github.com/repos/meta-network/go-meta/tags","blobs_url":"https://api.github.com/repos/meta-network/go-meta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meta-network/go-meta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meta-network/go-meta/git/refs{/sha}","trees_url":"https://api.github.com/repos/meta-network/go-meta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meta-network/go-meta/statuses/{sha}","languages_url":"https://api.github.com/repos/meta-network/go-meta/languages","stargazers_url":"https://api.github.com/repos/meta-network/go-meta/stargazers","contributors_url":"https://api.github.com/repos/meta-network/go-meta/contributors","subscribers_url":"https://api.github.com/repos/meta-network/go-meta/subscribers","subscription_url":"https://api.github.com/repos/meta-network/go-meta/subscription","commits_url":"https://api.github.com/repos/meta-network/go-meta/commits{/sha}","git_commits_url":"https://api.github.com/repos/meta-network/go-meta/git/commits{/sha}","comments_url":"https://api.github.com/repos/meta-network/go-meta/comments{/number}","issue_comment_url":"https://api.github.com/repos/meta-network/go-meta/issues/comments{/number}","contents_url":"https://api.github.com/repos/meta-network/go-meta/contents/{+path}","compare_url":"https://api.github.com/repos/meta-network/go-meta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meta-network/go-meta/merges","archive_url":"https://api.github.com/repos/meta-network/go-meta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meta-network/go-meta/downloads","issues_url":"https://api.github.com/repos/meta-network/go-meta/issues{/number}","pulls_url":"https://api.github.com/repos/meta-network/go-meta/pulls{/number}","milestones_url":"https://api.github.com/repos/meta-network/go-meta/milestones{/number}","notifications_url":"https://api.github.com/repos/meta-network/go-meta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meta-network/go-meta/labels{/name}","releases_url":"https://api.github.com/repos/meta-network/go-meta/releases{/id}","deployments_url":"https://api.github.com/repos/meta-network/go-meta/deployments","created_at":"2017-07-25T12:28:39Z","updated_at":"2017-09-06T16:21:06Z","pushed_at":"2017-10-05T19:11:20Z","git_url":"git://github.com/meta-network/go-meta.git","ssh_url":"git@github.com:meta-network/go-meta.git","clone_url":"https://github.com/meta-network/go-meta.git","svn_url":"https://github.com/meta-network/go-meta","homepage":null,"size":2443,"stargazers_count":3,"watchers_count":3,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/meta-network/go-meta/pulls/25"},"html":{"href":"https://github.com/meta-network/go-meta/pull/25"},"issue":{"href":"https://api.github.com/repos/meta-network/go-meta/issues/25"},"comments":{"href":"https://api.github.com/repos/meta-network/go-meta/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/meta-network/go-meta/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/meta-network/go-meta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/meta-network/go-meta/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/meta-network/go-meta/statuses/724d4f298f494d895ce0b7459ceecee0e942b0c1"}},"author_association":"NONE"}}
{"actor":{"display_login":"nolash"}}