|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.oodt.cas.catalog.system.impl.CatalogServiceLocal
public class CatalogServiceLocal
A Calatog Service that manages Metadata via one or more underlying Catalogs
| Nested Class Summary | |
|---|---|
protected class |
CatalogServiceLocal.QueryResult
|
protected class |
CatalogServiceLocal.QueryResultGroup
|
| Field Summary | |
|---|---|
protected CatalogRepository |
catalogRepository
|
protected Set<Catalog> |
catalogs
|
protected ReadWriteLock |
catalogsLock
|
protected int |
crossCatalogResultSortingThreshold
|
protected boolean |
disableIntersectingCrossCatalogQueries
|
protected IngestMapper |
ingestMapper
|
protected ReadWriteLock |
ingestMapperLock
|
protected boolean |
oneCatalogFailsAllFail
|
protected File |
pluginStorageDir
|
protected boolean |
restrictIngestPermissions
|
protected boolean |
restrictQueryPermissions
|
protected boolean |
simplifyQueries
|
protected TransactionIdFactory |
transactionIdFactory
|
| Fields inherited from interface org.apache.oodt.cas.catalog.system.CatalogService |
|---|
CATALOG_ID_MET_KEY, CATALOG_IDS_MET_KEY, CATALOG_SERVICE_TRANSACTION_ID_MET_KEY, CATALOG_TRANSACTION_ID_MET_KEY, ENABLE_UPDATE_MET_KEY |
| Constructor Summary | |
|---|---|
CatalogServiceLocal(CatalogRepository catalogRepository,
IngestMapper ingestMapper,
File pluginStorageDir,
TransactionIdFactory transactionIdFactory,
boolean restrictQueryPermissions,
boolean restrictIngestPermissions,
boolean oneCatalogFailsAllFail,
boolean simplifyQueries,
boolean disableIntersectingCrossCatalogQueries,
int crossCatalogResultSortingThreshold)
|
|
| Method Summary | |
|---|---|
List<TransactionReceipt> |
_query(QueryExpression queryExpression,
Set<String> catalogIds)
|
void |
addCatalog(Catalog catalog)
Ability to dynamically add a Catalog to this CatalogService for managing |
void |
addCatalog(String catalogId,
Index index)
|
void |
addCatalog(String catalogId,
Index index,
List<Dictionary> dictionaries)
|
void |
addCatalog(String catalogId,
Index index,
List<Dictionary> dictionaries,
boolean restrictQueryPermission,
boolean restrictIngestPermission)
|
void |
addDictionary(String catalogId,
Dictionary dictionary)
|
void |
addPluginUrls(List<PluginURL> urls)
|
protected boolean |
containsCatalog(String catalogId)
|
protected boolean |
containsTranactionReceipts(List<CatalogServiceLocal.QueryResult> queryResults)
|
protected boolean |
containsUnbalancedCatalogInterest(List<CatalogServiceLocal.QueryResult> queryResults)
|
void |
delete(Metadata metadata)
|
protected boolean |
doReduce(Metadata metadata)
|
protected TransactionId<?> |
generateNewUniqueTransactionId()
|
protected TransactionId<?> |
generateTransactionId(String stringTransactionId)
|
List<TransactionalMetadata> |
getAllPages(QueryPager queryPager)
|
Properties |
getCalalogProperties()
|
Properties |
getCalalogProperties(String catalogUrn)
|
protected Catalog |
getCatalog(String catalogUrn)
|
TransactionId<?> |
getCatalogServiceTransactionId(CatalogReceipt catalogReceipt,
boolean generateNew)
|
protected TransactionId<?> |
getCatalogServiceTransactionId(Metadata metadata)
|
protected TransactionId<?> |
getCatalogServiceTransactionId(Metadata metadata,
boolean generateNew)
|
TransactionId<?> |
getCatalogServiceTransactionId(TransactionId<?> catalogTransactionId,
String catalogUrn)
|
List<TransactionId<?>> |
getCatalogServiceTransactionIds(List<TransactionId<?>> catalogTransactionIds,
String catalogUrn)
|
Set<String> |
getCurrentCatalogIds()
|
Set<Catalog> |
getCurrentCatalogList()
|
protected Set<Catalog> |
getFilteredCatalogList(Metadata metadata)
|
protected HashSet<String> |
getInterestedCatalogs(QueryExpression queryExpression,
Set<String> restrictToCatalogIds)
|
protected List<CatalogReceipt> |
getIntersection(List<CatalogServiceLocal.QueryResult> queryResults)
|
List<TransactionalMetadata> |
getMetadata(List<TransactionReceipt> transactionReceipts)
|
List<TransactionalMetadata> |
getMetadata(Page page)
|
List<TransactionalMetadata> |
getMetadataFromTransactionIds(List<TransactionId<?>> catalogServiceTransactionIds)
|
List<TransactionalMetadata> |
getMetadataFromTransactionIdStrings(List<String> catalogServiceTransactionIdStrings)
|
Page |
getNextPage(Page page)
|
List<TransactionalMetadata> |
getNextPage(QueryPager queryPager)
|
Page |
getPage(PageInfo pageInfo,
QueryExpression queryExpression)
|
Page |
getPage(PageInfo pageInfo,
QueryExpression queryExpression,
Set<String> catalogIds)
|
protected Page |
getPage(QueryExpression queryExpression,
Set<String> restrictToCatalogIds,
QueryPager queryPager)
|
URL |
getPluginStorageDir()
|
List<PluginURL> |
getPluginUrls()
|
protected List<TransactionReceipt> |
getPossiblyUnindexedTransactionReceipts(List<CatalogReceipt> catalogReceipts)
|
List<String> |
getProperty(String key)
|
protected List<TransactionReceipt> |
indexReceipts(List<TransactionReceipt> transactionReceipts)
|
TransactionReceipt |
ingest(Metadata metadata)
|
boolean |
isRestrictIngestPermissions()
Returns true if this CatalogService is restricting any ingestions from being made to the Catalogs it is managing |
boolean |
isRestrictQueryPermissions()
Returns true if this CatalogService is restricting any queries from being made to the Catalogs it is managing |
protected void |
modifyCatalog(String catalogId,
List<Dictionary> dictionaries,
Index index,
Boolean restrictQueryPermission,
Boolean restrictIngestPermission)
|
void |
modifyIngestPermission(String catalogId,
boolean restrictIngestPermission)
|
void |
modifyQueryPermission(String catalogId,
boolean restrictQueryPermission)
|
QueryPager |
query(QueryExpression queryExpression)
|
QueryPager |
query(QueryExpression queryExpression,
Set<String> catalogIds)
|
protected CatalogServiceLocal.QueryResult |
queryRecur(QueryExpression queryExpression,
Set<String> restrictToCatalogIds)
|
protected QueryExpression |
reduceToUnderstoodExpressions(Catalog catalog,
QueryExpression queryExpression)
|
void |
removeCatalog(String catalogUrn)
|
void |
removeCatalog(String catalogId,
boolean preserveMapping)
|
void |
replaceCatalog(Catalog catalog)
Ability to dynamically add a Catalog to this CatalogService for managing |
void |
replaceDictionaries(String catalogId,
List<Dictionary> dictionaries)
|
void |
replaceIndex(String catalogId,
Index index)
|
protected void |
setCatalogRepository(CatalogRepository catalogRepository)
Set the CatalogRepository for this CatalogService, with replace existing CatalogRepository and immediately load all Catalogs from it. |
protected void |
setIngestMapper(IngestMapper ingestMapper)
|
void |
setPluginStorageDir(File pluginStorageDir)
|
protected void |
setRestrictIngestPermissions(boolean restrictIngestPermissions)
Modify this CatalogServices ingest restriction, default is false. |
protected void |
setRestrictQueryPermissions(boolean restrictQueryPermissions)
Modify this CatalogServices query restriction, default is false. |
protected void |
setTransactionIdFactory(TransactionIdFactory transactionIdFactory)
|
void |
shutdown()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Set<Catalog> catalogs
protected ReadWriteLock catalogsLock
protected CatalogRepository catalogRepository
protected IngestMapper ingestMapper
protected ReadWriteLock ingestMapperLock
protected boolean restrictQueryPermissions
protected boolean restrictIngestPermissions
protected TransactionIdFactory transactionIdFactory
protected File pluginStorageDir
protected boolean oneCatalogFailsAllFail
protected boolean simplifyQueries
protected boolean disableIntersectingCrossCatalogQueries
protected int crossCatalogResultSortingThreshold
| Constructor Detail |
|---|
public CatalogServiceLocal(CatalogRepository catalogRepository,
IngestMapper ingestMapper,
File pluginStorageDir,
TransactionIdFactory transactionIdFactory,
boolean restrictQueryPermissions,
boolean restrictIngestPermissions,
boolean oneCatalogFailsAllFail,
boolean simplifyQueries,
boolean disableIntersectingCrossCatalogQueries,
int crossCatalogResultSortingThreshold)
throws InstantiationException
InstantiationException| Method Detail |
|---|
protected void setCatalogRepository(CatalogRepository catalogRepository)
throws CatalogServiceException
repository - The CatalogRepository to be used by this CatalogService
CatalogServiceException - On Error loading given CatalogRepositoryprotected void setIngestMapper(IngestMapper ingestMapper)
public void shutdown()
throws CatalogServiceException
shutdown in interface CatalogServiceCatalogServiceExceptionpublic boolean isRestrictQueryPermissions()
isRestrictQueryPermissions in interface CatalogServiceprotected void setRestrictQueryPermissions(boolean restrictQueryPermissions)
restrictQueryPermissions - True to block all querys to managing
Catalogs or false to leave it at a per Catalog bases.public boolean isRestrictIngestPermissions()
isRestrictIngestPermissions in interface CatalogServiceprotected void setRestrictIngestPermissions(boolean restrictIngestPermissions)
restrictIngestPermissions - True to block all ingestions to managing
Catalogs or false to leave it at a per Catalog bases.protected void setTransactionIdFactory(TransactionIdFactory transactionIdFactory)
transactionIdClass -
public void addCatalog(String catalogId,
Index index)
throws CatalogServiceException
addCatalog in interface CatalogServiceCatalogServiceException
public void addCatalog(String catalogId,
Index index,
List<Dictionary> dictionaries)
throws CatalogServiceException
addCatalog in interface CatalogServiceCatalogServiceException
public void addCatalog(String catalogId,
Index index,
List<Dictionary> dictionaries,
boolean restrictQueryPermission,
boolean restrictIngestPermission)
throws CatalogServiceException
addCatalog in interface CatalogServiceCatalogServiceException
public void addDictionary(String catalogId,
Dictionary dictionary)
throws CatalogServiceException
addDictionary in interface CatalogServiceCatalogServiceException
public void replaceDictionaries(String catalogId,
List<Dictionary> dictionaries)
throws CatalogServiceException
replaceDictionaries in interface CatalogServiceCatalogServiceException
public void replaceIndex(String catalogId,
Index index)
throws CatalogServiceException
replaceIndex in interface CatalogServiceCatalogServiceException
public void modifyIngestPermission(String catalogId,
boolean restrictIngestPermission)
throws CatalogServiceException
modifyIngestPermission in interface CatalogServiceCatalogServiceException
public void modifyQueryPermission(String catalogId,
boolean restrictQueryPermission)
throws CatalogServiceException
modifyQueryPermission in interface CatalogServiceCatalogServiceException
protected void modifyCatalog(String catalogId,
List<Dictionary> dictionaries,
Index index,
Boolean restrictQueryPermission,
Boolean restrictIngestPermission)
throws CatalogServiceException
CatalogServiceException
protected boolean containsCatalog(String catalogId)
throws CatalogServiceException
CatalogServiceException
public void addCatalog(Catalog catalog)
throws CatalogServiceException
addCatalog in interface CatalogServicecatalog - Catalog for this CatalogService to manage
CatalogServiceException - If one of the adding Catalog
URNs equals that of an existing Catalog.
public void replaceCatalog(Catalog catalog)
throws CatalogServiceException
replaceCatalog in interface CatalogServicecatalog - Catalog for this CatalogService to manageallowOverride - True to allow adding Catalog to override existing Catalog with same URN
CatalogServiceException - When allowOverride=false and one of the adding Catalog
URNs equals that of an existing Catalog.
public void removeCatalog(String catalogUrn)
throws CatalogServiceException
removeCatalog in interface CatalogServiceCatalogServiceException
public void removeCatalog(String catalogId,
boolean preserveMapping)
throws CatalogServiceException
catalogUrn -
CatalogServiceExceptionpublic void setPluginStorageDir(File pluginStorageDir)
public URL getPluginStorageDir()
throws CatalogServiceException
getPluginStorageDir in interface CatalogServiceCatalogServiceException
public List<PluginURL> getPluginUrls()
throws CatalogServiceException
getPluginUrls in interface CatalogServiceCatalogServiceException
public void addPluginUrls(List<PluginURL> urls)
throws CatalogServiceException
addPluginUrls in interface CatalogServiceCatalogServiceException
public Set<Catalog> getCurrentCatalogList()
throws CatalogServiceException
CatalogServiceException
protected Catalog getCatalog(String catalogUrn)
throws CatalogServiceException
CatalogServiceException
public Set<String> getCurrentCatalogIds()
throws CatalogServiceException
getCurrentCatalogIds in interface CatalogServiceCatalogServiceException
public TransactionReceipt ingest(Metadata metadata)
throws CatalogServiceException
ingest in interface CatalogServiceCatalogServiceException
public void delete(Metadata metadata)
throws CatalogServiceException
delete in interface CatalogServicemetadata -
CatalogServiceExceptionprotected boolean doReduce(Metadata metadata)
public List<String> getProperty(String key)
throws CatalogServiceException
getProperty in interface CatalogServiceCatalogServiceException
public Properties getCalalogProperties()
throws CatalogServiceException
getCalalogProperties in interface CatalogServiceCatalogServiceException
public Properties getCalalogProperties(String catalogUrn)
throws CatalogServiceException
getCalalogProperties in interface CatalogServiceCatalogServiceException
public Page getNextPage(Page page)
throws CatalogServiceException
getNextPage in interface CatalogServiceCatalogServiceException
public Page getPage(PageInfo pageInfo,
QueryExpression queryExpression)
throws CatalogServiceException
getPage in interface CatalogServiceCatalogServiceException
public Page getPage(PageInfo pageInfo,
QueryExpression queryExpression,
Set<String> catalogIds)
throws CatalogServiceException
getPage in interface CatalogServiceCatalogServiceException
public QueryPager query(QueryExpression queryExpression)
throws CatalogServiceException
query in interface CatalogServiceCatalogServiceException
public List<TransactionalMetadata> getMetadata(Page page)
throws CatalogServiceException
getMetadata in interface CatalogServiceCatalogServiceException
protected Page getPage(QueryExpression queryExpression,
Set<String> restrictToCatalogIds,
QueryPager queryPager)
throws CatalogServiceException
CatalogServiceException
public QueryPager query(QueryExpression queryExpression,
Set<String> catalogIds)
throws CatalogServiceException
query in interface CatalogServiceCatalogServiceException
public List<TransactionReceipt> _query(QueryExpression queryExpression,
Set<String> catalogIds)
throws CatalogServiceException
queryExpression - indexPage -
CatalogServiceException
protected List<TransactionReceipt> getPossiblyUnindexedTransactionReceipts(List<CatalogReceipt> catalogReceipts)
throws CatalogServiceException
CatalogServiceException
protected List<TransactionReceipt> indexReceipts(List<TransactionReceipt> transactionReceipts)
throws CatalogServiceException
CatalogServiceException
public List<TransactionalMetadata> getNextPage(QueryPager queryPager)
throws CatalogServiceException
getNextPage in interface CatalogServiceCatalogServiceException
public List<TransactionalMetadata> getAllPages(QueryPager queryPager)
throws CatalogServiceException
getAllPages in interface CatalogServiceCatalogServiceException
public List<TransactionalMetadata> getMetadataFromTransactionIdStrings(List<String> catalogServiceTransactionIdStrings)
throws CatalogServiceException
getMetadataFromTransactionIdStrings in interface CatalogServiceCatalogServiceException
public List<TransactionalMetadata> getMetadata(List<TransactionReceipt> transactionReceipts)
throws CatalogServiceException
CatalogServiceException
public List<TransactionalMetadata> getMetadataFromTransactionIds(List<TransactionId<?>> catalogServiceTransactionIds)
throws CatalogServiceException
getMetadataFromTransactionIds in interface CatalogServiceCatalogServiceException
public List<TransactionId<?>> getCatalogServiceTransactionIds(List<TransactionId<?>> catalogTransactionIds,
String catalogUrn)
throws CatalogServiceException
getCatalogServiceTransactionIds in interface CatalogServiceCatalogServiceException
public TransactionId<?> getCatalogServiceTransactionId(TransactionId<?> catalogTransactionId,
String catalogUrn)
throws CatalogServiceException
getCatalogServiceTransactionId in interface CatalogServiceCatalogServiceException
public TransactionId<?> getCatalogServiceTransactionId(CatalogReceipt catalogReceipt,
boolean generateNew)
throws CatalogServiceException
getCatalogServiceTransactionId in interface CatalogServiceCatalogServiceExceptionprotected TransactionId<?> generateNewUniqueTransactionId()
protected TransactionId<?> generateTransactionId(String stringTransactionId)
protected TransactionId<?> getCatalogServiceTransactionId(Metadata metadata)
throws Exception
Exception
protected TransactionId<?> getCatalogServiceTransactionId(Metadata metadata,
boolean generateNew)
throws CatalogServiceException
CatalogServiceException
protected Set<Catalog> getFilteredCatalogList(Metadata metadata)
throws CatalogServiceException
CatalogServiceException
protected CatalogServiceLocal.QueryResult queryRecur(QueryExpression queryExpression,
Set<String> restrictToCatalogIds)
throws CatalogServiceException,
CatalogException
CatalogServiceException
CatalogExceptionprotected List<CatalogReceipt> getIntersection(List<CatalogServiceLocal.QueryResult> queryResults)
protected QueryExpression reduceToUnderstoodExpressions(Catalog catalog,
QueryExpression queryExpression)
throws CatalogDictionaryException,
CatalogException
CatalogDictionaryException
CatalogExceptionprotected boolean containsTranactionReceipts(List<CatalogServiceLocal.QueryResult> queryResults)
protected boolean containsUnbalancedCatalogInterest(List<CatalogServiceLocal.QueryResult> queryResults)
protected HashSet<String> getInterestedCatalogs(QueryExpression queryExpression,
Set<String> restrictToCatalogIds)
throws CatalogException,
CatalogServiceException
CatalogException
CatalogServiceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||