Skip to content
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

Enable downloading a vocabulary in MARC #734

Closed
kouralex opened this issue Mar 9, 2018 · 4 comments
Closed

Enable downloading a vocabulary in MARC #734

kouralex opened this issue Mar 9, 2018 · 4 comments
Assignees
Milestone

Comments

@kouralex
Copy link
Contributor

kouralex commented Mar 9, 2018

As @osma pointed out in #733 (comment), the REST API and related Skosmos code should be aware of .mrc and .mrcx file types configured via void:dataDumps in vocabulary.ttl to be able to serve vocabularies in those downloading formats.

@kouralex kouralex added this to the Next Tasks milestone Mar 9, 2018
@osma osma modified the milestones: Next Tasks, 2.2 Oct 31, 2018
@osma
Copy link
Member

osma commented May 21, 2019

So the idea would be that in config.ttl there can be a setting like this:

        void:dataDump <http://dev.finto.fi/download/yso/yso.mrcx> ;

Changes needed in the Skosmos codebase to support this:

  1. VocabularyConfig.getDataURLs() should be changed so that it recognizes the .mrcx extension and returns the correct MIME type (application/marcxml+xml). There should be a unit test that checks this. However, this can be considered optional, as the current code already understand a dct:format property, we could simply use that in the configuration files.
  2. HTML template code for the download link should be added to the download-links section in the template vocab-shared.twig.
  3. Translations should be added for the new string(s) used in the template.

@jarmosaarikko
Copy link

jarmosaarikko commented May 21, 2019

How would you produce the two languages in separate files, i.e. yso-fi.mrcx AND yso-sv.mrcx? Would it be as simple as adding two separate void dataDump rows and then vocab-shared.twig so that from each language homepage you would get a different file?

@osma
Copy link
Member

osma commented May 21, 2019

@jarmosaarikko Good point. I think Skosmos needs to know the language of each of those mrcx files - and parsing it from the file name is not good. It already understands a dct:format property on the dump URL; we could add support for dct:language as well. So the configuration file would look like this:

:yso
[...]
    void:dataDump <http://dev.finto.fi/download/yso/yso-fi.mrcx>,
        <http://dev.finto.fi/download/yso/yso-sv.mrcx> .

<http://dev.finto.fi/download/yso/yso-fi.mrcx>
    dct:format "application/marcxml+xml";
    dct:language "fi" .

<http://dev.finto.fi/download/yso/yso-sv.mrcx>
    dct:format "application/marcxml+xml";
    dct:language "sv" .

Then the getDataURLs method would need to return also the language of each of those URLs (or perhaps better, take a lang parameter that filters the returned URLs) so that we can show the link to the right language version. Or do we want to show the links to all language versions in any case, regardless of the current UI/content language?

@kouralex
Copy link
Contributor Author

I am closing this since this was fixed in #877.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants