org.apache.oodt.cas.filemgr.metadata.extractors
Class AbstractFilemgrMetExtractor

java.lang.Object
  extended by org.apache.oodt.cas.filemgr.metadata.extractors.AbstractFilemgrMetExtractor
All Implemented Interfaces:
FilemgrMetExtractor
Direct Known Subclasses:
CoreMetExtractor, FinalFileLocationExtractor, MimeTypeExtractor

public abstract class AbstractFilemgrMetExtractor
extends Object
implements FilemgrMetExtractor

Version:
$Revision: 11462 $

An abstract base class providing functionality to any sub-classing FilemgrMetExtractors.

.
Author:
mattmann

Field Summary
protected  Properties configuration
           
 
Constructor Summary
AbstractFilemgrMetExtractor()
           
 
Method Summary
protected  void addMetadataIfUndefined(org.apache.oodt.cas.metadata.Metadata origMet, org.apache.oodt.cas.metadata.Metadata destMet, String key, String val)
           
 void configure(Properties props)
          Sets the configuration for this Metadata extractor.
abstract  void doConfigure()
           
abstract  org.apache.oodt.cas.metadata.Metadata doExtract(Product product, org.apache.oodt.cas.metadata.Metadata met)
           
 org.apache.oodt.cas.metadata.Metadata extractMetadata(Product product, org.apache.oodt.cas.metadata.Metadata met)
          Extracts Metadata from the given Product.
protected  File getProductFile(Product product)
           
protected  String getRootRefPath(List<Reference> refs, String productTypeRepoPath)
           
protected  void merge(org.apache.oodt.cas.metadata.Metadata src, org.apache.oodt.cas.metadata.Metadata dest)
           
protected  void validateProduct(Product product, org.apache.oodt.cas.metadata.Metadata met)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configuration

protected Properties configuration
Constructor Detail

AbstractFilemgrMetExtractor

public AbstractFilemgrMetExtractor()
Method Detail

extractMetadata

public org.apache.oodt.cas.metadata.Metadata extractMetadata(Product product,
                                                             org.apache.oodt.cas.metadata.Metadata met)
                                                      throws org.apache.oodt.cas.metadata.exceptions.MetExtractionException
Description copied from interface: FilemgrMetExtractor
Extracts Metadata from the given Product.

Specified by:
extractMetadata in interface FilemgrMetExtractor
Parameters:
product - The given Product.
met - The original Metadata provided during ingestion.
Returns:
Extracted Metadata derived from the existing Metadata and Product provided.
Throws:
org.apache.oodt.cas.metadata.exceptions.MetExtractionException

configure

public void configure(Properties props)
Description copied from interface: FilemgrMetExtractor
Sets the configuration for this Metadata extractor.

Specified by:
configure in interface FilemgrMetExtractor
Parameters:
props - The Properties object to configure this Metadata extractor with.

doExtract

public abstract org.apache.oodt.cas.metadata.Metadata doExtract(Product product,
                                                                org.apache.oodt.cas.metadata.Metadata met)
                                                         throws org.apache.oodt.cas.metadata.exceptions.MetExtractionException
Throws:
org.apache.oodt.cas.metadata.exceptions.MetExtractionException

doConfigure

public abstract void doConfigure()

validateProduct

protected void validateProduct(Product product,
                               org.apache.oodt.cas.metadata.Metadata met)
                        throws org.apache.oodt.cas.metadata.exceptions.MetExtractionException
Throws:
org.apache.oodt.cas.metadata.exceptions.MetExtractionException

addMetadataIfUndefined

protected void addMetadataIfUndefined(org.apache.oodt.cas.metadata.Metadata origMet,
                                      org.apache.oodt.cas.metadata.Metadata destMet,
                                      String key,
                                      String val)

merge

protected void merge(org.apache.oodt.cas.metadata.Metadata src,
                     org.apache.oodt.cas.metadata.Metadata dest)

getProductFile

protected File getProductFile(Product product)
                       throws org.apache.oodt.cas.metadata.exceptions.MetExtractionException
Throws:
org.apache.oodt.cas.metadata.exceptions.MetExtractionException

getRootRefPath

protected String getRootRefPath(List<Reference> refs,
                                String productTypeRepoPath)
                         throws URISyntaxException
Throws:
URISyntaxException


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