|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.dlese.dpc.repository.indexing.CollectionIndexer
public class CollectionIndexer
Manage collections of records in a DDS repository.
| Constructor Summary | |
|---|---|
CollectionIndexer(RepositoryManager repositoryManager,
IndexingManager indexingManager)
Constructor for the CollectionIndexer object |
|
| Method Summary | |
|---|---|
void |
deleteCollection(String collectionKey)
Delete a collection and all its records from a DDS repository. |
void |
deletePreviousSessionRecords(CollectionIndexingSession currentSession)
Delete all records that DO NOT have the given session ID. |
void |
deleteRecord(String id)
Deletes a record in the repository. |
List |
getConfiguredCollections()
Get a list of the collections currently configured. |
static String |
getDateStamp()
Return a string for the current time and date, sutiable for display in log files and output to standout: |
protected CollectionIndexingSession |
getExistingCollectionIndexingSession(String sessionId)
Gets the existingCollectionIndexingSession attribute of the CollectionIndexer object |
CollectionIndexingSession |
getNewCollectionIndexingSession(String collectionKey)
Gets the newCollectionIndexingSession attribute of the CollectionIndexer object |
boolean |
isCollectionConfigured(String collectionKey)
Gets the collectionConfigured attribute of the CollectionIndexer object |
void |
printStatusMessage(String msg)
Post a status message to the indexing process to let admins know the current indexing status. |
void |
putCollection(String collectionKey,
String format,
String name,
String description,
String additionalMetadata)
Put a collection in the repository. |
void |
putRecord(String recordXml,
String collectionKey,
String id,
CollectionIndexingSession session)
Put a record in a collection, adding or replacing the given record in the repository. |
static void |
setDebug(boolean db)
Sets the debug attribute of the CollectionIndexer object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollectionIndexer(RepositoryManager repositoryManager,
IndexingManager indexingManager)
repositoryManager - The RepositoryManagerindexingManager - The IndexingManager| Method Detail |
|---|
public void putCollection(String collectionKey,
String format,
String name,
String description,
String additionalMetadata)
throws Exception
collectionKey - The collection key, for example 'dcc'format - The XML format for the records that will reside in the collectionname - A display name for the collectiondescription - A long description for the collectionadditionalMetadata - A text or XML string to be inserted into the additionalMetadata element of the
collection record, or null for none
Exception - If error
public void deleteCollection(String collectionKey)
throws Exception
collectionKey - The key indicatint the collection to delete
Exception - If errorpublic List getConfiguredCollections()
public boolean isCollectionConfigured(String collectionKey)
collectionKey - The key for the collection
public void putRecord(String recordXml,
String collectionKey,
String id,
CollectionIndexingSession session)
throws Exception
recordXml - The XML for this recordcollectionKey - The collection this record should be putid - The ID of the record - ignored if the ID can be derived from the record XMLsession - An indexing session ID - used for deleting records later after a new indexing
session occurs
Exception - If error
public void deleteRecord(String id)
throws Exception
id - Id of the record.
Exception - If errorpublic CollectionIndexingSession getNewCollectionIndexingSession(String collectionKey)
collectionKey - The collection
public void printStatusMessage(String msg)
msg - The message to postprotected CollectionIndexingSession getExistingCollectionIndexingSession(String sessionId)
sessionId - The session ID
public void deletePreviousSessionRecords(CollectionIndexingSession currentSession)
currentSession - The session IDpublic static String getDateStamp()
public static final void setDebug(boolean db)
db - The new debug value
|
DLESE Tools v1.6.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||