gov.nasa.pds.harvest.ingest
Class RegistryIngester

java.lang.Object
  extended by gov.nasa.pds.harvest.ingest.RegistryIngester
All Implemented Interfaces:
gov.nasa.jpl.oodt.cas.filemgr.ingest.Ingester

public class RegistryIngester
extends Object
implements gov.nasa.jpl.oodt.cas.filemgr.ingest.Ingester

Class that supports ingestion of PDS4 products into the PDS registry.

Author:
mcayanan

Constructor Summary
RegistryIngester()
          Default constructor.
RegistryIngester(String user, String token)
          Constructor.
 
Method Summary
 boolean hasProduct(URL registry, File prodFile)
          Method not used at this time.
 boolean hasProduct(URL registry, String productID)
          Determines whether a product is already in the registry.
 boolean hasProduct(URL registry, String productID, String productVersion)
          Determines whether a version of a product is already in the registry.
 String ingest(URL registry, File prodFile, gov.nasa.jpl.oodt.cas.metadata.Metadata met)
          Ingests the product into the registry.
 String ingest(URL fmUrl, File prodFile, gov.nasa.jpl.oodt.cas.metadata.MetExtractor extractor, File metConfFile)
          Method not implemented at this time.
 void ingest(URL fmUrl, List<String> prodFiles, gov.nasa.jpl.oodt.cas.metadata.MetExtractor extractor, File metConfFile)
          Method not implemented at this time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistryIngester

public RegistryIngester()
Default constructor.


RegistryIngester

public RegistryIngester(String user,
                        String token)
Constructor.

Parameters:
user - An authorized user.
token - The security token that allows the authorized user to ingest products into the registry.
Method Detail

hasProduct

public boolean hasProduct(URL registry,
                          File prodFile)
                   throws gov.nasa.jpl.oodt.cas.filemgr.structs.exceptions.CatalogException
Method not used at this time.

Specified by:
hasProduct in interface gov.nasa.jpl.oodt.cas.filemgr.ingest.Ingester
Throws:
gov.nasa.jpl.oodt.cas.filemgr.structs.exceptions.CatalogException

hasProduct

public boolean hasProduct(URL registry,
                          String productID)
                   throws gov.nasa.jpl.oodt.cas.filemgr.structs.exceptions.CatalogException
Determines whether a product is already in the registry.

Specified by:
hasProduct in interface gov.nasa.jpl.oodt.cas.filemgr.ingest.Ingester
Parameters:
registry - The URL to the registry service.
productID - The PDS4 logical identifier.
Returns:
'true' if the logical identifier was found in the registry.
Throws:
gov.nasa.jpl.oodt.cas.filemgr.structs.exceptions.CatalogException - If an error occurred while talking to the ingester.

hasProduct

public boolean hasProduct(URL registry,
                          String productID,
                          String productVersion)
                   throws gov.nasa.jpl.oodt.cas.filemgr.structs.exceptions.CatalogException
Determines whether a version of a product is already in the registry.

Parameters:
registry - The URL to the registry service.
productID - The PDS4 logical identifier.
productVersion - The version of the product.
Returns:
'true' if the logical identifier and version was found in the registry.
Throws:
gov.nasa.jpl.oodt.cas.filemgr.structs.exceptions.CatalogException - If an error occurred while talking to the ingester.

ingest

public String ingest(URL registry,
                     File prodFile,
                     gov.nasa.jpl.oodt.cas.metadata.Metadata met)
              throws gov.nasa.jpl.oodt.cas.filemgr.structs.exceptions.IngestException
Ingests the product into the registry.

Specified by:
ingest in interface gov.nasa.jpl.oodt.cas.filemgr.ingest.Ingester
Parameters:
registry - The URL to the registry service.
prodFile - The PDS4 product file.
met - The metadata to register.
Returns:
The URL of the registered product.
Throws:
gov.nasa.jpl.oodt.cas.filemgr.structs.exceptions.IngestException - If an error occurred while ingesting the product.

ingest

public String ingest(URL fmUrl,
                     File prodFile,
                     gov.nasa.jpl.oodt.cas.metadata.MetExtractor extractor,
                     File metConfFile)
              throws gov.nasa.jpl.oodt.cas.filemgr.structs.exceptions.IngestException
Method not implemented at this time.

Specified by:
ingest in interface gov.nasa.jpl.oodt.cas.filemgr.ingest.Ingester
Throws:
gov.nasa.jpl.oodt.cas.filemgr.structs.exceptions.IngestException

ingest

public void ingest(URL fmUrl,
                   List<String> prodFiles,
                   gov.nasa.jpl.oodt.cas.metadata.MetExtractor extractor,
                   File metConfFile)
            throws gov.nasa.jpl.oodt.cas.filemgr.structs.exceptions.IngestException
Method not implemented at this time.

Specified by:
ingest in interface gov.nasa.jpl.oodt.cas.filemgr.ingest.Ingester
Throws:
gov.nasa.jpl.oodt.cas.filemgr.structs.exceptions.IngestException


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