gov.nasa.pds.citool.ingestor
Class StorageIngester

java.lang.Object
  extended by gov.nasa.pds.citool.ingestor.StorageIngester

public class StorageIngester
extends Object

Class that will ingest registered products to the PDS Storage Service.

Author:
hyunlee

Constructor Summary
StorageIngester(URL storageServerUrl)
          Constructor.
 
Method Summary
 org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient getFMClient()
          Returns the File Manager client.
 org.apache.oodt.cas.filemgr.structs.Product getProductById(String productId)
          Gets a product by given product id
 org.apache.oodt.cas.filemgr.structs.Product getProductByName(String productName)
          Gets a product by given name
 String ingestToStorage(CatalogObject catObj)
          Ingests a file object and gets a product id from the storage server.
 void setProductName(String productName)
          Sets the product name for the storage service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StorageIngester

public StorageIngester(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

setProductName

public void setProductName(String productName)
Sets the product name for the storage service


getFMClient

public org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient getFMClient()
Returns the File Manager client.


ingestToStorage

public String ingestToStorage(CatalogObject catObj)
Ingests a file object and gets a product id from the storage server.

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.

getProductById

public org.apache.oodt.cas.filemgr.structs.Product getProductById(String productId)
Gets a product by given product id

Parameters:
productId - The ID of the product
Returns:
The storage service product if the product is exists on the storage server. Otherwise, a null will be returned.

getProductByName

public org.apache.oodt.cas.filemgr.structs.Product getProductByName(String productName)
Gets a product by given name

Parameters:
productName - The name of the product
Returns:
The storage service product if the product is exists on the storage server. Otherwise, a null will be returned.


Copyright © 2010-2013 Planetary Data System. All Rights Reserved.