org.apache.oodt.cas.filemgr.ingest
Interface Ingester

All Known Implementing Classes:
CachedIngester, CmdLineIngester, StdIngester

public interface Ingester

Version:
$Revision: 11462 $

An interface for ingesting Products

.
Author:
mattmann, bfoster

Method Summary
 boolean hasProduct(URL fmUrl, File prodFile)
          Checks the file manager at the given URL to see whether or not it knows about the provided Product File parameter.
 boolean hasProduct(URL fmUrl, String productName)
          Checks the file manager at the given URL to see whether or not it knows about the provided Product with the given productName parameter.
 String ingest(URL fmUrl, File prodFile, org.apache.oodt.cas.metadata.Metadata met)
          Ingests a Product to the file manager service object identified by the given URL parameter.
 String ingest(URL fmUrl, File prodFile, org.apache.oodt.cas.metadata.MetExtractor extractor, File metConfFile)
          Ingests a Product to the file manager service object identified by the given URL parameter.
 void ingest(URL fmUrl, List<String> prodFiles, org.apache.oodt.cas.metadata.MetExtractor extractor, File metConfFile)
           
 

Method Detail

ingest

String ingest(URL fmUrl,
              File prodFile,
              org.apache.oodt.cas.metadata.MetExtractor extractor,
              File metConfFile)
              throws IngestException
Ingests a Product to the file manager service object identified by the given URL parameter. The product Metadata is extracted dynamically using the provided MetExtractor interface.

Parameters:
fmUrl - The URL pointer to the file manager service.
prodFile - The File pointer to the product file.
extractor - The given MetExtractor to use to extract Metadata from the Product.
metConfFile - A ConfigFile for the MetExtractor.
Returns:
The ID returned by the file manager for the newly ingested product.
Throws:
IngestException - If there is an error ingesting the Product

ingest

String ingest(URL fmUrl,
              File prodFile,
              org.apache.oodt.cas.metadata.Metadata met)
              throws IngestException
Ingests a Product to the file manager service object identified by the given URL parameter. The product Metadata is provided a priori.

Parameters:
fmUrl - The URL pointer to the file manager service.
prodFile - The File pointer to the product file.
met - The given Metadata object already extracted from the Product.
Returns:
The ID returned by the file manager for the newly ingested product.
Throws:
IngestException - If there is an error ingesting the Product

ingest

void ingest(URL fmUrl,
            List<String> prodFiles,
            org.apache.oodt.cas.metadata.MetExtractor extractor,
            File metConfFile)
            throws IngestException
Parameters:
fmUrl - The URL pointer to the file manager service.
prodFiles - A List of String filePaths pointing to Product files to ingest.
extractor - The given MetExtractor to use to extract Metadata from the Products.
metConfFile - A ConfigFile for the MetExtractor.
Throws:
IngestException - If there is an error ingesting the Products.

hasProduct

boolean hasProduct(URL fmUrl,
                   File prodFile)
                   throws CatalogException
Checks the file manager at the given URL to see whether or not it knows about the provided Product File parameter. To do this, it uses File.getName() as the Metadata key Filename.

Parameters:
prodFile - The File to check for existance of within the file manager at given URL.
Returns:
Throws:
CatalogException

hasProduct

boolean hasProduct(URL fmUrl,
                   String productName)
                   throws CatalogException
Checks the file manager at the given URL to see whether or not it knows about the provided Product with the given productName parameter. To do this, it uses the provided productName key as the Metadata key to search for in the catalog.

Parameters:
fmUrl - The URL pointer to the file manager service.
productName - The Product to search for, identified by its (possibly not unique) name.
Returns:
True if the file manager has the product, false otherwise.
Throws:
CatalogException


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