| 
Esri Geoportal Server 1.0 
 | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.gpt.framework.sql.BaseDao
com.esri.gpt.catalog.context.CatalogIndexAdapter
com.esri.gpt.catalog.lucene.LuceneIndexAdapter
public class LuceneIndexAdapter
Maintains a Lucene index of approved metadata documents.
| Field Summary | |
|---|---|
static String | 
BATCH_INDEXWRITER_KEY
 | 
| Constructor Summary | |
|---|---|
LuceneIndexAdapter(RequestContext requestContext)
Constructs with an associated request context.  | 
|
| Method Summary | |
|---|---|
 void | 
closeSearcher(IndexSearcher searcher)
Closes an index searcher.  | 
protected  void | 
closeWriter(IndexWriter writer)
Closes an index writer.  | 
 int | 
countDocuments()
Counts the documents within the index.  | 
 void | 
deleteDocuments(String[] uuids)
Deletes a collection of documents from the index.  | 
protected  Logger | 
getLogger()
Gets the logger.  | 
protected  LuceneConfig | 
getLuceneConfig()
Gets the Lucene configuration.  | 
 Analyzer | 
newAnalyzer()
Makes an analyzer for catalog documents.  | 
 IndexSearcher | 
newSearcher()
Makes a searcher for catalog documents.  | 
protected  IndexWriter | 
newWriter()
Makes a writer for catalog documents.  | 
 Lock | 
obtainBackgroundLock()
Obtains a write lock intended for background synchronization and optimization processes.  | 
 void | 
publishDocument(String uuid,
                Timestamp updateDate,
                Schema schema,
                String acl)
Publishes a document to the index based upon a metadata schema.  | 
 void | 
purgeIndex()
Purges the entire catalog index.  | 
 String[] | 
queryAcls(String uuid)
Queries the ACL values indexed for a document.  | 
 Timestamp | 
queryModifiedDate(String uuid)
Queries the system modified date associated with an indexed document.  | 
 void | 
touch()
Opens and closes a writer.  | 
| Methods inherited from class com.esri.gpt.catalog.context.CatalogIndexAdapter | 
|---|
deleteDocument, publishDocument | 
| Methods inherited from class com.esri.gpt.framework.sql.BaseDao | 
|---|
appendExpression, appendValueFilter, closeResultSet, closeStatement, getApplicationConfiguration, getRequestContext, logExpression, returnConnection, setRequestContext | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final String BATCH_INDEXWRITER_KEY
| Constructor Detail | 
|---|
public LuceneIndexAdapter(RequestContext requestContext)
requestContext - the request context| Method Detail | 
|---|
protected Logger getLogger()
getLogger in class CatalogIndexAdapterprotected LuceneConfig getLuceneConfig()
public void closeSearcher(IndexSearcher searcher)
searcher - the searcher to close.protected void closeWriter(IndexWriter writer)
writer - the writer to close.
public int countDocuments()
                   throws CatalogIndexException
countDocuments in class CatalogIndexAdapterCatalogIndexException - if an exception occurs
public void deleteDocuments(String[] uuids)
                     throws CatalogIndexException
deleteDocuments in class CatalogIndexAdapteruuids - the collection of document UUIDS to delete
CatalogIndexException - if an exception occurspublic Analyzer newAnalyzer()
public IndexSearcher newSearcher()
                          throws CorruptIndexException,
                                 IOException
CorruptIndexException - if the index is corrupt
IOException - if the directory cannot be read/written to, 
         or if it does not exist and create is false or if there is any 
         other low-level IO error
protected IndexWriter newWriter()
                         throws CorruptIndexException,
                                LockObtainFailedException,
                                IOException
CorruptIndexException - if the index is corrupt
LockObtainFailedException - if another writer has this index 
         open (write.lock could not be obtained)
IOException - if the directory cannot be read/written to, 
         or if it does not exist and create is false or if there is any 
         other low-level IO error
public Lock obtainBackgroundLock()
                          throws LockObtainFailedException
LockObtainFailedException - if the lock wwas not obtained
public void publishDocument(String uuid,
                            Timestamp updateDate,
                            Schema schema,
                            String acl)
                     throws CatalogIndexException
CatalogIndexAdapter
publishDocument in class CatalogIndexAdapteruuid - the document's UUIDupdateDate - the document's update dateschema - the evaluated schema associated with the document to be indexedacl - an XML string represent the access control information associated
        the document (if null, no ACL information is indexed)
CatalogIndexException - if an exception occurs
public void purgeIndex()
                throws CatalogIndexException
purgeIndex in class CatalogIndexAdapterCatalogIndexException - if an exception occurs
public String[] queryAcls(String uuid)
                   throws CatalogIndexException
queryAcls in class CatalogIndexAdapteruuid - the document UUID
CatalogIndexException - if an exception occurs
public Timestamp queryModifiedDate(String uuid)
                            throws CatalogIndexException
queryModifiedDate in class CatalogIndexAdapteruuid - the document UUID
CatalogIndexException - if an exception occurs
public void touch()
           throws CatalogIndexException
CatalogIndexException - if an exception occurs
  | 
Esri Geoportal Server 1.0 
 | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||