org.apache.oodt.cas.catalog.system
Class Catalog

java.lang.Object
  extended by org.apache.oodt.cas.catalog.system.Catalog

public class Catalog
extends Object

Version:
$Revision$

A Calatog is a communication interface between the CatalogService and an underlying database or index service

Author:
bfoster

Field Summary
protected  Vector<Dictionary> dictionaries
           
protected  String id
           
protected  Index index
           
protected  boolean restrictIngestPermissions
           
protected  boolean restrictQueryPermissions
           
 
Constructor Summary
Catalog(String id, Index index, List<Dictionary> dictionaries, boolean restrictQueryPermissions, boolean restrictIngestPermissions)
           
 
Method Summary
 void addDictionary(Dictionary dictionary)
           
protected  Metadata asMetadata(List<TermBucket> termBuckets)
           
 boolean delete(TransactionId<?> transactionId)
           
 boolean equals(Object obj)
           
 List<Dictionary> getDictionaries()
           
 String getId()
           
 Map<TransactionId<?>,Metadata> getMetadata(List<TransactionId<?>> transactionIds)
           
 Metadata getMetadata(TransactionId<?> transactionId)
           
protected  Metadata getMetadataFromBuckets(List<TermBucket> termBuckets)
           
 List<TransactionId<?>> getPage(IndexPager indexPage)
           
 Properties getProperties()
           
 String getProperty(String key)
           
protected  List<TermBucket> getTermBuckets(Metadata metadata)
           
 TransactionIdFactory getTransactionIdFactory()
           
 TransactionId<?> getTransactionIdFromString(String catalogTransactionId)
           
 int hashCode()
           
 boolean hasTransactionId(TransactionId<?> catalogTransactionid)
           
 CatalogReceipt ingest(Metadata metadata)
           
 boolean isIngestable()
           
 boolean isInterested(QueryExpression queryExpression)
           
 boolean isQueriable()
           
 List<CatalogReceipt> query(QueryExpression queryExpression)
           
 List<CatalogReceipt> query(QueryExpression queryExpression, int startIndex, int endIndex)
           
 boolean reduce(TransactionId<?> transactionId, Metadata metadata)
           
 void setDictionaries(List<Dictionary> dictionaries)
           
 void setIndex(Index index)
           
 void setRestrictIngestPermissions(boolean restrictIngestPermissions)
           
 void setRestrictQueryPermissions(boolean restrictQueryPermissions)
           
 int sizeOf(QueryExpression queryExpression)
           
 String toString()
           
 CatalogReceipt update(TransactionId<?> transactionId, Metadata metadata)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

dictionaries

protected Vector<Dictionary> dictionaries

index

protected Index index

id

protected String id

restrictQueryPermissions

protected boolean restrictQueryPermissions

restrictIngestPermissions

protected boolean restrictIngestPermissions
Constructor Detail

Catalog

public Catalog(String id,
               Index index,
               List<Dictionary> dictionaries,
               boolean restrictQueryPermissions,
               boolean restrictIngestPermissions)
Method Detail

getId

public String getId()

getTransactionIdFactory

public TransactionIdFactory getTransactionIdFactory()
                                             throws CatalogIndexException
Throws:
CatalogIndexException

setIndex

public void setIndex(Index index)

setDictionaries

public void setDictionaries(List<Dictionary> dictionaries)

getDictionaries

public List<Dictionary> getDictionaries()

addDictionary

public void addDictionary(Dictionary dictionary)

setRestrictQueryPermissions

public void setRestrictQueryPermissions(boolean restrictQueryPermissions)

setRestrictIngestPermissions

public void setRestrictIngestPermissions(boolean restrictIngestPermissions)

isQueriable

public boolean isQueriable()

isIngestable

public boolean isIngestable()

getPage

public List<TransactionId<?>> getPage(IndexPager indexPage)
                               throws CatalogIndexException
Throws:
CatalogIndexException

getTransactionIdFromString

public TransactionId<?> getTransactionIdFromString(String catalogTransactionId)
                                            throws IllegalArgumentException,
                                                   SecurityException,
                                                   InstantiationException,
                                                   IllegalAccessException,
                                                   InvocationTargetException,
                                                   NoSuchMethodException,
                                                   CatalogIndexException
Throws:
IllegalArgumentException
SecurityException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchMethodException
CatalogIndexException

hasTransactionId

public boolean hasTransactionId(TransactionId<?> catalogTransactionid)
                         throws CatalogIndexException
Throws:
CatalogIndexException

getProperty

public String getProperty(String key)
                   throws CatalogException
Throws:
CatalogException

getProperties

public Properties getProperties()
                         throws CatalogException
Throws:
CatalogException

ingest

public CatalogReceipt ingest(Metadata metadata)
                      throws CatalogException
Parameters:
transactionId -
metadata -
Returns:
TransactionId param if used by underlying catalog, otherwise the TransactionId generated and used by underlying catalog. if no TermBuckets where created from the Metadata then null is returned
Throws:
IngestServiceException
CatalogException

update

public CatalogReceipt update(TransactionId<?> transactionId,
                             Metadata metadata)
                      throws CatalogException
Throws:
CatalogException

delete

public boolean delete(TransactionId<?> transactionId)
               throws CatalogException
Throws:
CatalogException

reduce

public boolean reduce(TransactionId<?> transactionId,
                      Metadata metadata)
               throws CatalogException
Throws:
CatalogException

query

public List<CatalogReceipt> query(QueryExpression queryExpression)
                           throws CatalogException
Throws:
CatalogException

query

public List<CatalogReceipt> query(QueryExpression queryExpression,
                                  int startIndex,
                                  int endIndex)
                           throws CatalogException
Throws:
CatalogException

sizeOf

public int sizeOf(QueryExpression queryExpression)
           throws CatalogException
Throws:
CatalogException

getMetadata

public Metadata getMetadata(TransactionId<?> transactionId)
                     throws CatalogException
Throws:
CatalogException

getMetadata

public Map<TransactionId<?>,Metadata> getMetadata(List<TransactionId<?>> transactionIds)
                                           throws CatalogException
Throws:
CatalogException

isInterested

public boolean isInterested(QueryExpression queryExpression)
                     throws CatalogException
Throws:
CatalogException

getMetadataFromBuckets

protected Metadata getMetadataFromBuckets(List<TermBucket> termBuckets)
                                   throws CatalogDictionaryException
Throws:
CatalogDictionaryException

asMetadata

protected Metadata asMetadata(List<TermBucket> termBuckets)

getTermBuckets

protected List<TermBucket> getTermBuckets(Metadata metadata)
                                   throws CatalogDictionaryException
Throws:
CatalogDictionaryException

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


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