Skip to content

Conversation

@eilmiv
Copy link
Contributor

@eilmiv eilmiv commented Nov 25, 2025

Summary of changes

  • Add ingestor for OAI-PMH endpoints that ingests materials and events based on Dublin Core metadata
  • Add ingestor for OAI-PMH endpoints that ingests materials and events based on Bioschemas RDF metadata

Motivation and context

This is a relevant step in the mTeSS-X project. In particular, it is MR11. See #1179.

Checklist

  • I have read and followed the CONTRIBUTING guide.
  • I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree
    to license it to the TeSS codebase under the
    BSD license.

doc = Nokogiri::XML(xml_string)

types = doc.xpath('//dc:type', ns).map(&:text)
if types.include?('http://purl.org/dc/dcmitype/Event')

Check failure

Code scanning / CodeQL

Incomplete URL substring sanitization High

'
http://purl.org/dc/dcmitype/Event
' can be anywhere in the URL, and arbitrary hosts may come before or after it.
material.date_modified = parsed_dates.last if parsed_dates.size > 1

identifiers = xml_doc.xpath('//dc:identifier', ns).map(&:text)
doi = identifiers.find { |id| id.start_with?('10.') || id.include?('doi.org') }

Check failure

Code scanning / CodeQL

Incomplete URL substring sanitization High

'
doi.org
' can be anywhere in the URL, and arbitrary hosts may come before or after it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant