Feature/orcid push#4125
Conversation
| occ.getSetting(OrcidClientContext.Setting.WEBAPP_BASE_URL) + | ||
| occ.getSetting(OrcidClientContext.Setting.CALLBACK_PATH); | ||
|
|
||
| String authUrl = "https://sandbox.orcid.org/oauth/authorize" + |
There was a problem hiding this comment.
Left by mistake, fixed it now 😄
|
|
||
| if (converterClass == null) { | ||
| return null; // should never happen | ||
| } |
There was a problem hiding this comment.
Do we need this level of generalization here? Can we just introduce OrcidObjectConverter interface which will be implemented by EducationConverter, WorkConverter, etc with toOrcidModel method instead? Is this approach applied at some other parts of VIVO/Vitro which you just adopted?
| public static String FIND_ALL_EDUCATION = | ||
| "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" + | ||
| "PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n" + | ||
| "PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n" + | ||
| "PREFIX owl: <http://www.w3.org/2002/07/owl#>\n" + | ||
| "PREFIX vitro: <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#>\n" + | ||
| "PREFIX foaf: <http://xmlns.com/foaf/0.1/>\n" + | ||
| "PREFIX obo: <http://purl.obolibrary.org/obo/>\n" + | ||
| "PREFIX vivo: <http://vivoweb.org/ontology/core#>\n" + | ||
| "PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>\n" + | ||
| "PREFIX bibo: <http://purl.org/ontology/bibo/>\n" + |
There was a problem hiding this comment.
Should we consider moving those SPARQL queries to n3 files, to make it configurable without changing java code, building, deploying, etc? Might be that some institutions would like to add some filters, additional criteria.
|
|
||
| :vitrodocumentModifier_organizations_filter | ||
| a <java:edu.cornell.mannlib.vitro.webapp.searchindex.documentBuilding.SelectQueryDocumentModifier> , | ||
| a <java:edu.cornell.mannlib.vitro.webapp.searchindex.documentBuilding.SelectQueryI18nDocumentModifier> , |
There was a problem hiding this comment.
This file changes are part of this task (pushing data into ORCID)?
There was a problem hiding this comment.
It wasn't, my mistake, I removed it from PR. Thanks for noticing!
| vitro-search:facetResults true ; | ||
| vitro-search:filterField :field_organizations ; | ||
| vitro-search:id "organizations" ; | ||
| vitro-search:isUriValues true ; |
There was a problem hiding this comment.
This file changes are part of this task (pushing data into ORCID)?
There was a problem hiding this comment.
Same as above, removed from PR.
| @@ -0,0 +1,26 @@ | |||
| { | |||
| "Book": "book", | |||
There was a problem hiding this comment.
@ivanmrsulja can you use here the full URI as a key? This short key might introduce some issues in some cases.
| WHERE { | ||
| <%s> vivo:relatedBy ?authorship . | ||
| ?authorship vivo:relates ?resource . | ||
| ?resource <http://vitro.mannlib.cornell.edu/ns/vitro/0.7#mostSpecificType> ?workType . |
There was a problem hiding this comment.
@ivanmrsulja instead of mostSpecificType to use rdf:type?
There was a problem hiding this comment.
@ivanmrsulja without using rdf:type subclasses wouldn't have proper orcid types. So rdf:type should be used.
…n fetching data for export.
…ployments to bind intermediate representation. Added DTO classes.
…according to feedback.
3781c5d to
9f263af
Compare
|
|
||
| OPTIONAL { | ||
| ?resource vivo:dateTimeValue ?dtValue . | ||
| ?dtValue vivo:dateTime ?publicationDate . |
There was a problem hiding this comment.
Date time precision should be taken into account
| } | ||
| } | ||
|
|
||
| FILTER (STR(?resource) > "%s") |
There was a problem hiding this comment.
I suggest to get the instances to be pushed in the first run and collect information for data export in another run. In current state SPARQL queries look complicated and not efficient.
|
|
||
| private static Map<String, String> loadWorkTypeMappings() { | ||
| try (InputStream is = WorkConverter.class | ||
| .getClassLoader() |
There was a problem hiding this comment.
I suggest to move type mapping inside sparql query.
| } | ||
|
|
||
| @Nullable | ||
| private Class<?> getConverterClass(ExportSet exportSet) { |
There was a problem hiding this comment.
I would suggest to avoid using reflection api. It creates more safety issues and complicates the code, so it should be avoided, especially for new code.
|
@ivanmrsulja I tried to test export for person positions, but it didn't work for me for some reason. Could you extend test instructions on what data should be entered for testing pushing different types of data? |
I believe required fields are specified here - https://info.orcid.org/documentation/integration-guide/admin-guide-to-affiliations/#Required It means affiliation should be linked with Organisation which is described with name, city, country and rorId. |
Issues: #4074, #4075
linked Vitro PR: 504
What does this pull request do?
Integrates ORCID push workflow using Member API credentials.
What's new?
How should this be tested?
Configure VIVO ORCID credentials in
runtime.propertiesfile (Ask @chenejac for sandbox credentials). Navigate to researcher profile when logged in as researcher (you can bind researcher account to any person entity). Click onAllow ORCID pushand complete the OAuth2 workflow (keep in mind that you will have to create ORCID Sandbox account beforehand, your regular ORCID account won't work). After this, periodic dissemination of research information should be performed to your ORCID profile.Interested parties
@chenejac
Reviewers' expertise
Please add any new expertise in the list which might be needed for reviewing your PR or remove any of the listed if it is not needed.
Candidates for reviewing this PR should have some of the following expertises: