Comments (2)
The goal here should be to never discard regardless if url or not.
I think the proposal of using something like how name_identifiers works makes sense to me.
from bolognese.
I was able to reproduce this bug locally with following steps.
This works
- From this fixture file remove
schemeURI
attribute and keepaffiliationIdentifier
with URL
After processing this XML file at bolognese/spec/author_utils_spec.rb:163
. We will see that creators with affiliation
will have affiliationIdentifier
in the response after processing this metadata.
(byebug) subject.creators[0]
{"nameType"=>"Personal", "name"=>"Robinson, Erin", "givenName"=>"Erin", "familyName"=>"Robinson", "nameIdentifiers"=>[{"schemeUri"=>"https://orcid.org", "nameIdentifierScheme"=>"ORCID"}], "affiliation"=>[{"name"=>"Metadata Game Changers", "affiliationIdentifier"=>"https://ror.org/05bp8ka05", "affiliationIdentifierScheme"=>"ROR"}]}
This won't work
- From this fixture file remove
schemeURI
attribute and keepaffiliationIdentifier
without URL like below,
<creator>
<creatorName nameType="Personal">Erin Robinson</creatorName>
<nameIdentifier schemeURI="https://orcid.org/" nameIdentifierScheme="ORCID"> https://orcid.org/0000-0001-9998-0114 </nameIdentifier>
<affiliation affiliationIdentifier="05bp8ka05" affiliationIdentifierScheme="ROR"> Metadata Game Changers </affiliation>
</creator>
Now in the test file add byebug
bolognese/spec/author_utils_spec.rb:163
and check subject after processing the schema. we will see affiliation
attribute in the response does not have affiliationIdentifier
.
(byebug) subject.creators[0]
{"nameType"=>"Personal", "name"=>"Robinson, Erin", "givenName"=>"Erin", "familyName"=>"Robinson", "nameIdentifiers"=>[{"schemeUri"=>"https://orcid.org", "nameIdentifierScheme"=>"ORCID"}], "affiliation"=>[{"name"=>"Metadata Game Changers", "affiliationIdentifierScheme"=>"ROR"}]}
from bolognese.
Related Issues (20)
- Including a schemeURI with a nameIdentifier that is a URL will concatenate the schemeURI and the nameIdentifier HOT 1
- Some funderIdentifiers are not indexed in ElasticSearch HOT 2
- Related Items error out if RelatedItemIdentifier is nil
- Fix related items handling to not include elements when they are blank
- Upgrade bolognese Github Actions
- Attributes on DC XML relatedItem properties appear as hashes in DC JSON
- bolognese Metadata objects produce errors when generating geoLocationPolygon DataCite XML
- Upgrading the gem gives error undefined abstract_description method for DataciteDoi
- TypeError: String does not have #dig method
- TypeError: no implicit conversion of String into Integer
- Schema 4.5 - Bolognese DC JSON incompatibility HOT 1
- Schema 4.5 - Revert Bolognese DC incompatibility fix HOT 1
- json-canonicalization 0.3.2 is removed from rubygems repo
- A blank `nameIdentifier` property in DataCite XML causes errors when reading HOT 1
- NoMethodError: undefined method `strip' for nil:NilClass
- Citations may render the `container_title` as a hash in citations for DOIs with citeproc type `article-journal`
- nameIdentifier ORCID identifiers ending with a `/` are not rendered in JSON when converting from XML
- Update the required ruby version in the gemspec
- Upgrade nokogiri
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bolognese.