gov.nasa.pds.harvest.crawler.actions
Class StorageIngestAction
java.lang.Object
gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction
gov.nasa.pds.harvest.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
Fields inherited from class gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction |
LOG, phases |
Method Summary |
String |
performAction(File product,
FileObject fileObject,
gov.nasa.jpl.oodt.cas.metadata.Metadata metadata)
Perform ingestion of a file object. |
boolean |
performAction(File product,
gov.nasa.jpl.oodt.cas.metadata.Metadata metadata)
Perform the action to ingest a product to the PDS Storage service. |
void |
setDataTransferType(String dataTransferType)
Set the data transfer type. |
Methods inherited from class gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction |
getDescription, getId, getPhases, setDescription, setId, setPhases |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
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 class gov.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'.
Copyright © 2010–2015 Planetary Data System. All rights reserved.