You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Mattmann, Chris A (3980)" <ch...@jpl.nasa.gov> on 2015/01/25 19:52:29 UTC

Re: Grib Parser

Copying dev@tika for folks to see

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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: chris.a.mattmann@nasa.gov
WWW:  http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Associate Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++






-----Original Message-----
From: Giuseppe Totaro <to...@di.uniroma1.it>
Date: Sunday, January 25, 2015 at 10:14 AM
To: "hemantku@usc.edu" <he...@usc.edu>
Cc: Chris Mattmann <Ch...@jpl.nasa.gov>
Subject: Grib Parser

>
>
>
>Hello Vineet,
>my name is Giuseppe and I am a PhD student of Professor Chris Mattmann.
>Currently, I am working on Tika for digital forensics purposes.
>
>
>I am writing you to ask some questions about your work on the Grib Parser.
>I saw the code of the gribParser.java file and available at
>https://github.com/hemantku/grib-parser.
>I noted that you instantiates a File object starting from
>RESOURCE_NAME_KEY string without using the InputStream object
> passed to the parse method:
>
>
>…
>49         //Get grib2 file name from metadata
>           
>50                
>           
>51         File gribFile = new
>File(metadata.get(Metadata.RESOURCE_NAME_KEY));
>52                
>           
>53         try {  
>          
>54             NetcdfFile ncFile =
>NetcdfDataset.openFile(gribFile.getAbsolutePath(),
>…
>
>
>This means that any test that does not define the RESOURCE_NAME_KEY
>property in the caller as follows
>metadata.add(Metadata.RESOURCE_NAME_KEY, filename);
>will fail because the File constructor throws a NullPointerException.
>Instead of adding RESOURCE_NAME_KEY, we can obtain the file from stream
>using the TikaInputStream class as well as in NetCDFParser.java:
>
>
> 51         //File gribFile = new
>File(metadata.get(Metadata.RESOURCE_NAME_KEY));
> 53         TikaInputStream tis = TikaInputStream.get(stream, new
>TemporaryResources());
> 54 
> 55         try {
> 57             NetcdfFile ncFile =
>NetcdfDataset.openFile(tis.getFile().getAbsolutePath(), null);
>
>
>Few minutes ago, I posted a comment on the Tika Issue Tracker system
>(TIKA-1423).
>
>
>
>Furthermore, I would really appreciate if you could update me about your
>progress in pushing your code into Tika?
>
>
>Thank you for your great work.
>
>
>Cheers,
>Giuseppe