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

in DCAT JSON the distributionURLs need a mediatype #146

Closed
mhogeweg opened this issue Mar 31, 2015 · 4 comments
Closed

in DCAT JSON the distributionURLs need a mediatype #146

mhogeweg opened this issue Mar 31, 2015 · 4 comments
Assignees
Milestone

Comments

@mhogeweg
Copy link
Member

there are several URLs in Project Open Data Metadata Schema v1.1 that require the inclusion of a mediatype. since the typical source geospatial metadata does not include this information, it needs to be inferred from the URL included in that source metadata. A possible approach is to use regex to match URL patterns and then map those to an output mediatype that is included in the output JSON.

@smrgeoinfo
Copy link

There is a community activity to crowdsource a registry of values to use for these kinds of properties to foster interoperability. Perhaps you could add mediatype strings for specific resource types there?
https://github.com/OSGeo/Cat-Interop @tomkralidis

@pandzel-zz
Copy link

It is possible to define mapping between url pattern and desired MIME type as "mediaType" element. It works in a similar manner as domain values mapping, except it is done through <media url="" mime=""/> element. The mechanism is in place, the only missing part to to come up with a reasonable list of mappings. It is true for both "accessURL" and "downloadURL" which are part of "distribution" element in DCAT1.1, "url" is a regular expression pattern matching the input URL, and the "mime" is just plain MIME type (mediaType). See, example:

<field name="downloadURL" index="dcat.downloadUrl" required="false">
   <media url=".+.pdf$" mime="application/pdf"/>
   <media url=".+.kmz$" mime="application/vnd.google-earth.kmz"/>
   <media url=".+.doc$" mime="application/vnd.ms-word.document.macroEnabled.12"/>
</field>

@smrgeoinfo
Copy link

mime types work OK for stuff that people look at, but if you're trying to implement some kind of machine interoperability, just knowing that something is JSON, CSV, or XML doesn't really tell you all you need to know if you want it to work.

@mhogeweg
Copy link
Member Author

yep, and with modern web services the response (which I think is what typically is defined with the mediatype) can be a variety of things. there were some discussions on this in POD issue 272, but I'm not sure if those were really completed.

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

3 participants