Great work Tyler - can you and Annie make sure there is a JIRA issue for this and maybe throw your patch up on Review Board and I would be happy to help shepherd it into the sources.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Chris Mattmann, Ph.D. Chief Architect Instrument Software and Science Data Systems Section (398) NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA Office: 168-519, Mailstop: 168-527 Email: [email protected] WWW: http://sunset.usc.edu/~mattmann/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Adjunct Associate Professor, Computer Science Department University of Southern California, Los Angeles, CA 90089 USA ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -----Original Message----- From: Tyler Palsulich <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Wednesday, June 4, 2014 11:01 AM To: "[email protected]" <[email protected]> Subject: Re: unit test error for new parser >Hi Annie, >I put together a patch to work your parser into Tika under >org.apache.tika.parsers.mat. You'll need to put a valid matlab file (I >called it MatlabFile.m, but just update the test) under test-documents >for the parsing in the test to work properly -- the > file I had failed because of "om.jmatio.io.MatlabIOException: This is >not a valid MATLAB 5.0 MAT-file." >To apply the patch, run `patch -p0 -i matlab_parsing.diff` in the root of >the tika trunk. Run the test with `mvn test -DfailIfNoTests=false >-Dtest=org.apache.tika.parser.mat.MatParserTest`. > > >Hope that helps, >Tyler > > > >On Wed, Jun 4, 2014 at 1:27 AM, Matthias Krueger ><[email protected]> wrote: > > >Hi Annie, > > > >[INFO] ------------------------------------------------------------- >[ERROR] COMPILATION ERROR : >[INFO] ------------------------------------------------------------- >[ERROR] >/Users/annbryant/TIKA/tika/tika-parsers/src/main/java/org/apache/tika/pars >er/mat/MatParser.java:[69,23] >cannot find symbol >symbol : constructor >MatFileReader(org.apache.tika.io.CloseShieldInputStream) >location: class com.jmatio.io.MatFileReader > > > > >You're trying to create a com.jmatio.io.MatFileReader passing an >InputStream while the constructor needs something else (a java.io.File). >TikaInputStream supports spooling InputStreams to a temp file so this >might be the way to go. Have a look at >org.apache.tika.parser.jpeg.JpegParser#parse > and how it passes a File reference to the ImageMetadataExtractor. > >Cheers >Matthias > > > > >
