public class StdIngester extends Object implements Ingester, CoreMetKeys
An implementation of the Ingster interface that uses the following
pieces of Metadata information to determine how to ingest a
Product:
Ingester supports overriding certain Product properties,
including:
.FILE_LOCATION, FILE_SIZE, FILENAME, MIME_TYPE, PRODUCT_ID, PRODUCT_NAME, PRODUCT_RECEVIED_TIME, PRODUCT_STRUCTURE, PRODUCT_TYPE| Constructor and Description |
|---|
StdIngester(String transferService) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasProduct(URL fmUrl,
File prodFile)
|
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,
Metadata met)
Ingests a
Product to the file manager service object identified
by the given URL parameter. |
String |
ingest(URL fmUrl,
File prodFile,
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,
MetExtractor extractor,
File metConfFile) |
public StdIngester(String transferService)
public String ingest(URL fmUrl, File prodFile, MetExtractor extractor, File metConfFile) throws IngestException
IngesterProduct to the file manager service object identified
by the given URL parameter. The product Metadata is
extracted dynamically using the provided MetExtractor interface.ingest in interface IngesterfmUrl - 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.IngestException - If there is an error ingesting the Productpublic void ingest(URL fmUrl, List<String> prodFiles, MetExtractor extractor, File metConfFile)
ingest in interface IngesterfmUrl - 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.public String ingest(URL fmUrl, File prodFile, Metadata met) throws IngestException
IngesterProduct to the file manager service object identified
by the given URL parameter. The product Metadata is
provided a priori.ingest in interface IngesterfmUrl - 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.IngestException - If there is an error ingesting the Productpublic boolean hasProduct(URL fmUrl, File prodFile) throws CatalogException
IngesterURL 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.hasProduct in interface IngesterprodFile - The File to check for existance of within the file
manager at given URL.CatalogExceptionpublic boolean hasProduct(URL fmUrl, String productName) throws CatalogException
IngesterURL 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.hasProduct in interface IngesterfmUrl - The URL pointer to the file manager service.productName - The Product to search for, identified by its (possibly
not unique) name.CatalogExceptionCopyright © 1999–2017 Apache OODT. All rights reserved.