use of com.mpatric.mp3agic.ID3v1 in project stanbol by apache.
the class MP3FileExtractor method performExtraction.
@Override
protected void performExtraction(URI arg0, File arg1, Charset arg2, String arg3, RDFContainer result) throws ExtractorException {
try {
Mp3File mp3File = new Mp3File(arg1.toString());
ID3v1 id3v1 = mp3File.getId3v1Tag();
ID3v2 id3v2 = mp3File.getId3v2Tag();
ID3Wrapper wrapper = new ID3Wrapper(id3v1, id3v2);
addId3Fields(wrapper, result);
result.add(RDF.type, NID3.ID3Audio);
} catch (UnsupportedTagException e) {
throw new ExtractorException(e);
} catch (InvalidDataException e) {
throw new ExtractorException(e);
} catch (IOException e) {
throw new ExtractorException(e);
}
}
Aggregations