org.apache.oodt.cas.metadata
Interface MetExtractor

All Known Implementing Classes:
AbstractMetExtractor, CmdLineMetExtractor, CopyAndRewriteExtractor, ExternMetExtractor, FilenameTokenMetExtractor, MetReaderExtractor

public interface MetExtractor

Version:
$Revision$

An interface for Metadata extraction. This interface expects the definition of the following two parameters:

Author:
mattmann

Method Summary
 Metadata extractMetadata(File f)
          Extracts Metadata from a given File.
 Metadata extractMetadata(File f, File configFile)
          Extracts Metadata from the given File using the specified config file.
 Metadata extractMetadata(File f, MetExtractorConfig config)
          Extracts Metadata from the given File using the specified MetExtractorConfig.
 Metadata extractMetadata(File f, String configFilePath)
          Extracts Metadata from the given File using the specified config file path.
 Metadata extractMetadata(String filePath)
          Extracts Metadata from a given /path/to/some/file.
 Metadata extractMetadata(URL fileUrl)
          Extracts Metadata from a given URL pointer to a File.
 Metadata extractMetadata(URL fileUrl, MetExtractorConfig config)
          Extracts Metadata from the given URL using the specified MetExtractorConfig.
 void setConfigFile(File f)
          Sets the config file for this MetExtractor to the specified File f.
 void setConfigFile(MetExtractorConfig config)
          Sets the MetExtractorConfig for the MetExtractor
 void setConfigFile(String filePath)
          Sets the config file for this MetExtractor to the specified File identified by filePath.
 

Method Detail

extractMetadata

Metadata extractMetadata(File f)
                         throws MetExtractionException
Extracts Metadata from a given File.

Parameters:
f - File object to extract Metadata from.
Returns:
Extracted Metadata from the given File.
Throws:
MetExtractionException - If any error occurs.

extractMetadata

Metadata extractMetadata(String filePath)
                         throws MetExtractionException
Extracts Metadata from a given /path/to/some/file.

Parameters:
filePath - Path to a given file to extract Metadata from.
Returns:
Extracted Metadata from the given filePath.
Throws:
MetExtractionException - If any error occurs.

extractMetadata

Metadata extractMetadata(URL fileUrl)
                         throws MetExtractionException
Extracts Metadata from a given URL pointer to a File.

Parameters:
fileUrl - The URL pointer to a File.
Returns:
Extracted Metadata from the given File URL.
Throws:
MetExtractionException - If any error occurs.

setConfigFile

void setConfigFile(File f)
                   throws MetExtractionException
Sets the config file for this MetExtractor to the specified File f.

Parameters:
f - The config file for this MetExtractor.
Throws:
MetExtractionException

setConfigFile

void setConfigFile(String filePath)
                   throws MetExtractionException
Sets the config file for this MetExtractor to the specified File identified by filePath.

Parameters:
filePath - The config file path for this MetExtractor.
Throws:
MetExtractionException

setConfigFile

void setConfigFile(MetExtractorConfig config)
Sets the MetExtractorConfig for the MetExtractor

Parameters:
config - The MetExtractorConfig

extractMetadata

Metadata extractMetadata(File f,
                         File configFile)
                         throws MetExtractionException
Extracts Metadata from the given File using the specified config file.

Parameters:
f - The File to extract Metadata from.
configFile - The config file for this MetExtractor.
Returns:
Extracted Metadata from the given File using the specified config file.
Throws:
MetExtractionException - If any error occurs.

extractMetadata

Metadata extractMetadata(File f,
                         String configFilePath)
                         throws MetExtractionException
Extracts Metadata from the given File using the specified config file path.

Parameters:
f - The File to extract Metadata from.
configFilePath - The path to the config file for this MetExtractor.
Returns:
Extracted Metadata from the given File using the specified config file path.
Throws:
MetExtractionException - If any error occurs.

extractMetadata

Metadata extractMetadata(File f,
                         MetExtractorConfig config)
                         throws MetExtractionException
Extracts Metadata from the given File using the specified MetExtractorConfig.

Parameters:
f - The File from which Metadata will be extracted from
config - The config file for the extractor
Returns:
Metadata extracted from the File
Throws:
MetExtractionException - If any error occurs

extractMetadata

Metadata extractMetadata(URL fileUrl,
                         MetExtractorConfig config)
                         throws MetExtractionException
Extracts Metadata from the given URL using the specified MetExtractorConfig.

Parameters:
fileUrl - The URL from which Metadata will be extracted from
config - The config file for the extractor
Returns:
Metadata extracted from the URL
Throws:
MetExtractionException - If any error occurs


Copyright © 1999-2013
Apache OODT. All Rights Reserved.