{"action":"created","comment":{"url":"https://api.github.com/repos/dpla/KriKri/pulls/comments/23306247","id":23306247,"diff_hunk":"@@ -56,5 +56,32 @@ class Engine < ::Rails::Engine\n         .register(:oai, Krikri::Harvesters::OAIHarvester)\n     end\n \n+    initializer :rdf_repository do\n+      Krikri::Repository =\n+        RDF::Marmotta.new(Krikri::Settings['marmotta']['base'])\n+    end\n+\n+    initializer :aggregation do\n+      DPLA::MAP::Aggregation.class_eval do\n+        include Krikri::LDP::RdfSource\n+        configure :base_uri => Krikri::Settings['marmotta']['item_container']","path":"lib/krikri/engine.rb","position":12,"original_position":12,"commit_id":"776891a3e961733686d345fe501709a4dc8fd9ba","original_commit_id":"776891a3e961733686d345fe501709a4dc8fd9ba","user":{"login":"no-reply","id":1361776,"avatar_url":"https://avatars.githubusercontent.com/u/1361776?v=3","gravatar_id":"","url":"https://api.github.com/users/no-reply","html_url":"https://github.com/no-reply","followers_url":"https://api.github.com/users/no-reply/followers","following_url":"https://api.github.com/users/no-reply/following{/other_user}","gists_url":"https://api.github.com/users/no-reply/gists{/gist_id}","starred_url":"https://api.github.com/users/no-reply/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/no-reply/subscriptions","organizations_url":"https://api.github.com/users/no-reply/orgs","repos_url":"https://api.github.com/users/no-reply/repos","events_url":"https://api.github.com/users/no-reply/events{/privacy}","received_events_url":"https://api.github.com/users/no-reply/received_events","type":"User","site_admin":false},"body":"Which part in particular?\r\n\r\nIt's necessary to reopen the class to `include Krikri::LDP::RdfSource`, which isn't necessarily desirable in the broader `dpla-map` context.  The rest of this could conceivably be moved upstream. ","created_at":"2015-01-21T15:25:56Z","updated_at":"2015-01-21T15:25:56Z","html_url":"https://github.com/dpla/KriKri/pull/60#discussion_r23306247","pull_request_url":"https://api.github.com/repos/dpla/KriKri/pulls/60","_links":{"self":{"href":"https://api.github.com/repos/dpla/KriKri/pulls/comments/23306247"},"html":{"href":"https://github.com/dpla/KriKri/pull/60#discussion_r23306247"},"pull_request":{"href":"https://api.github.com/repos/dpla/KriKri/pulls/60"}}},"pull_request":{"url":"https://api.github.com/repos/dpla/KriKri/pulls/60","id":27579717,"html_url":"https://github.com/dpla/KriKri/pull/60","diff_url":"https://github.com/dpla/KriKri/pull/60.diff","patch_url":"https://github.com/dpla/KriKri/pull/60.patch","issue_url":"https://api.github.com/repos/dpla/KriKri/issues/60","number":60,"state":"open","locked":false,"title":"Run Mappings Against a Harvest","user":{"login":"no-reply","id":1361776,"avatar_url":"https://avatars.githubusercontent.com/u/1361776?v=3","gravatar_id":"","url":"https://api.github.com/users/no-reply","html_url":"https://github.com/no-reply","followers_url":"https://api.github.com/users/no-reply/followers","following_url":"https://api.github.com/users/no-reply/following{/other_user}","gists_url":"https://api.github.com/users/no-reply/gists{/gist_id}","starred_url":"https://api.github.com/users/no-reply/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/no-reply/subscriptions","organizations_url":"https://api.github.com/users/no-reply/orgs","repos_url":"https://api.github.com/users/no-reply/repos","events_url":"https://api.github.com/users/no-reply/events{/privacy}","received_events_url":"https://api.github.com/users/no-reply/received_events","type":"User","site_admin":false},"body":"Adds the ability to run a mapping on a whole harvest and save the resulting records over LDP.  Significant refactors of Agents and Jobs are included, as well as LDP RDFSource integration for ActiveTriples.\r\n\r\n - `Krikri::Activity`: Now contains the logic to build activities from its class name and opts, as well as an `#rdf_subject` so it can be referred to in LDP Graphs.  We could add capability for it to serialize more of its data as RDF, but no use cas stands out yet.\r\n\r\n - `Krikri::OriginalRecord`: Now has metadata, backed by `Krikri::OriginalRecordMetadata` (an `ActiveTriples::Resource` / `Krikri::Ldp::RdfSource`.  This allows us to store the knowledge that a given `Krikri::Activity` (harvest) generated the record.\r\n\r\n - `DPLA::MAP::Aggregation`: Is monkey patched to include `Krikri::Ldp::RdfSource`, allowing MAP records to be persisted/retrieved over LDP.  It also gets the ability to mint its own identifier.\r\n\r\n - `Krikri::Job`: Gets more of the core logic of jobs moved out of its subclasses and toward the base class.  It's possible that all jobs will end up being the same, just with different queue names. For now, Jobs implement `#run` to complete the interface and actually process the job.\r\n\r\n- `Krikri::Ldp::Resource`: Now validates that the request URI's target the configured marmotta endpoint.\r\n\r\n- `Krikri::Mapper`: Now includes a `Krikri::Mapper::Agent` as the responsible `SoftwareAgent` for running a mapping job.\r\n\r\n- `Krikri::Mapping`: Now accepts a parser at time of definition.  When records are passed in, it uses this parser to interpret them, unless they are already parsed.\r\n\r\n- `Krikri::ProvenanceQueryClient`: This is an initial attempt at a system for querying Marmotta for items by the `Activity` that created them.  I hope that it will grow over time. For now it implements a single query and ties in (half heartedly) with `SPARQL::Client`.\r\n\r\n- Several `_spec` files are refactored or moved to use shared examples.","created_at":"2015-01-19T00:15:41Z","updated_at":"2015-01-21T15:25:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5f14b4551ba6f3160d3b0f9c11e1f55bff05d4ee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dpla/KriKri/pulls/60/commits","review_comments_url":"https://api.github.com/repos/dpla/KriKri/pulls/60/comments","review_comment_url":"https://api.github.com/repos/dpla/KriKri/pulls/comments/{number}","comments_url":"https://api.github.com/repos/dpla/KriKri/issues/60/comments","statuses_url":"https://api.github.com/repos/dpla/KriKri/statuses/776891a3e961733686d345fe501709a4dc8fd9ba","head":{"label":"dpla:feature/map-harvest","ref":"feature/map-harvest","sha":"776891a3e961733686d345fe501709a4dc8fd9ba","user":{"login":"dpla","id":1252916,"avatar_url":"https://avatars.githubusercontent.com/u/1252916?v=3","gravatar_id":"","url":"https://api.github.com/users/dpla","html_url":"https://github.com/dpla","followers_url":"https://api.github.com/users/dpla/followers","following_url":"https://api.github.com/users/dpla/following{/other_user}","gists_url":"https://api.github.com/users/dpla/gists{/gist_id}","starred_url":"https://api.github.com/users/dpla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpla/subscriptions","organizations_url":"https://api.github.com/users/dpla/orgs","repos_url":"https://api.github.com/users/dpla/repos","events_url":"https://api.github.com/users/dpla/events{/privacy}","received_events_url":"https://api.github.com/users/dpla/received_events","type":"Organization","site_admin":false},"repo":{"id":25104780,"name":"KriKri","full_name":"dpla/KriKri","owner":{"login":"dpla","id":1252916,"avatar_url":"https://avatars.githubusercontent.com/u/1252916?v=3","gravatar_id":"","url":"https://api.github.com/users/dpla","html_url":"https://github.com/dpla","followers_url":"https://api.github.com/users/dpla/followers","following_url":"https://api.github.com/users/dpla/following{/other_user}","gists_url":"https://api.github.com/users/dpla/gists{/gist_id}","starred_url":"https://api.github.com/users/dpla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpla/subscriptions","organizations_url":"https://api.github.com/users/dpla/orgs","repos_url":"https://api.github.com/users/dpla/repos","events_url":"https://api.github.com/users/dpla/events{/privacy}","received_events_url":"https://api.github.com/users/dpla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dpla/KriKri","description":"A Rails engine for metadata aggregation, enhancement, and quality control.","fork":false,"url":"https://api.github.com/repos/dpla/KriKri","forks_url":"https://api.github.com/repos/dpla/KriKri/forks","keys_url":"https://api.github.com/repos/dpla/KriKri/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dpla/KriKri/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dpla/KriKri/teams","hooks_url":"https://api.github.com/repos/dpla/KriKri/hooks","issue_events_url":"https://api.github.com/repos/dpla/KriKri/issues/events{/number}","events_url":"https://api.github.com/repos/dpla/KriKri/events","assignees_url":"https://api.github.com/repos/dpla/KriKri/assignees{/user}","branches_url":"https://api.github.com/repos/dpla/KriKri/branches{/branch}","tags_url":"https://api.github.com/repos/dpla/KriKri/tags","blobs_url":"https://api.github.com/repos/dpla/KriKri/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dpla/KriKri/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dpla/KriKri/git/refs{/sha}","trees_url":"https://api.github.com/repos/dpla/KriKri/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dpla/KriKri/statuses/{sha}","languages_url":"https://api.github.com/repos/dpla/KriKri/languages","stargazers_url":"https://api.github.com/repos/dpla/KriKri/stargazers","contributors_url":"https://api.github.com/repos/dpla/KriKri/contributors","subscribers_url":"https://api.github.com/repos/dpla/KriKri/subscribers","subscription_url":"https://api.github.com/repos/dpla/KriKri/subscription","commits_url":"https://api.github.com/repos/dpla/KriKri/commits{/sha}","git_commits_url":"https://api.github.com/repos/dpla/KriKri/git/commits{/sha}","comments_url":"https://api.github.com/repos/dpla/KriKri/comments{/number}","issue_comment_url":"https://api.github.com/repos/dpla/KriKri/issues/comments/{number}","contents_url":"https://api.github.com/repos/dpla/KriKri/contents/{+path}","compare_url":"https://api.github.com/repos/dpla/KriKri/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dpla/KriKri/merges","archive_url":"https://api.github.com/repos/dpla/KriKri/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dpla/KriKri/downloads","issues_url":"https://api.github.com/repos/dpla/KriKri/issues{/number}","pulls_url":"https://api.github.com/repos/dpla/KriKri/pulls{/number}","milestones_url":"https://api.github.com/repos/dpla/KriKri/milestones{/number}","notifications_url":"https://api.github.com/repos/dpla/KriKri/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dpla/KriKri/labels{/name}","releases_url":"https://api.github.com/repos/dpla/KriKri/releases{/id}","created_at":"2014-10-12T02:41:01Z","updated_at":"2015-01-16T22:51:42Z","pushed_at":"2015-01-21T05:43:59Z","git_url":"git://github.com/dpla/KriKri.git","ssh_url":"git@github.com:dpla/KriKri.git","clone_url":"https://github.com/dpla/KriKri.git","svn_url":"https://github.com/dpla/KriKri","homepage":null,"size":5820,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":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":"develop"}},"base":{"label":"dpla:develop","ref":"develop","sha":"5a0d053e16b4ac55f2842d8c1cbfe1c69af9a9a6","user":{"login":"dpla","id":1252916,"avatar_url":"https://avatars.githubusercontent.com/u/1252916?v=3","gravatar_id":"","url":"https://api.github.com/users/dpla","html_url":"https://github.com/dpla","followers_url":"https://api.github.com/users/dpla/followers","following_url":"https://api.github.com/users/dpla/following{/other_user}","gists_url":"https://api.github.com/users/dpla/gists{/gist_id}","starred_url":"https://api.github.com/users/dpla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpla/subscriptions","organizations_url":"https://api.github.com/users/dpla/orgs","repos_url":"https://api.github.com/users/dpla/repos","events_url":"https://api.github.com/users/dpla/events{/privacy}","received_events_url":"https://api.github.com/users/dpla/received_events","type":"Organization","site_admin":false},"repo":{"id":25104780,"name":"KriKri","full_name":"dpla/KriKri","owner":{"login":"dpla","id":1252916,"avatar_url":"https://avatars.githubusercontent.com/u/1252916?v=3","gravatar_id":"","url":"https://api.github.com/users/dpla","html_url":"https://github.com/dpla","followers_url":"https://api.github.com/users/dpla/followers","following_url":"https://api.github.com/users/dpla/following{/other_user}","gists_url":"https://api.github.com/users/dpla/gists{/gist_id}","starred_url":"https://api.github.com/users/dpla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpla/subscriptions","organizations_url":"https://api.github.com/users/dpla/orgs","repos_url":"https://api.github.com/users/dpla/repos","events_url":"https://api.github.com/users/dpla/events{/privacy}","received_events_url":"https://api.github.com/users/dpla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dpla/KriKri","description":"A Rails engine for metadata aggregation, enhancement, and quality control.","fork":false,"url":"https://api.github.com/repos/dpla/KriKri","forks_url":"https://api.github.com/repos/dpla/KriKri/forks","keys_url":"https://api.github.com/repos/dpla/KriKri/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dpla/KriKri/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dpla/KriKri/teams","hooks_url":"https://api.github.com/repos/dpla/KriKri/hooks","issue_events_url":"https://api.github.com/repos/dpla/KriKri/issues/events{/number}","events_url":"https://api.github.com/repos/dpla/KriKri/events","assignees_url":"https://api.github.com/repos/dpla/KriKri/assignees{/user}","branches_url":"https://api.github.com/repos/dpla/KriKri/branches{/branch}","tags_url":"https://api.github.com/repos/dpla/KriKri/tags","blobs_url":"https://api.github.com/repos/dpla/KriKri/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dpla/KriKri/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dpla/KriKri/git/refs{/sha}","trees_url":"https://api.github.com/repos/dpla/KriKri/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dpla/KriKri/statuses/{sha}","languages_url":"https://api.github.com/repos/dpla/KriKri/languages","stargazers_url":"https://api.github.com/repos/dpla/KriKri/stargazers","contributors_url":"https://api.github.com/repos/dpla/KriKri/contributors","subscribers_url":"https://api.github.com/repos/dpla/KriKri/subscribers","subscription_url":"https://api.github.com/repos/dpla/KriKri/subscription","commits_url":"https://api.github.com/repos/dpla/KriKri/commits{/sha}","git_commits_url":"https://api.github.com/repos/dpla/KriKri/git/commits{/sha}","comments_url":"https://api.github.com/repos/dpla/KriKri/comments{/number}","issue_comment_url":"https://api.github.com/repos/dpla/KriKri/issues/comments/{number}","contents_url":"https://api.github.com/repos/dpla/KriKri/contents/{+path}","compare_url":"https://api.github.com/repos/dpla/KriKri/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dpla/KriKri/merges","archive_url":"https://api.github.com/repos/dpla/KriKri/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dpla/KriKri/downloads","issues_url":"https://api.github.com/repos/dpla/KriKri/issues{/number}","pulls_url":"https://api.github.com/repos/dpla/KriKri/pulls{/number}","milestones_url":"https://api.github.com/repos/dpla/KriKri/milestones{/number}","notifications_url":"https://api.github.com/repos/dpla/KriKri/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dpla/KriKri/labels{/name}","releases_url":"https://api.github.com/repos/dpla/KriKri/releases{/id}","created_at":"2014-10-12T02:41:01Z","updated_at":"2015-01-16T22:51:42Z","pushed_at":"2015-01-21T05:43:59Z","git_url":"git://github.com/dpla/KriKri.git","ssh_url":"git@github.com:dpla/KriKri.git","clone_url":"https://github.com/dpla/KriKri.git","svn_url":"https://github.com/dpla/KriKri","homepage":null,"size":5820,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":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":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/dpla/KriKri/pulls/60"},"html":{"href":"https://github.com/dpla/KriKri/pull/60"},"issue":{"href":"https://api.github.com/repos/dpla/KriKri/issues/60"},"comments":{"href":"https://api.github.com/repos/dpla/KriKri/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/dpla/KriKri/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/dpla/KriKri/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/dpla/KriKri/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/dpla/KriKri/statuses/776891a3e961733686d345fe501709a4dc8fd9ba"}}}}