gov.nasa.pds.harvest.crawler.actions
Class RegistryUniquenessCheckerAction

java.lang.Object
  extended by gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction
      extended by gov.nasa.pds.harvest.crawler.actions.RegistryUniquenessCheckerAction
All Implemented Interfaces:
gov.nasa.jpl.oodt.cas.commons.spring.SpringSetIdInjectionType

public class RegistryUniquenessCheckerAction
extends gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction

A class to check whether a product's logical identifier (lid) and version ID (vid) have already been registered.

Author:
mcayanan

Field Summary
 
Fields inherited from class gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction
LOG, phases
 
Constructor Summary
RegistryUniquenessCheckerAction(String registryUrl, RegistryIngester ingester)
          Constructor.
 
Method Summary
 boolean performAction(File product, gov.nasa.jpl.oodt.cas.metadata.Metadata productMetadata)
          Action that checks to see if a product was already registerd.
 
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
 

Constructor Detail

RegistryUniquenessCheckerAction

public RegistryUniquenessCheckerAction(String registryUrl,
                                       RegistryIngester ingester)
Constructor.

Parameters:
registryUrl - The URL to the registry service.
ingester - The Registry Ingester.
Method Detail

performAction

public boolean performAction(File product,
                             gov.nasa.jpl.oodt.cas.metadata.Metadata productMetadata)
                      throws gov.nasa.jpl.oodt.cas.crawl.structs.exceptions.CrawlerActionException
Action that checks to see if a product was already registerd.

Specified by:
performAction in class gov.nasa.jpl.oodt.cas.crawl.action.CrawlerAction
Parameters:
product - The product file.
productMetadata - The metadata associatied with the given product.
Returns:
'false' if the product was already registered.
Throws:
gov.nasa.jpl.oodt.cas.crawl.structs.exceptions.CrawlerActionException


Copyright © 2010–2014 Planetary Data System. All rights reserved.