{"action":"created","comment":{"url":"https://api.github.com/repos/dpla/heidrun-mappings/pulls/comments/33359130","id":33359130,"diff_hunk":"@@ -0,0 +1,149 @@\n+Krikri::Mapper.define(:tn_mods, :parser => Krikri::ModsParser) do\n+  provider :class => DPLA::MAP::Agent do\n+    uri 'http://dp.la/api/contributor/tn'\n+    label 'Tennessee Digital Library'\n+  end\n+\n+  dataProvider :class => DPLA::MAP::Agent do\n+    providedLabel record.field('mods:recordInfo', 'mods:recordContentSource')\n+  end\n+\n+  isShownAt :class => DPLA::MAP::WebResource do\n+    uri record.field('mods:location', 'mods:url')\n+         \t  .match_attribute(:usage, 'primary display')\n+              .match_attribute(:access, 'object in context')\n+  end\n+\n+  preview :class => DPLA::MAP::WebResource do\n+    uri record.field('mods:location', 'mods:url')\n+              .match_attribute(:access, 'preview')\n+  end\n+\n+  originalRecord :class => DPLA::MAP::WebResource do\n+    uri record_uri\n+  end\n+#they have a mapping for format and rights in the Web Resource as well...not sure how to implement\n+\n+  sourceResource :class => DPLA::MAP::SourceResource do\n+    alternative record.field('mods:titleInfo')\n+                      .match_attribute(:type, 'alternative')\n+                      .field('mods:title')\n+\n+    collection :class => DPLA::MAP::Collection,\n+               :each => record.field('mods:relatedItem')\n+               \t\t\t\t  .match_attribute(:type, 'host')\n+               \t\t\t\t  .match_attribute(:displayLabel, 'Project')\n+               \t\t\t\t  .field('mods:titleInfo', 'mods:title'),\n+               :as => :coll do\n+      title coll\n+    end\n+\n+    contributor :class => DPLA::MAP::Agent,\n+                :each => record.field('mods:name')\n+                        .select { |name| name['mods:role'].map(&:value).include?('contributor') },\n+                :as => :contrib do\n+      providedLabel contrib.field('mods:namePart')\n+    end\n+    \n+    creator :class => DPLA::MAP::Agent,\n+            :each => record.field('mods:name')\n+                    .select { |name| name['mods:role'].map(&:value).include?('creator') },\n+            :as => :creator_role do\n+      providedLabel creator_role.field('mods:namePart')\n+    end\n+\n+    date :class => DPLA::MAP::TimeSpan,\n+         :each => record.field('mods:originInfo'),\n+         :as => :created do\n+      providedLabel created.field('mods:dateCreated')\n+    end\n+\n+    description record.field('mods:abstract')\n+\n+    extent record.field('mods:physicalDescription', 'mods:extent')\n+\n+    # non-DCMIType values from type will be handled in enrichment\n+    dcformat record.field('mods:physicalDescription', 'mods:form')\n+\n+    genre record.field('mods:genre').match_attribute(:authority 'aat')\n+\n+    identifier record.field('mods:identifier')\n+\n+    language :class => DPLA::MAP::Controlled::Language,\n+             :each => record.field('mods:language', 'mods:languageTerm')\n+             \t\t\t\t.match_attribute(:type 'code')\n+             \t\t\t\t.match_attribute(:authority 'iso639-2b'),\n+             :as => :lang do\n+      prefLabel lang\n+    end\n+\n+    spatial :class => DPLA::MAP::Place,\n+            :each => record.field('mods:subject', 'mods:geographic'),\n+            :as => :place do\n+      providedLabel place\n+    end\n+    \n+    #They have coordinates as well. I wasn't sure if I should add a second spatial mapping or include this in the previous. I decided to add a second. Is that correct?\n+    spatial :clas => DPLA::MAP::Place,\n+      \t\t:each => record.field('mods:subject', 'mods:cartographics', 'mods:coordinates'),\n+      \t\t:as => :lat do\n+      wgs84_pos:lat lat\n+    end\n+\n+    publisher :class => DPLA::MAP::Agent,\n+              :each => record.field('mods:originInfo'),\n+              :as => :publisher do\n+      providedLabel publisher.field('mods:publisher')\n+    end\n+    \n+    #totally a guess as to how to not map properties with certain attributes. for relation","path":"heidrun/TN_mods.rb","position":99,"original_position":99,"commit_id":"87344f39e84fff6a26c702eaea0e779a65af4c1c","original_commit_id":"87344f39e84fff6a26c702eaea0e779a65af4c1c","user":{"login":"guegueng","id":10745028,"avatar_url":"https://avatars.githubusercontent.com/u/10745028?v=3","gravatar_id":"","url":"https://api.github.com/users/guegueng","html_url":"https://github.com/guegueng","followers_url":"https://api.github.com/users/guegueng/followers","following_url":"https://api.github.com/users/guegueng/following{/other_user}","gists_url":"https://api.github.com/users/guegueng/gists{/gist_id}","starred_url":"https://api.github.com/users/guegueng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guegueng/subscriptions","organizations_url":"https://api.github.com/users/guegueng/orgs","repos_url":"https://api.github.com/users/guegueng/repos","events_url":"https://api.github.com/users/guegueng/events{/privacy}","received_events_url":"https://api.github.com/users/guegueng/received_events","type":"User","site_admin":false},"body":"I saw that, but I wasn't sure if it was the same scenario. In the example, you are disregarding all \"point\" attributes. In this case I want to only reject those with the value \"isReferencedBy\" or \"references\"","created_at":"2015-06-26T14:14:46Z","updated_at":"2015-06-26T14:14:46Z","html_url":"https://github.com/dpla/heidrun-mappings/pull/16#discussion_r33359130","pull_request_url":"https://api.github.com/repos/dpla/heidrun-mappings/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/dpla/heidrun-mappings/pulls/comments/33359130"},"html":{"href":"https://github.com/dpla/heidrun-mappings/pull/16#discussion_r33359130"},"pull_request":{"href":"https://api.github.com/repos/dpla/heidrun-mappings/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/dpla/heidrun-mappings/pulls/16","id":38578862,"html_url":"https://github.com/dpla/heidrun-mappings/pull/16","diff_url":"https://github.com/dpla/heidrun-mappings/pull/16.diff","patch_url":"https://github.com/dpla/heidrun-mappings/pull/16.patch","issue_url":"https://api.github.com/repos/dpla/heidrun-mappings/issues/16","number":16,"state":"open","locked":false,"title":"first draft","user":{"login":"guegueng","id":10745028,"avatar_url":"https://avatars.githubusercontent.com/u/10745028?v=3","gravatar_id":"","url":"https://api.github.com/users/guegueng","html_url":"https://github.com/guegueng","followers_url":"https://api.github.com/users/guegueng/followers","following_url":"https://api.github.com/users/guegueng/following{/other_user}","gists_url":"https://api.github.com/users/guegueng/gists{/gist_id}","starred_url":"https://api.github.com/users/guegueng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guegueng/subscriptions","organizations_url":"https://api.github.com/users/guegueng/orgs","repos_url":"https://api.github.com/users/guegueng/repos","events_url":"https://api.github.com/users/guegueng/events{/privacy}","received_events_url":"https://api.github.com/users/guegueng/received_events","type":"User","site_admin":false},"body":"first draft of Tennessee mapping. several questions","created_at":"2015-06-25T18:38:13Z","updated_at":"2015-06-26T14:14:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cd92f532cf17b19229e59550aec76cc8c5c17644","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dpla/heidrun-mappings/pulls/16/commits","review_comments_url":"https://api.github.com/repos/dpla/heidrun-mappings/pulls/16/comments","review_comment_url":"https://api.github.com/repos/dpla/heidrun-mappings/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dpla/heidrun-mappings/issues/16/comments","statuses_url":"https://api.github.com/repos/dpla/heidrun-mappings/statuses/87344f39e84fff6a26c702eaea0e779a65af4c1c","head":{"label":"dpla:feature/TennMapping","ref":"feature/TennMapping","sha":"87344f39e84fff6a26c702eaea0e779a65af4c1c","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":31089468,"name":"heidrun-mappings","full_name":"dpla/heidrun-mappings","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/heidrun-mappings","description":"Metadata mappings for the DPLA Heidrun deployment","fork":false,"url":"https://api.github.com/repos/dpla/heidrun-mappings","forks_url":"https://api.github.com/repos/dpla/heidrun-mappings/forks","keys_url":"https://api.github.com/repos/dpla/heidrun-mappings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dpla/heidrun-mappings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dpla/heidrun-mappings/teams","hooks_url":"https://api.github.com/repos/dpla/heidrun-mappings/hooks","issue_events_url":"https://api.github.com/repos/dpla/heidrun-mappings/issues/events{/number}","events_url":"https://api.github.com/repos/dpla/heidrun-mappings/events","assignees_url":"https://api.github.com/repos/dpla/heidrun-mappings/assignees{/user}","branches_url":"https://api.github.com/repos/dpla/heidrun-mappings/branches{/branch}","tags_url":"https://api.github.com/repos/dpla/heidrun-mappings/tags","blobs_url":"https://api.github.com/repos/dpla/heidrun-mappings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dpla/heidrun-mappings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dpla/heidrun-mappings/git/refs{/sha}","trees_url":"https://api.github.com/repos/dpla/heidrun-mappings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dpla/heidrun-mappings/statuses/{sha}","languages_url":"https://api.github.com/repos/dpla/heidrun-mappings/languages","stargazers_url":"https://api.github.com/repos/dpla/heidrun-mappings/stargazers","contributors_url":"https://api.github.com/repos/dpla/heidrun-mappings/contributors","subscribers_url":"https://api.github.com/repos/dpla/heidrun-mappings/subscribers","subscription_url":"https://api.github.com/repos/dpla/heidrun-mappings/subscription","commits_url":"https://api.github.com/repos/dpla/heidrun-mappings/commits{/sha}","git_commits_url":"https://api.github.com/repos/dpla/heidrun-mappings/git/commits{/sha}","comments_url":"https://api.github.com/repos/dpla/heidrun-mappings/comments{/number}","issue_comment_url":"https://api.github.com/repos/dpla/heidrun-mappings/issues/comments{/number}","contents_url":"https://api.github.com/repos/dpla/heidrun-mappings/contents/{+path}","compare_url":"https://api.github.com/repos/dpla/heidrun-mappings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dpla/heidrun-mappings/merges","archive_url":"https://api.github.com/repos/dpla/heidrun-mappings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dpla/heidrun-mappings/downloads","issues_url":"https://api.github.com/repos/dpla/heidrun-mappings/issues{/number}","pulls_url":"https://api.github.com/repos/dpla/heidrun-mappings/pulls{/number}","milestones_url":"https://api.github.com/repos/dpla/heidrun-mappings/milestones{/number}","notifications_url":"https://api.github.com/repos/dpla/heidrun-mappings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dpla/heidrun-mappings/labels{/name}","releases_url":"https://api.github.com/repos/dpla/heidrun-mappings/releases{/id}","created_at":"2015-02-20T23:03:12Z","updated_at":"2015-04-15T22:04:20Z","pushed_at":"2015-06-25T18:38:13Z","git_url":"git://github.com/dpla/heidrun-mappings.git","ssh_url":"git@github.com:dpla/heidrun-mappings.git","clone_url":"https://github.com/dpla/heidrun-mappings.git","svn_url":"https://github.com/dpla/heidrun-mappings","homepage":"https://github.com/dpla/heidrun","size":444,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"dpla:master","ref":"master","sha":"4fd19163f15b91167f16abb77390c67f5a7fdabb","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":31089468,"name":"heidrun-mappings","full_name":"dpla/heidrun-mappings","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/heidrun-mappings","description":"Metadata mappings for the DPLA Heidrun deployment","fork":false,"url":"https://api.github.com/repos/dpla/heidrun-mappings","forks_url":"https://api.github.com/repos/dpla/heidrun-mappings/forks","keys_url":"https://api.github.com/repos/dpla/heidrun-mappings/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dpla/heidrun-mappings/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dpla/heidrun-mappings/teams","hooks_url":"https://api.github.com/repos/dpla/heidrun-mappings/hooks","issue_events_url":"https://api.github.com/repos/dpla/heidrun-mappings/issues/events{/number}","events_url":"https://api.github.com/repos/dpla/heidrun-mappings/events","assignees_url":"https://api.github.com/repos/dpla/heidrun-mappings/assignees{/user}","branches_url":"https://api.github.com/repos/dpla/heidrun-mappings/branches{/branch}","tags_url":"https://api.github.com/repos/dpla/heidrun-mappings/tags","blobs_url":"https://api.github.com/repos/dpla/heidrun-mappings/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dpla/heidrun-mappings/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dpla/heidrun-mappings/git/refs{/sha}","trees_url":"https://api.github.com/repos/dpla/heidrun-mappings/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dpla/heidrun-mappings/statuses/{sha}","languages_url":"https://api.github.com/repos/dpla/heidrun-mappings/languages","stargazers_url":"https://api.github.com/repos/dpla/heidrun-mappings/stargazers","contributors_url":"https://api.github.com/repos/dpla/heidrun-mappings/contributors","subscribers_url":"https://api.github.com/repos/dpla/heidrun-mappings/subscribers","subscription_url":"https://api.github.com/repos/dpla/heidrun-mappings/subscription","commits_url":"https://api.github.com/repos/dpla/heidrun-mappings/commits{/sha}","git_commits_url":"https://api.github.com/repos/dpla/heidrun-mappings/git/commits{/sha}","comments_url":"https://api.github.com/repos/dpla/heidrun-mappings/comments{/number}","issue_comment_url":"https://api.github.com/repos/dpla/heidrun-mappings/issues/comments{/number}","contents_url":"https://api.github.com/repos/dpla/heidrun-mappings/contents/{+path}","compare_url":"https://api.github.com/repos/dpla/heidrun-mappings/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dpla/heidrun-mappings/merges","archive_url":"https://api.github.com/repos/dpla/heidrun-mappings/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dpla/heidrun-mappings/downloads","issues_url":"https://api.github.com/repos/dpla/heidrun-mappings/issues{/number}","pulls_url":"https://api.github.com/repos/dpla/heidrun-mappings/pulls{/number}","milestones_url":"https://api.github.com/repos/dpla/heidrun-mappings/milestones{/number}","notifications_url":"https://api.github.com/repos/dpla/heidrun-mappings/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dpla/heidrun-mappings/labels{/name}","releases_url":"https://api.github.com/repos/dpla/heidrun-mappings/releases{/id}","created_at":"2015-02-20T23:03:12Z","updated_at":"2015-04-15T22:04:20Z","pushed_at":"2015-06-25T18:38:13Z","git_url":"git://github.com/dpla/heidrun-mappings.git","ssh_url":"git@github.com:dpla/heidrun-mappings.git","clone_url":"https://github.com/dpla/heidrun-mappings.git","svn_url":"https://github.com/dpla/heidrun-mappings","homepage":"https://github.com/dpla/heidrun","size":444,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dpla/heidrun-mappings/pulls/16"},"html":{"href":"https://github.com/dpla/heidrun-mappings/pull/16"},"issue":{"href":"https://api.github.com/repos/dpla/heidrun-mappings/issues/16"},"comments":{"href":"https://api.github.com/repos/dpla/heidrun-mappings/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/dpla/heidrun-mappings/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/dpla/heidrun-mappings/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dpla/heidrun-mappings/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/dpla/heidrun-mappings/statuses/87344f39e84fff6a26c702eaea0e779a65af4c1c"}}}}