-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RDF support for orcid - FOAF profile #235
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, I just introduced a Maven build NPE in the unit test.. 5 mins! :) |
Implemented by adding org.orcid.api.common.writer.rdf.RDFMessageBodyWriter and modified org.orcid.api.common.OrcidApiService<T> to allow text/turtle and application/rdf-xml for viewBioDetailsRdf by simply translating the XML JAXB bean into RDF. Thus existing visibility checks etc. should work. No write support from RDF is planned as it could get tricky if the RDF contained additional statements that would have to be either thrown away or stored somewhere per ORCID. The implementations of OrcidApiService have been modified in both orcid-pub-web and orcid-api-web - TODO: Do we really need various methods like viewBioDetailsRdf and viewBioDetailsJson, or just change them to have multiple @produces ? The remaining REST services have not yet been RDFized, doing this for orcid-works requires some thoughts as to what existing vocabularies and terms should be used - for instance BIBO ontology or simply dcterms:bibliographicReferences etc. Example of RDF document: ``` c:\Users\stain>curl -H "Accept: text/turtle" http://localhost:8080/orcid-pub-web/0000-0002-0222-5559 @Prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @Prefix prov: <http://www.w3.org/ns/prov#> . @Prefix foaf: <http://xmlns.com/foaf/0.1/> . @Prefix pav: <http://purl.org/pav/> . @Prefix owl: <http://www.w3.org/2002/07/owl#> . @Prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @Prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . <http://localhost:8080/orcid-web/0000-0002-0222-5559/orcid-profile> a foaf:PersonalProfileDocument , foaf:OnlineAccount ; rdfs:label "0000-0002-0222-5559" ; pav:createdBy <http://localhost:8080/orcid-web/0000-0002-0222-5559> ; pav:createdOn "2013-05-24T16:14:43.885+01:00"^^xsd:dateTime ; pav:createdWith <http://orcid.org> ; pav:lastUpdateOn "2013-05-25T20:32:37.295+01:00"^^xsd:dateTime ; prov:generatedAtTime "2013-05-25T20:32:37.295+01:00"^^xsd:dateTime ; prov:wasAttributedTo <http://localhost:8080/orcid-web/0000-0002-0222-5559> ; foaf:accountName "0000-0002-0222-5559" ; foaf:accountServiceHomepage <http://orcid.org> ; foaf:maker <http://localhost:8080/orcid-web/0000-0002-0222-5559> ; foaf:primaryTopic <http://localhost:8080/orcid-web/0000-0002-0222-5559> . <http://localhost:8080/orcid-web/0000-0002-0222-5559> a foaf:Person , prov:Person ; rdfs:label "Johnnye Does" ; foaf:account <http://localhost:8080/orcid-web/0000-0002-0222-5559/orcid-profile> ; foaf:familyName "Doe" ; foaf:givenName "John" ; foaf:mbox <mailto:oldemail@example.com> , <mailto:otheremail@example.com> , <mailto:johndoe@example.com> ; foaf:name "Johnnye Does" ; foaf:page <http://homepage.example.com/> , <http://work.example.org/> ; foaf:plan """I am a very interesting person with several lines of biography""" ; foaf:publications <http://localhost:8080/orcid-pub-web/0000-0002-0222-5559/orcid-works> . ``` This corresponds to the XML: ``` c:\Users\stain>curl -H "Accept: application/xml" http://localhost:8080/orcid-pub-web/0000-0002-0222-5559 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <orcid-message xmlns="http://www.orcid.org/ns/orcid"> <message-version>1.0.14</message-version> <orcid-profile type="user"> <orcid>0000-0002-0222-5559</orcid> <orcid-id>http://localhost:8080/orcid-web/0000-0002-0222-5559</orcid-id> <orcid-history> <creation-method>website</creation-method> <submission-date>2013-05-24T16:14:43.885+01:00</submission-date> <last-modified-date>2013-05-25T20:32:37.295+01:00</last-modified-date> <claimed>true</claimed> </orcid-history> <orcid-bio> <personal-details> <given-names>John</given-names> <family-name>Doe</family-name> <credit-name>Johnnye Does</credit-name> <other-names> <other-name>Old Johnny</other-name> </other-names> </personal-details> <biography>I am a very interesting person
 with several lines
 of biography</biography> <researcher-urls> <researcher-url> <url-name></url-name> <url>http://homepage.example.com/</url> </researcher-url> <researcher-url> <url-name>Other</url-name> <url>http://work.example.org/</url> </researcher-url> </researcher-urls> <contact-details> <email primary="false" current="true" verified="false" source="0000-0002-0222-5559">otheremail@example.com</email> <email primary="false" current="true" verified="false" source="0000-0002-0222-5559">oldemail@example.com</email> <email primary="true" current="true" verified="false">johndoe@example.com</email> </contact-details> <keywords> <keyword>some keywords, entered, here</keyword> </keywords> <affiliations/> </orcid-bio> </orcid-profile> </orcid-message> orcid.org/0000-0001-9842-9718 ``` RDF notes ========= Vocabularies: * foaf: http://xmlns.com/foaf/0.1/ * pav: http://purl.org/pav/ * prov: http://www.w3.org/ns/prov# An ORCID (e.g. <http://orcid.org/0000-0001-9842-9718> ) is presented as a [http://xmlns.com/foaf/spec/#term_Person](foaf:Person), with foaf:givenName, foaf:familyName, foaf:mbox, etc. The ORCID identifier represents the person (and not his record) and can be used directly in Linked Data for attribution and provenance. The ORCID record is identified as <http://orcid.org/0000-0001-9842-9718/orcid-profile> - in the REST interface both of these URIs return the same RDF (and XML), but the distinction is that the second identifies the ORCID record at orcid.org. Thus creation date of the record, [purl.org/pav/html#http://purl.org/pav/createdOn](pav:createdOn), is when the user registered on ORCID (the submission-date in XML), and if the record was created on the website, then the person is also listed as the pav:createdBy, foaf:maker and prov:wasAttributedTo. If the ORCID has been claimed, then this will be a foaf:PersonalProfileDocument - this is only the case if the user has actually claimed (and presumably curated) the ORCID record, even if it was imported through the API. See https://github.com/stain/ORCID-Source/tree/rdf for individual commits. Squashed commit of the following: commit 20795bc Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Tue May 28 14:14:46 2013 +0100 RDF: Ignore uriinfo if null (for unit test) commit 9f3c198 Merge: 1c8c576 e001319 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Tue May 28 14:08:09 2013 +0100 Merge branch 'dev-rdf' into rdf commit e001319 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Tue May 28 13:49:08 2013 +0100 RDF support for orcid - FOAF profile presents a simple FOAF profile for REST requests. Implemented by adding org.orcid.api.common.writer.rdf.RDFMessageBodyWriter and modified org.orcid.api.common.OrcidApiService<T> to allow text/turtle and application/rdf-xml for viewBioDetailsRdf by simply translating the XML JAXB bean into RDF. Thus existing visibility checks etc. should work. No write support from RDF is planned as it could get tricky if the RDF contained additional statements that would have to be either thrown away or stored somewhere per ORCID. The implementations of OrcidApiService have been modified in both orcid-pub-web and orcid-api-web - TODO: Do we really need various methods like viewBioDetailsRdf and viewBioDetailsJson, or just change them to have multiple @produces ? The remaining REST services have not yet been RDFized, doing this for orcid-works requires some thoughts as to what existing vocabularies and terms should be used - for instance BIBO ontology or simply dcterms:bibliographicReferences etc. Example of RDF document: c:\Users\stain>curl -H "Accept: text/turtle" http://localhost:8080/orcid-pub-web/0000-0002-0222-5559 @Prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @Prefix prov: <http://www.w3.org/ns/prov#> . @Prefix foaf: <http://xmlns.com/foaf/0.1/> . @Prefix pav: <http://purl.org/pav/> . @Prefix owl: <http://www.w3.org/2002/07/owl#> . @Prefix xsd: <http://www.w3.org/2001/XMLSchema#> . @Prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . <http://localhost:8080/orcid-web/0000-0002-0222-5559/orcid-profile> a foaf:PersonalProfileDocument , foaf:OnlineAccount ; rdfs:label "0000-0002-0222-5559" ; pav:createdBy <http://localhost:8080/orcid-web/0000-0002-0222-5559> ; pav:createdOn "2013-05-24T16:14:43.885+01:00"^^xsd:dateTime ; pav:createdWith <http://orcid.org> ; pav:lastUpdateOn "2013-05-25T20:32:37.295+01:00"^^xsd:dateTime ; prov:generatedAtTime "2013-05-25T20:32:37.295+01:00"^^xsd:dateTime ; prov:wasAttributedTo <http://localhost:8080/orcid-web/0000-0002-0222-5559> ; foaf:accountName "0000-0002-0222-5559" ; foaf:accountServiceHomepage <http://orcid.org> ; foaf:maker <http://localhost:8080/orcid-web/0000-0002-0222-5559> ; foaf:primaryTopic <http://localhost:8080/orcid-web/0000-0002-0222-5559> . <http://localhost:8080/orcid-web/0000-0002-0222-5559> a foaf:Person , prov:Person ; rdfs:label "Johnnye Does" ; foaf:account <http://localhost:8080/orcid-web/0000-0002-0222-5559/orcid-profile> ; foaf:familyName "Doe" ; foaf:givenName "John" ; foaf:mbox <mailto:oldemail@example.com> , <mailto:otheremail@example.com> , <mailto:johndoe@example.com> ; foaf:name "Johnnye Does" ; foaf:page <http://homepage.example.com/> , <http://work.example.org/> ; foaf:plan """I am a very interesting person with several lines of biography""" ; foaf:publications <http://localhost:8080/orcid-pub-web/0000-0002-0222-5559/orcid-works> . This corresponds to the XML: c:\Users\stain>curl -H "Accept: application/xml" http://localhost:8080/orcid-pub-web/0000-0002-0222-5559 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <orcid-message xmlns="http://www.orcid.org/ns/orcid"> <message-version>1.0.14</message-version> <orcid-profile type="user"> <orcid>0000-0002-0222-5559</orcid> <orcid-id>http://localhost:8080/orcid-web/0000-0002-0222-5559</orcid-id> <orcid-history> <creation-method>website</creation-method> <submission-date>2013-05-24T16:14:43.885+01:00</submission-date> <last-modified-date>2013-05-25T20:32:37.295+01:00</last-modified-date> <claimed>true</claimed> </orcid-history> <orcid-bio> <personal-details> <given-names>John</given-names> <family-name>Doe</family-name> <credit-name>Johnnye Does</credit-name> <other-names> <other-name>Old Johnny</other-name> </other-names> </personal-details> <biography>I am a very interesting person
 with several lines
 of biography</biography> <researcher-urls> <researcher-url> <url-name></url-name> <url>http://homepage.example.com/</url> </researcher-url> <researcher-url> <url-name>Other</url-name> <url>http://work.example.org/</url> </researcher-url> </researcher-urls> <contact-details> <email primary="false" current="true" verified="false" source="0000-0002-0222-5559">otheremail@example.com</email> <email primary="false" current="true" verified="false" source="0000-0002-0222-5559">oldemail@example.com</email> <email primary="true" current="true" verified="false">johndoe@example.com</email> </contact-details> <keywords> <keyword>some keywords, entered, here</keyword> </keywords> <affiliations/> </orcid-bio> </orcid-profile> </orcid-message> orcid.org/0000-0001-9842-9718 RDF notes ========= Vocabularies: * foaf: http://xmlns.com/foaf/0.1/ * pav: http://purl.org/pav/ * prov: http://www.w3.org/ns/prov# An ORCID (e.g. <http://orcid.org/0000-0001-9842-9718> ) is presented as a [http://xmlns.com/foaf/spec/#term_Person](foaf:Person), with foaf:givenName, foaf:familyName, foaf:mbox, etc. The ORCID identifier represents the person (and not his record) and can be used directly in Linked Data for attribution and provenance. The ORCID record is identified as <http://orcid.org/0000-0001-9842-9718/orcid-profile> - in the REST interface both of these URIs return the same RDF (and XML), but the distinction is that the second identifies the ORCID record at orcid.org. Thus creation date of the record, [purl.org/pav/html#http://purl.org/pav/createdOn](pav:createdOn), is when the user registered on ORCID (the submission-date in XML), and if the record was created on the website, then the person is also listed as the pav:createdBy, foaf:maker and prov:wasAttributedTo. If the ORCID has been claimed, then this will be a foaf:PersonalProfileDocument - this is only the case if the user has actually claimed (and presumably curated) the ORCID record, even if it was imported through the API. See https://github.com/stain/ORCID-Source/tree/rdf for individual commits. Squashed commit of the following: commit 1c8c576 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Tue May 28 13:48:04 2013 +0100 RDF: dates for ORCID record modifications commit 1a89cbb Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Tue May 28 12:41:38 2013 +0100 provenance of ORCID account (when was it last modified?) commit ed2db40 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Tue May 28 11:04:18 2013 +0100 RDF: publication link to XML repr rather than HTML commit 1a91ed5 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Tue May 28 11:02:06 2013 +0100 RDF: Error representation (with relative URI). Publications. commit 8744ea9 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Sun May 26 11:37:34 2013 +0100 load pav and prov ontologies for provenance commit 06057ab Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Sat May 25 20:35:13 2013 +0100 Refactored methods per section of XML bean commit 22c405d Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 17:57:40 2013 +0100 orcid as foaf account commit 490760f Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 17:02:58 2013 +0100 Don't forget foaf:Person! commit b6f91eb Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 17:00:53 2013 +0100 Load FOAF separately and add as import (avoids printing all of foaf!) commit cbfd2fc Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 16:47:29 2013 +0100 Tests for RDFMessageBodyWriter commit db9db1a Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 16:47:11 2013 +0100 FOAF ontology Downloaded from http://xmlns.com/foaf/0.1/ as application/rdf+xml commit 4bab8c0 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 16:46:43 2013 +0100 Media Type done correctly commit 01bd125 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 16:26:03 2013 +0100 Removed orcid-api-rdf dependency commit 226c9d6 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 16:24:49 2013 +0100 Remove silly debug exception :) commit d08fac9 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 16:24:29 2013 +0100 Moved RDFMessageBody to orcid-api-common commit 6373e21 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 14:02:34 2013 +0100 RDF: Charset versions of text/turtle and text/n3 separate commit 3c52239 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 14:02:06 2013 +0100 Load FOAF locally, and only once commit f13be2f Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 10:37:40 2013 +0100 Include basedir and relativePath commit 228a7ac Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 22:15:57 2013 +0100 Turtle support? commit a606551 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 22:11:13 2013 +0100 Moved RDF writer to orcid-api-rdf so it can be maintained more loosely commit 558a1d7 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 21:49:35 2013 +0100 get URL for orcID not orcIDID commit 3fa8e0e Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 21:46:47 2013 +0100 nullchecks commit 3691fa3 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 21:30:42 2013 +0100 Moved RDF transformation to RDFMessageBodyWriter commit 7201062 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 20:21:51 2013 +0100 Jena-based RDF wrapper commit b5faeea Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 19:32:34 2013 +0100 Clone of HTML Writer commit 695b55d Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 19:32:20 2013 +0100 Ignore RDF test for now, so build passest commit 682ea05 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 19:31:54 2013 +0100 Temporarily Break HTML Writer - is it used? :) commit aee1721 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Wed May 22 11:26:51 2013 +0100 RDF: Test for RDF/XML entity commit cf1fc19 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Wed May 22 10:22:40 2013 +0100 RDF: Remove unused methods in RDFTest commit 115d4c3 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Wed May 22 10:17:50 2013 +0100 RDF: Skeleton viewBioDetailsRdf and viewBioDetailsTurtle commit 63673c8 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Wed May 22 10:03:00 2013 +0100 Clone T1OrcidApiServiceImplMetricsTest to test RDF commit 1c8c576 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Tue May 28 13:48:04 2013 +0100 RDF: dates for ORCID record modifications commit 1a89cbb Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Tue May 28 12:41:38 2013 +0100 provenance of ORCID account (when was it last modified?) commit ed2db40 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Tue May 28 11:04:18 2013 +0100 RDF: publication link to XML repr rather than HTML commit 1a91ed5 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Tue May 28 11:02:06 2013 +0100 RDF: Error representation (with relative URI). Publications. commit 8744ea9 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Sun May 26 11:37:34 2013 +0100 load pav and prov ontologies for provenance commit 06057ab Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Sat May 25 20:35:13 2013 +0100 Refactored methods per section of XML bean commit 22c405d Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 17:57:40 2013 +0100 orcid as foaf account commit 490760f Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 17:02:58 2013 +0100 Don't forget foaf:Person! commit b6f91eb Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 17:00:53 2013 +0100 Load FOAF separately and add as import (avoids printing all of foaf!) commit cbfd2fc Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 16:47:29 2013 +0100 Tests for RDFMessageBodyWriter commit db9db1a Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 16:47:11 2013 +0100 FOAF ontology Downloaded from http://xmlns.com/foaf/0.1/ as application/rdf+xml commit 4bab8c0 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 16:46:43 2013 +0100 Media Type done correctly commit 01bd125 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 16:26:03 2013 +0100 Removed orcid-api-rdf dependency commit 226c9d6 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 16:24:49 2013 +0100 Remove silly debug exception :) commit d08fac9 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 16:24:29 2013 +0100 Moved RDFMessageBody to orcid-api-common commit 6373e21 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 14:02:34 2013 +0100 RDF: Charset versions of text/turtle and text/n3 separate commit 3c52239 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 14:02:06 2013 +0100 Load FOAF locally, and only once commit f13be2f Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Fri May 24 10:37:40 2013 +0100 Include basedir and relativePath commit 228a7ac Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 22:15:57 2013 +0100 Turtle support? commit a606551 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 22:11:13 2013 +0100 Moved RDF writer to orcid-api-rdf so it can be maintained more loosely commit 558a1d7 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 21:49:35 2013 +0100 get URL for orcID not orcIDID commit 3fa8e0e Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 21:46:47 2013 +0100 nullchecks commit 3691fa3 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 21:30:42 2013 +0100 Moved RDF transformation to RDFMessageBodyWriter commit 7201062 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 20:21:51 2013 +0100 Jena-based RDF wrapper commit b5faeea Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 19:32:34 2013 +0100 Clone of HTML Writer commit 695b55d Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 19:32:20 2013 +0100 Ignore RDF test for now, so build passest commit 682ea05 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Thu May 23 19:31:54 2013 +0100 Temporarily Break HTML Writer - is it used? :) commit aee1721 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Wed May 22 11:26:51 2013 +0100 RDF: Test for RDF/XML entity commit cf1fc19 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Wed May 22 10:22:40 2013 +0100 RDF: Remove unused methods in RDFTest commit 115d4c3 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Wed May 22 10:17:50 2013 +0100 RDF: Skeleton viewBioDetailsRdf and viewBioDetailsTurtle commit 63673c8 Author: Stian Soiland-Reyes <stian@soiland-reyes.com> Date: Wed May 22 10:03:00 2013 +0100 Clone T1OrcidApiServiceImplMetricsTest to test RDF
Ready to go! :) |
rcpeters
added a commit
that referenced
this pull request
Jun 6, 2013
RDF support for orcid - FOAF profile
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
presents a simple FOAF profile for REST requests. Implemented by adding
org.orcid.api.common.writer.rdf.RDFMessageBodyWriter
and modified org.orcid.api.common.OrcidApiService
to allow text/turtle and application/rdf-xml for viewBioDetailsRdf
by simply translating the XML JAXB bean into RDF. Thus existing
visibility checks etc. should work.
No write support from RDF is planned as it could get tricky if the RDF
contained additional statements that would have to be either thrown away
or stored somewhere per ORCID.
The implementations of OrcidApiService have been modified in both
orcid-pub-web and orcid-api-web -
TODO: Do we really need various methods like viewBioDetailsRdf and
viewBioDetailsJson, or just change them to have multiple @produces ?
The remaining REST services have not yet been RDFized, doing this for
orcid-works requires some thoughts as to what existing vocabularies
and terms should be used - for instance BIBO ontology or simply
dcterms:bibliographicReferences etc.
Example of RDF document:
This corresponds to the XML:
RDF notes
Vocabularies:
An ORCID (e.g. http://orcid.org/0000-0001-9842-9718 ) is presented as a
http://xmlns.com/foaf/spec/#term_Person, with
foaf:givenName, foaf:familyName, foaf:mbox, etc.
The ORCID identifier represents the person (and not his record) and
can be used directly in Linked Data for attribution and provenance.
The ORCID record is identified as
http://orcid.org/0000-0001-9842-9718/orcid-profile - in the REST
interface both of these URIs return the same RDF (and XML), but the
distinction is that the second identifies the ORCID record at orcid.org.
Thus creation date of the record,
purl.org/pav/html#http://purl.org/pav/createdOn, is when
the user registered on ORCID (the submission-date in XML), and if the
record was created on the website, then the person is also listed as the
pav:createdBy, foaf:maker and prov:wasAttributedTo.
If the ORCID has been claimed, then this will be a
foaf:PersonalProfileDocument - this is only the case if the user has
actually claimed (and presumably curated) the ORCID record, even if it
was imported through the API.
See https://github.com/stain/ORCID-Source/tree/rdf for individual
commits.
Squashed commit of the following:
commit 1c8c576
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Tue May 28 13:48:04 2013 +0100
commit 1a89cbb
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Tue May 28 12:41:38 2013 +0100
commit ed2db40
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Tue May 28 11:04:18 2013 +0100
commit 1a91ed5
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Tue May 28 11:02:06 2013 +0100
commit 8744ea9
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Sun May 26 11:37:34 2013 +0100
commit 06057ab
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Sat May 25 20:35:13 2013 +0100
commit 22c405d
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Fri May 24 17:57:40 2013 +0100
commit 490760f
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Fri May 24 17:02:58 2013 +0100
commit b6f91eb
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Fri May 24 17:00:53 2013 +0100
commit cbfd2fc
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Fri May 24 16:47:29 2013 +0100
commit db9db1a
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Fri May 24 16:47:11 2013 +0100
commit 4bab8c0
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Fri May 24 16:46:43 2013 +0100
commit 01bd125
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Fri May 24 16:26:03 2013 +0100
commit 226c9d6
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Fri May 24 16:24:49 2013 +0100
commit d08fac9
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Fri May 24 16:24:29 2013 +0100
commit 6373e21
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Fri May 24 14:02:34 2013 +0100
commit 3c52239
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Fri May 24 14:02:06 2013 +0100
commit f13be2f
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Fri May 24 10:37:40 2013 +0100
commit 228a7ac
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Thu May 23 22:15:57 2013 +0100
commit a606551
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Thu May 23 22:11:13 2013 +0100
commit 558a1d7
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Thu May 23 21:49:35 2013 +0100
commit 3fa8e0e
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Thu May 23 21:46:47 2013 +0100
commit 3691fa3
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Thu May 23 21:30:42 2013 +0100
commit 7201062
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Thu May 23 20:21:51 2013 +0100
commit b5faeea
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Thu May 23 19:32:34 2013 +0100
commit 695b55d
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Thu May 23 19:32:20 2013 +0100
commit 682ea05
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Thu May 23 19:31:54 2013 +0100
commit aee1721
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Wed May 22 11:26:51 2013 +0100
commit cf1fc19
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Wed May 22 10:22:40 2013 +0100
commit 115d4c3
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Wed May 22 10:17:50 2013 +0100
commit 63673c8
Author: Stian Soiland-Reyes stian@soiland-reyes.com
Date: Wed May 22 10:03:00 2013 +0100