org.apache.oodt.cas.metadata.extractors
Class DataSourceMetExtractor

java.lang.Object
  extended by org.apache.oodt.cas.metadata.AbstractMetExtractor
      extended by org.apache.oodt.cas.metadata.extractors.DataSourceMetExtractor
All Implemented Interfaces:
MetExtractor
Direct Known Subclasses:
ParentKeyDataSourceMetExtractor

public class DataSourceMetExtractor
extends AbstractMetExtractor

MetExtractor which uses input file's name as key for lookup into a sql database to get metadata.

Author:
bfoster@apache.org (Brian Foster)

Field Summary
 
Fields inherited from class org.apache.oodt.cas.metadata.AbstractMetExtractor
config, LOG, reader
 
Constructor Summary
DataSourceMetExtractor()
           
 
Method Summary
protected  Metadata extrMetadata(File file)
          Extracts Metadata from the given File
protected  String getKey(File file)
           
protected  Metadata getMetadata(DataSource dataSource, String query, String key)
           
 
Methods inherited from class org.apache.oodt.cas.metadata.AbstractMetExtractor
extractMetadata, extractMetadata, extractMetadata, extractMetadata, extractMetadata, extractMetadata, extractMetadata, setConfigFile, setConfigFile, setConfigFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceMetExtractor

public DataSourceMetExtractor()
Method Detail

extrMetadata

protected Metadata extrMetadata(File file)
                         throws MetExtractionException
Description copied from class: AbstractMetExtractor
Extracts Metadata from the given File

Specified by:
extrMetadata in class AbstractMetExtractor
Parameters:
file - The File from which Metadata will be extracted
Returns:
The Metadata extracted
Throws:
MetExtractionException - If any error occurs

getKey

protected String getKey(File file)

getMetadata

protected Metadata getMetadata(DataSource dataSource,
                               String query,
                               String key)
                        throws MetExtractionException
Throws:
MetExtractionException


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