<span style="font-family: arial,helvetica,sans-serif;">I am mainly interested in image, (usually jpg ), and audio (usually mp3)</span><br style="font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;">I dont know much about Exiftool but it seems to be a Perl library. Nothing wrong with that :-), but sounds an heavy choice to wrap in a java package?</span><br style="font-family: arial,helvetica,sans-serif;">
<span style="font-family: arial,helvetica,sans-serif;">   </span><br style="font-family: arial,helvetica,sans-serif;"><span style="font-family: arial,helvetica,sans-serif;">xmlcalabash has cx:metadata-extractor extension step; for images a thin shell around Drew Noakes' library </span><a style="font-family: arial,helvetica,sans-serif;" href="http://www.drewnoakes.com/code/exif/" target="_blank">of the same name</a><span style="font-family: arial,helvetica,sans-serif;">.</span><a style="font-family: arial,helvetica,sans-serif;" href="http://xmlcalabash.com/download/" target="_blank"> </a><span style="font-family: arial,helvetica,sans-serif;">Mentioned at</span><a style="font-family: arial,helvetica,sans-serif;" href="http://xmlcalabash.com/download/" target="_blank"> http://xmlcalabash.com/download/</a><span style="font-family: arial,helvetica,sans-serif;"> </span><br>

<br>Mp3 is more tricky, but <a href="https://github.com/mpatric/mp3agic">https://github.com/mpatric/mp3agic</a> looks like a possible candidate to me.<br><br>/Andy<br><br><div class="gmail_quote">On Tue, Nov 15, 2011 at 2:48 PM, Alexander Holupirek <span dir="ltr"><<a href="mailto:alexander.holupirek@uni-konstanz.de" target="_blank">alexander.holupirek@uni-konstanz.de</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><br>
On 14.11.2011, at 21:48, Andy Bunce wrote:<br>
<br>
> It is the metadata extraction part that is non trivial.<br>
> So packaging the libraries and calls for that sounds like a great way to go.<br>
><br>
> /Andy<br>
><br>
> On Mon, Nov 14, 2011 at 7:22 PM, John D. Mitchell <<a href="mailto:jdmitchell@gmail.com" target="_blank">jdmitchell@gmail.com</a>> wrote:<br>
> On Nov 14, 2011, at 11:17 , Alexander Holupirek wrote:<br>
> [...]<br>
> > If you also want to have the extractor functionality ... we thought about packaging [2] it for BaseX and make it available as XQuery functions.  Just give us a hint and we will get going.<br>
><br>
> ++<br>
><br>
> Cheers,<br>
> John<br>
<br>
</div></div>Thanks for your feedback.  We decided to go for the packaging approach and to provide an EXPath package [0] in order to produce a FSML database of a given file hierarchy.<br>
<br>
It would be interesting to hear what kind of file types are relevant for you.<br>
The idea is to have transducer code [1] that, for example, extracts ID3 information for audio files:<br>
<br>
   <file name="LockerBleiben.mp3" suffix="mp3" st_mode="0100644" st_size="4585915" st_mtime="1320945388000" st_uid="1000" st_gid="1000" st_nlink="1" bsid="70622d84-f4f7-4b90-95e2-9e1821e8d283"><br>


      <folder name="ID3v2"><br>
        <fact name="Title">Locker Bleiben</fact><br>
        <fact name="Artist">Die Fantastischen Vier</fact><br>
        <fact name="Composer">Andreas Rieke/Michael DJ Beck/Thomas Dürr/Michael B. Schmidt</fact><br>
        <fact name="Album">Lauschgift</fact><br>
        <fact name="Track">15/20</fact><br>
        <fact name="PartOfSet">1/1</fact><br>
        <fact name="Year">1995</fact><br>
        <fact name="Genre">Hip Hop/Rap</fact><br>
        <fact name="Compilation">1</fact><br>
        <fact name="Comment">(iTunPGAP) 0</fact><br>
        <fact name="EncodedBy">iTunes 8.0.2</fact><br>
      </folder><br>
      <folder name="Cover"><br>
        ...<br>
      </folder><br>
    </file><br>
<br>
Currently I think about using exiftool[1] by Phil Harvey to include metadata about numerous multi-media files.<br>
Extract full text and publisher metadata from PDF files, etc.<br>
<br>
If you have something special or want to comment on this, I'm all ears.<br>
<br>
Thanks,<br>
        Alex<br>
<br>
<br>
[0] EXPath Packaging: <a href="http://docs.basex.org/wiki/Packaging" target="_blank">http://docs.basex.org/wiki/Packaging</a><br>
[1] Transducer coined by Gifford <a href="http://et.al" target="_blank">et.al</a>. Semantic File System: <a href="http://dl.acm.org/citation.cfm?id=121138" target="_blank">http://dl.acm.org/citation.cfm?id=121138</a><br>


[1] <a href="http://www.sno.phy.queensu.ca/%7Ephil/exiftool/" target="_blank">http://www.sno.phy.queensu.ca/~phil/exiftool/</a></blockquote></div><br>