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 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
 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
 String ingestFileObject(CatalogObject catObj)
           
 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 setStorageService(String storageURL, String productName)
          Set parameters for the storage service instace
 void setTransportURL(String transportURL)
           
 void updateProduct(CatalogObject catObj)
          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
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)
Set parameters for the storage service instace

Parameters:
storageURL - the URL of the storage service
productName - Product name used in the storage service

setTransportURL

public void setTransportURL(String transportURL)

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.


ingestFileObject

public String ingestFileObject(CatalogObject catObj)

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

updateProduct

public void updateProduct(CatalogObject catObj)
Add reference information as slot values then, update the registered product


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.

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.

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


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