On Thu, Apr 24, 2014 at 12:11 PM, Nick Burch <[email protected]> wrote:

> On Thu, 24 Apr 2014, אברהם חיון wrote:
>
>> Here is the simple code (Thank you Nick):
>> List<MediaType> mts = new ArrayList<MediaType>();
>> // All of these should return XML type
>> mts.add(MediaType.parse("text/xml"));
>> mts.add(MediaType.parse("application/xml"));
>>
>
> These two are aliases. You might need to check you're using the canonical
> form
>
*Can you please elaborate?   What is the difference between the alias and
the canonical form ?*


>
>  mts.add(MediaType.parse("application/x-xml"));
>>
>
> Tika doesn't know about this, is it a common alias?

*Not used a lot, but several places list it as an XML type, like here:*
*http://filext.com/file-extension/XML
<http://filext.com/file-extension/XML>*
*or*
*http://help.dottoro.com/lapuadlp.php
<http://help.dottoro.com/lapuadlp.php>*

*Where should I look to see the right and acceptable mediaType / aliases of
every format ?*


>
>
>  mts.add(MediaType.parse("application/atom+xml"));
>> mts.add(MediaType.parse("application/rss+xml"));
>>
>
>  // All of these should return Compress or ZIP type
>> mts.add(MediaType.parse("application/gzip"));
>> mts.add(MediaType.parse("application/x-gzip"));
>> mts.add(MediaType.parse("application/x-compress"));
>>
>
> None of these is zip! That's application/zip . These are all different
> compression formats to zip
>
*You are right, my bad.*



>  mts.add(MediaType.parse("application/x-gunzip"));
>> mts.add(MediaType.parse("application/gzipped"));
>> mts.add(MediaType.parse("application/gzip-compressed"));
>> mts.add(MediaType.parse("gzip/document"));
>>
>
> Tika doesn't know about any of those, if they're common you might want to
> suggest them as new aliases and/or new mime types

*They are listed in several places, though I am not sure they are listed in
the "Official" places.*



>
> Nick

Reply via email to