gov.nasa.pds.citool.ingestor
Class CatalogRegistryIngester

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

public class CatalogRegistryIngester
extends Object


Field Summary
static int failCount
           
static int fileObjCount
           
static int registryCount
           
static String registryPackageName
           
static int storageCount
           
 
Constructor Summary
CatalogRegistryIngester(String registryURL)
          Constructor
CatalogRegistryIngester(String registryURL, gov.nasa.pds.registry.client.SecurityContext securityContext, String username, String password)
          Constructor with security context
 
Method Summary
 boolean associationExists(gov.nasa.pds.registry.model.Association association)
          Determines whether an association is already in the registry
 void createRegistryPackage()
           
 gov.nasa.pds.registry.model.ExtrinsicObject getExtrinsic(String lid)
           
 gov.nasa.pds.registry.model.ExtrinsicObject getExtrinsic(String lid, String version)
          Retrieve an extrinsic object from the registry
 StorageIngester getStorageIngester()
          Return storage ingester instance
 String ingest(CatalogObject catObj)
          Method to ingest given catalog object to the registry service It calls ingestExtrinsicObject() for the product registry.
 String ingestExtrinsicObject(CatalogObject catObj)
          Ingest an extrinsic object to the registry service
 int ingestHKExtrinsicObject(CatalogObject catObj)
          Ingest housekeeping extrinsic object(s) to the registry service
 boolean productExists(String lid)
          Determines whether a product is already in the registry.
 void publishAssociation(CatalogObject catObj, Reference ref)
          Publish assocation with one reference info
 void publishAssociations(CatalogObject catObj)
          Method to publish associations with given catalog object
 void setArchiveStatus(String status)
           
 void setStorageService(String storageURL, String productName)
          Set parameters for the storage service instance
 void setTransportURL(String transportURL)
          Set URL of the transport service
 void updateProduct(CatalogObject catObj, Map<String,List<String>> refs)
          Add reference information as slot values then, update the registered product
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fileObjCount

public static int fileObjCount

storageCount

public static int storageCount

registryCount

public static int registryCount

failCount

public static int failCount

registryPackageName

public static String registryPackageName
Constructor Detail

CatalogRegistryIngester

public CatalogRegistryIngester(String registryURL)
Constructor

Parameters:
registryURL - The URL to the registry service

CatalogRegistryIngester

public CatalogRegistryIngester(String registryURL,
                               gov.nasa.pds.registry.client.SecurityContext securityContext,
                               String username,
                               String password)
Constructor with security context

Parameters:
registryURL - The URL to the registry service
securityContext - context required for the security service
username - Name of the user
password - Password
Method Detail

getStorageIngester

public StorageIngester getStorageIngester()
Return storage ingester instance


setStorageService

public void setStorageService(String storageURL,
                              String productName)
                       throws org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException
Set parameters for the storage service instance

Parameters:
storageURL - the URL of the storage service
productName - Product name used in the storage service
Throws:
org.apache.oodt.cas.filemgr.structs.exceptions.ConnectionException

setTransportURL

public void setTransportURL(String transportURL)
Set URL of the transport service

Parameters:
transportURL - the URL of the transport service

setArchiveStatus

public void setArchiveStatus(String status)

ingest

public String ingest(CatalogObject catObj)
Method to ingest given catalog object to the registry service It calls ingestExtrinsicObject() for the product registry. Then, it calls ingestFileObject() for the corresponding file object registry.

Parameters:
catObj - a Catalog Object instance
Returns:
the guid of the registered extrinsic object

ingestExtrinsicObject

public String ingestExtrinsicObject(CatalogObject catObj)
Ingest an extrinsic object to the registry service

Parameters:
catObj - a catalog object
Returns:
the guid of the registered extrinsic object

ingestHKExtrinsicObject

public int ingestHKExtrinsicObject(CatalogObject catObj)
Ingest housekeeping extrinsic object(s) to the registry service

Parameters:
catObj - a catalog object
Returns:
the guid of the registered extrinsic object

updateProduct

public void updateProduct(CatalogObject catObj,
                          Map<String,List<String>> refs)
Add reference information as slot values then, update the registered product

Parameters:
catObj - a CatalogObject of the registered extrinsic object
refs - Hashmap that holds reference information

publishAssociations

public void publishAssociations(CatalogObject catObj)
Method to publish associations with given catalog object

Parameters:
catObj - a catalog object

publishAssociation

public void publishAssociation(CatalogObject catObj,
                               Reference ref)
Publish assocation with one reference info

Parameters:
catObj - an instance of CatalogObject
ref - an instance of Reference

associationExists

public boolean associationExists(gov.nasa.pds.registry.model.Association association)
                          throws gov.nasa.pds.registry.exception.RegistryClientException
Determines whether an association is already in the registry

Parameters:
assocation - The association object
Returns:
'true' if the association was found in the registry. 'false' otherwise
Throws:
gov.nasa.pds.registry.exception.RegistryClientException - exception ignored.

productExists

public boolean productExists(String lid)
                      throws gov.nasa.pds.registry.exception.RegistryClientException
Determines whether a product is already in the registry.

Parameters:
lid - The PDS4 logical identifier.
Returns:
'true' if the logical identifier was found in the registry. 'false' otherwise.
Throws:
gov.nasa.pds.registry.exception.RegistryClientException - exception ignored.

getExtrinsic

public gov.nasa.pds.registry.model.ExtrinsicObject getExtrinsic(String lid)

getExtrinsic

public gov.nasa.pds.registry.model.ExtrinsicObject getExtrinsic(String lid,
                                                                String version)
Retrieve an extrinsic object from the registry

Parameters:
lid - The PDS4 logical identifier
version - The versionName
Returns:
an extrinsic object

createRegistryPackage

public void createRegistryPackage()


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