-
Notifications
You must be signed in to change notification settings - Fork 1
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
pkp/pkp-lib#7135 Multiple author affiliations #1
Conversation
d079b9d
to
8065a61
Compare
Hi @asmecher. Can you please review this PR. |
GrobidMetadataExtractorPlugin.php
Outdated
@@ -106,7 +107,9 @@ function editSubmissionFile(string $hookName, array $args) : bool | |||
$author->setData('email', ''); | |||
$author->setData('givenName', $xpath->query('tei:persName/tei:forename[@type="first"]', $authorNode)->item(0)->nodeValue, $primaryLocale); | |||
$author->setData('familyName', $xpath->query('tei:persName/tei:surname', $authorNode)->item(0)->nodeValue, $primaryLocale); | |||
$author->setData('affiliation', $xpath->query('tei:affiliation/tei:orgName', $authorNode)->item(0)->nodeValue, $primaryLocale); | |||
$affiliation = new Affiliation(); | |||
$affiliation->setName($xpath->query('tei:affiliation/tei:orgName', $authorNode)->item(0)->nodeValue, $primaryLocale); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we like to look for RORs here? Similar to here: https://github.com/bozana/pkp-lib/blob/7135/plugins/importexport/native/filter/NativeXmlPKPAuthorFilter.php#L117-L129.
I.e. something like:
$name = $xpath->query('tei:affiliation/tei:orgName', $authorNode)->item(0)->nodeValue;
$affiliation->setName($name, $primaryLocale);
$ror = Repo::ror()->getCollector()->filterByName($name)->getMany()->first();
if ($ror) {
$affiliation->setRor($ror->getRor());
$affiliation->setName(null);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objections -- but this is just an experimental plugin at the moment, so consider it generally subject to review/improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @GaziYucel, this is fine with me -- but feel free to address @bozana's comment, or not. Up to you.
8065a61
to
7911432
Compare
I have pushed a new version, including Bozana's recommendation. Thanks both. |
only this PR left to be merged... |
Merged -- thanks, @GaziYucel and @bozana! |
Related issues:
Pull requests: