@@ -15,24 +15,8 @@ def self.bioschemas_profile
1515 property :version , :version
1616 property :description , :description
1717 property :keywords , :keywords
18- property :author , -> ( material ) {
19- material . authors . map { |a |
20- author_hash = { "@type" => "Person" , "name" => a . display_name }
21- author_hash [ "givenName" ] = a . given_name if a . given_name . present?
22- author_hash [ "familyName" ] = a . family_name if a . family_name . present?
23- author_hash [ "@id" ] = "https://orcid.org/#{ a . orcid } " if a . orcid . present?
24- author_hash
25- }
26- }
27- property :contributor , -> ( material ) {
28- material . contributors . map { |c |
29- contributor_hash = { "@type" => "Person" , "name" => c . display_name }
30- contributor_hash [ "givenName" ] = c . given_name if c . given_name . present?
31- contributor_hash [ "familyName" ] = c . family_name if c . family_name . present?
32- contributor_hash [ "@id" ] = "https://orcid.org/#{ c . orcid } " if c . orcid . present?
33- contributor_hash
34- }
35- }
18+ property :author , -> ( material ) { people ( material . authors ) }
19+ property :contributor , -> ( material ) { people ( material . contributors ) }
3620 property :provider , -> ( material ) { provider ( material ) }
3721 property :audience , -> ( material ) {
3822 material . target_audience . map { |audience | { '@type' => 'Audience' , 'audienceType' => audience } }
0 commit comments