Class StorageIngestAction
- java.lang.Object
-
- gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction
-
- gov.nasa.pds.harvest.search.crawler.actions.StorageIngestAction
-
- All Implemented Interfaces:
gov.nasa.jpl.oodt.cas.commons.spring.SpringSetIdInjectionType
public class StorageIngestAction extends gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction
Class that will ingest registered products to the PDS Storage Service.- Author:
- mcayanan
-
-
Constructor Summary
Constructors Constructor Description StorageIngestAction(URL storageServerUrl)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
performAction(File product, gov.nasa.jpl.oodt.cas.metadata.Metadata metadata)
Perform the action to ingest a product to the PDS Storage service.String
performAction(File product, FileObject fileObject, gov.nasa.jpl.oodt.cas.metadata.Metadata metadata)
Perform ingestion of a file object.void
setDataTransferType(String dataTransferType)
Set the data transfer type.
-
-
-
Constructor Detail
-
StorageIngestAction
public StorageIngestAction(URL storageServerUrl) throws org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException
Constructor.- Parameters:
storageServerUrl
- URL to the PDS storage server.- Throws:
org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException
- If there was an error connecting to the Storage Service.
-
-
Method Detail
-
performAction
public boolean performAction(File product, gov.nasa.jpl.oodt.cas.metadata.Metadata metadata) throws gov.nasa.jpl.oodt.cas.crawl.structs.exceptions.CrawlerActionException
Perform the action to ingest a product to the PDS Storage service.- Specified by:
performAction
in classgov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction
- Parameters:
product
- The registered product.metadata
- The metadata associated with the given product.- Returns:
- true if the ingestion was successful, false otherwise.
- Throws:
gov.nasa.jpl.oodt.cas.crawl.structs.exceptions.CrawlerActionException
-
performAction
public String performAction(File product, FileObject fileObject, gov.nasa.jpl.oodt.cas.metadata.Metadata metadata)
Perform ingestion of a file object.- Parameters:
product
- The file associated with the given file object.fileObject
- The file object to ingest.metadata
- The metadata associated with the given file.- Returns:
- The storage service product identifier if an ingestion was successful. If an error occurred, a null will be returned.
-
setDataTransferType
public void setDataTransferType(String dataTransferType)
Set the data transfer type.- Parameters:
dataTransferType
- Either 'InPlaceProduct' or 'TransferProduct'.
-
-