org.deepfs.fsml.parsers
Interface IFileParser

All Known Implementing Classes:
BMPParser, EMLParser, GIFParser, JPGParser, MP3Parser, PNGParser, SpotlightExtractor, TIFFParser, TXTParser, XMLParser

public interface IFileParser

Interface for metadata extractors / file parsers.

Author:
Workgroup DBIS, University of Konstanz 2005-10, ISC License, Bastian Lemke

Method Summary
 boolean check(DeepFile deepFile)
           Checks if there is a File in correct format and can be read by the parser.
 void extract(DeepFile deepFile)
          Extracts metadata and file contents.
 void propagate(DeepFile deepFile)
          Propagates the metadata and file contents back to the file in the file system.
 

Method Detail

check

boolean check(DeepFile deepFile)
              throws IOException

Checks if there is a File in correct format and can be read by the parser. Checks e.g. header bytes.

Parameters:
deepFile - the DeepFile to read from
Returns:
true if the file is supported
Throws:
IOException - if an error occurs while reading from the file

extract

void extract(DeepFile deepFile)
             throws IOException
Extracts metadata and file contents.

Parameters:
deepFile - the DeepFile to save metadata and content to
Throws:
IOException - if any error occurs while reading from the file

propagate

void propagate(DeepFile deepFile)
               throws IOException
Propagates the metadata and file contents back to the file in the file system.

Parameters:
deepFile - the DeepFile that contains the metadata and file contents
Throws:
IOException - if any error occurs