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

Add link to JSON-LD data dump #1096

Closed
kouralex opened this issue Nov 30, 2020 · 0 comments · Fixed by #1097
Closed

Add link to JSON-LD data dump #1096

kouralex opened this issue Nov 30, 2020 · 0 comments · Fixed by #1097
Milestone

Comments

@kouralex
Copy link
Contributor

At the moment, Skosmos does not list JSON-LD version of the vocabulary (its data dump) on the vocabulary page, even though it may be declared and downloaded via the REST API.

The culprit seems to be here (see the code below); there is no treatment for JSON-LD.

<div class="download-links">
<span class="versal">{% trans %}Download this vocabulary:{% endtrans %}
{% if 'application/rdf+xml' in vocab.config.dataURLs|keys %}
<a href="rest/v1/{{ request.vocabid }}/data?format=application/rdf%2Bxml">RDF/XML</a>
{% endif %}
{% if 'text/turtle' in vocab.config.dataURLs|keys %}
<a href="rest/v1/{{ request.vocabid }}/data?format=text/turtle">TURTLE</a>
{% endif %}
{% if 'application/marcxml+xml' in vocab.config.dataURLs|keys %}
{% if vocab.config.dataURLs['application/marcxml+xml'] is iterable %}
{% for key, values in vocab.config.dataURLs['application/marcxml+xml'] %}
<a href="rest/v1/{{ request.vocabid }}/data?format=application/marcxml%2Bxml&lang={{key}}">MARCXML/{{ key | lang_name(request.lang) }}</a>
{% endfor %}
{% else %}
<a href="rest/v1/{{ request.vocabid }}/data?format=application/marcxml%2Bxml">MARCXML</a>
{% endif %}
{% endif %}
</span>
</div>

As application/ld+json is already in supported formats, no other changes are required. EasyRdf interprets .jsonld files as such so no dc:format declaration is required (just tested).

@kouralex kouralex added this to the 2.9 milestone Nov 30, 2020
osma added a commit that referenced this issue Feb 17, 2021
…link

add treatment for JSON-LD vocabulary data dump; fixes #1096
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 a pull request may close this issue.

1 participant