org.apache.oodt.cas.catalog.mapping
Class LuceneIngestMapper

java.lang.Object
  extended by org.apache.oodt.cas.catalog.mapping.LuceneIngestMapper
All Implemented Interfaces:
IngestMapper

public class LuceneIngestMapper
extends Object
implements IngestMapper

Version:
$Revision$

A Ingest Mapper that indexes to a Lucene index

Author:
bfoster

Constructor Summary
LuceneIngestMapper()
           
 
Method Summary
 void deleteAllMappingsForCatalog(String catalogId)
           
 void deleteAllMappingsForCatalogServiceTransactionId(TransactionId<?> catalogServiceTransactionId)
           
 void deleteTransactionIdMapping(TransactionId<?> catalogTransactionId, String catalogId)
           
 Set<String> getCatalogIds(TransactionId<?> catalogServiceTransactionId)
          Get all the Catalog URNs for which the given TransactionId was mapped
 CatalogReceipt getCatalogReceipt(TransactionId<?> catalogServiceTransactionId, String catalogId)
           
 TransactionId<?> getCatalogServiceTransactionId(TransactionId<?> catalogTransactionId, String catalogId)
          Get the CatalogService TransactionId that was mapped to the given Catalog URN and Catalog TransactionId
 TransactionId<?> getCatalogTransactionId(TransactionId<?> catalogServiceTransactionId, String catalogId)
          Get the Catalog TransactionId that was mapped to the given Catalog ID and CatalogService TransactionId
 Set<TransactionId<?>> getPageOfCatalogTransactionIds(IndexPager indexPager, String catalogId)
           
 boolean hasCatalogServiceTransactionId(TransactionId<?> catalogServiceTransactionId)
          Verify if the given CatalogService TransactionId has been stored in a mapping storeTransactionIdMapping(String, TransactionId>, TransactionId>)
 void storeTransactionIdMapping(TransactionId<?> catalogServiceTransactionId, TransactionIdFactory catalogServiceTransactionIdFactory, CatalogReceipt catalogReceipt, TransactionIdFactory catalogTransactionIdFactory)
          Maps the three arguments to each other so any of the others can be retrieved via one of the other arguments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneIngestMapper

public LuceneIngestMapper()
Method Detail

deleteAllMappingsForCatalog

public void deleteAllMappingsForCatalog(String catalogId)
                                 throws CatalogRepositoryException
Specified by:
deleteAllMappingsForCatalog in interface IngestMapper
Throws:
CatalogRepositoryException

deleteAllMappingsForCatalogServiceTransactionId

public void deleteAllMappingsForCatalogServiceTransactionId(TransactionId<?> catalogServiceTransactionId)
                                                     throws CatalogRepositoryException
Specified by:
deleteAllMappingsForCatalogServiceTransactionId in interface IngestMapper
Throws:
CatalogRepositoryException

deleteTransactionIdMapping

public void deleteTransactionIdMapping(TransactionId<?> catalogTransactionId,
                                       String catalogId)
                                throws CatalogRepositoryException
Specified by:
deleteTransactionIdMapping in interface IngestMapper
Throws:
CatalogRepositoryException

getCatalogReceipt

public CatalogReceipt getCatalogReceipt(TransactionId<?> catalogServiceTransactionId,
                                        String catalogId)
                                 throws CatalogRepositoryException
Specified by:
getCatalogReceipt in interface IngestMapper
Returns:
Throws:
CatalogRepositoryException

getCatalogServiceTransactionId

public TransactionId<?> getCatalogServiceTransactionId(TransactionId<?> catalogTransactionId,
                                                       String catalogId)
                                                throws CatalogRepositoryException
Description copied from interface: IngestMapper
Get the CatalogService TransactionId that was mapped to the given Catalog URN and Catalog TransactionId

Specified by:
getCatalogServiceTransactionId in interface IngestMapper
Parameters:
catalogTransactionId - A Catalog TransactionId
catalogId - A unique Catalog ID when the Catalog TransactionId was used
Returns:
The CatalogService TransactionId which was mapped to the given Catalog TransactionId and Catalog ID
Throws:
CatalogRepositoryException - Any Error

getCatalogTransactionId

public TransactionId<?> getCatalogTransactionId(TransactionId<?> catalogServiceTransactionId,
                                                String catalogId)
                                         throws CatalogRepositoryException
Description copied from interface: IngestMapper
Get the Catalog TransactionId that was mapped to the given Catalog ID and CatalogService TransactionId

Specified by:
getCatalogTransactionId in interface IngestMapper
Parameters:
catalogServiceTransactionId - A Catalog TransactionId
catalogId - A unique Catalog ID when the Catalog TransactionId was used
Returns:
The CatalogService TransactionId which was mapped to the given Catalog TransactionId and Catalog ID
Throws:
CatalogRepositoryException - Any Error

getCatalogIds

public Set<String> getCatalogIds(TransactionId<?> catalogServiceTransactionId)
                          throws CatalogRepositoryException
Description copied from interface: IngestMapper
Get all the Catalog URNs for which the given TransactionId was mapped

Specified by:
getCatalogIds in interface IngestMapper
Parameters:
catalogServiceTransactionId - A CatalogService TransactionId
Returns:
Catalog IDs for which the given TransactionId was mapped
Throws:
CatalogRepositoryException - Any Error

getPageOfCatalogTransactionIds

public Set<TransactionId<?>> getPageOfCatalogTransactionIds(IndexPager indexPager,
                                                            String catalogId)
                                                     throws CatalogRepositoryException
Specified by:
getPageOfCatalogTransactionIds in interface IngestMapper
Throws:
CatalogRepositoryException

hasCatalogServiceTransactionId

public boolean hasCatalogServiceTransactionId(TransactionId<?> catalogServiceTransactionId)
                                       throws CatalogRepositoryException
Description copied from interface: IngestMapper
Verify if the given CatalogService TransactionId has been stored in a mapping storeTransactionIdMapping(String, TransactionId>, TransactionId>)

Specified by:
hasCatalogServiceTransactionId in interface IngestMapper
Parameters:
catalogServiceTransactionId - The CatalogService TransactionId in question
Returns:
True is the catalogServiceTransactionId has been used in a used in a mapping
Throws:
CatalogRepositoryException - Any error

storeTransactionIdMapping

public void storeTransactionIdMapping(TransactionId<?> catalogServiceTransactionId,
                                      TransactionIdFactory catalogServiceTransactionIdFactory,
                                      CatalogReceipt catalogReceipt,
                                      TransactionIdFactory catalogTransactionIdFactory)
                               throws CatalogRepositoryException
Description copied from interface: IngestMapper
Maps the three arguments to each other so any of the others can be retrieved via one of the other arguments

Specified by:
storeTransactionIdMapping in interface IngestMapper
Parameters:
catalogServiceTransactionId - TransactionId generated by the CatalogService
Throws:
CatalogRepositoryException - Any error


Copyright © 1999-2013
Apache OODT. All Rights Reserved.