You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@any23.apache.org by "Michele Mostarda (JIRA)" <ji...@apache.org> on 2012/05/21 15:28:41 UTC

[jira] [Created] (ANY23-98) TikaMIMEtypeDetector doesn't recognize certain file formats when they contain header comments

Michele Mostarda created ANY23-98:
-------------------------------------

             Summary: TikaMIMEtypeDetector doesn't recognize certain file formats when they contain header comments
                 Key: ANY23-98
                 URL: https://issues.apache.org/jira/browse/ANY23-98
             Project: Apache Any23
          Issue Type: Improvement
    Affects Versions: 0.7.0
            Reporter: Michele Mostarda
             Fix For: 0.8.0


Adding header comments to NQ, N3 and RSS files prevents the TikaMIMEtypeDetector to work properly.
See #ANY23-97 for further details.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ANY23-98) TikaMIMEtypeDetector doesn't recognize certain file formats when they contain header comments

Posted by "Peter Ansell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ANY23-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432365#comment-13432365 ] 

Peter Ansell commented on ANY23-98:
-----------------------------------

This issue seems to duplicate ANY23-17 
                
> TikaMIMEtypeDetector doesn't recognize certain file formats when they contain header comments
> ---------------------------------------------------------------------------------------------
>
>                 Key: ANY23-98
>                 URL: https://issues.apache.org/jira/browse/ANY23-98
>             Project: Apache Any23
>          Issue Type: Improvement
>    Affects Versions: 0.7.0
>            Reporter: Michele Mostarda
>             Fix For: 0.8.0
>
>
> Adding header comments to NQ, N3 and RSS files prevents the TikaMIMEtypeDetector to work properly.
> See #ANY23-97 for further details.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ANY23-98) TikaMIMEtypeDetector doesn't recognize certain file formats when they contain header comments

Posted by "Lewis John McGibbney (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ANY23-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13435342#comment-13435342 ] 

Lewis John McGibbney commented on ANY23-98:
-------------------------------------------

Hi Peter I saw this when you made the comment but as Jira was down it slipped to the bottom of the TODO list.
W.r.t the actual issue, yes I think it is pretty safe to say that it is a duplicate and should be marked as such. I would like Michele to do this though as he opened the issue intially.
Thanks
                
> TikaMIMEtypeDetector doesn't recognize certain file formats when they contain header comments
> ---------------------------------------------------------------------------------------------
>
>                 Key: ANY23-98
>                 URL: https://issues.apache.org/jira/browse/ANY23-98
>             Project: Apache Any23
>          Issue Type: Improvement
>    Affects Versions: 0.7.0
>            Reporter: Michele Mostarda
>             Fix For: 0.8.0
>
>
> Adding header comments to NQ, N3 and RSS files prevents the TikaMIMEtypeDetector to work properly.
> See #ANY23-97 for further details.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ANY23-98) TikaMIMEtypeDetector doesn't recognize certain file formats when they contain header comments

Posted by "Peter Ansell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ANY23-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13280638#comment-13280638 ] 

Peter Ansell commented on ANY23-98:
-----------------------------------

I started on a patch for this issue in my github fork but I didn't manage to get it complete for N3 for some reason, and it looked rather hacky and prone to errors. I ended up switching to checking whether the format was valid using Rio.getParser(RDFFormat) and then attempting to parse, as is done now for the Turtle parser. I am still attempting to get a clean, small, top section from the document, but I had to include some new definitions. [1]

I was going to raise an issue for it but I didn't yet have a solution myself that didn't change virtually everything in the way TikaMIMETypeDetector works.

Also, I was able to update to Tika-1.1 successfully. I patched the mimetypes.xml file from Tika-1.1 to include the RDF definitions that it did not already contain. You can see the patched version at [2]

[1] https://github.com/ansell/any23/blob/master/mime/src/main/java/org/apache/any23/mime/TikaMIMETypeDetector.java
[2] https://github.com/ansell/any23/blob/master/mime/src/main/resources/org/apache/any23/mime/mimetypes.xml

                
> TikaMIMEtypeDetector doesn't recognize certain file formats when they contain header comments
> ---------------------------------------------------------------------------------------------
>
>                 Key: ANY23-98
>                 URL: https://issues.apache.org/jira/browse/ANY23-98
>             Project: Apache Any23
>          Issue Type: Improvement
>    Affects Versions: 0.7.0
>            Reporter: Michele Mostarda
>             Fix For: 0.8.0
>
>
> Adding header comments to NQ, N3 and RSS files prevents the TikaMIMEtypeDetector to work properly.
> See #ANY23-97 for further details.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ANY23-98) TikaMIMEtypeDetector doesn't recognize certain file formats when they contain header comments

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ANY23-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405797#comment-13405797 ] 

Hudson commented on ANY23-98:
-----------------------------

Integrated in Any23-trunk #250 (See [https://builds.apache.org/job/Any23-trunk/250/])
    excluded RSS file from RAT which header comments would break the expected behavior - see ANY23-98 (Revision 1356157)
excluded files from RAT which header comments would break the expected behavior - see ANY23-98 (Revision 1356154)

     Result = FAILURE
simonetripodi : 
Files : 
* /incubator/any23/trunk/pom.xml

simonetripodi : 
Files : 
* /incubator/any23/trunk/pom.xml

                
> TikaMIMEtypeDetector doesn't recognize certain file formats when they contain header comments
> ---------------------------------------------------------------------------------------------
>
>                 Key: ANY23-98
>                 URL: https://issues.apache.org/jira/browse/ANY23-98
>             Project: Apache Any23
>          Issue Type: Improvement
>    Affects Versions: 0.7.0
>            Reporter: Michele Mostarda
>             Fix For: 0.8.0
>
>
> Adding header comments to NQ, N3 and RSS files prevents the TikaMIMEtypeDetector to work properly.
> See #ANY23-97 for further details.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira