Skip to content

feat: additional MIME type mappings#2

Open
redmer wants to merge 5 commits intoFnOio:developmentfrom
redmer:patch-1
Open

feat: additional MIME type mappings#2
redmer wants to merge 5 commits intoFnOio:developmentfrom
redmer:patch-1

Conversation

@redmer
Copy link

@redmer redmer commented Mar 16, 2026

This PR adds a bunch of mimetypes from the Python stdlib list of mimetypes so more mimetypes would be recognized.

I'm using RMLMapper to map from our digital asset management system to RDF. It contains loads of PDF's, images, office documents and so on. I'm using idlabfn:getMIMEType to map it, but that recognizes only a small list of mimetypes. IDLabFunctions.java#L205-L225

# sample from sourcemapping.rml.yaml
      # Mimetype
      - predicate: sdo:encodingFormat
        object:
          type: literal
          function: idlabfn:getMIMEType
          parameters:
            - parameter: idlabfn:str
              value: "$(filename)"

Notes:

  • I'm not versed enough in Java to know if there's a way to make this list a once-generated static member.
  • Though quite trivial, I thought I should mention the CPython license here.

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