|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.schemedit.repository.RepositoryWriter
public class RepositoryWriter
The class includes methods to create, copy, and put Records to the main Repository, and RepositoryWriterPlugins if so configured.
Constructor Summary | |
---|---|
protected |
RepositoryWriter(ServletContext servletContext)
Constructor for the RepositoryWriter object |
Method Summary | |
---|---|
void |
addPlugin(RepositoryWriterPlugin plugin)
Register a RepositoryWriterPlugin. |
protected boolean |
deleteCollection(CollectionConfig config)
Delete a collection from the local repository. |
protected boolean |
deleteRecord(String recId,
DcsDataRecord dcsDataRecord)
Delete a record from the repository. |
List |
getPlugins()
Gets the registered RepositoryWriterPlugins |
protected void |
init()
NOT YET DOCUMENTED |
void |
removePlugin(RepositoryWriterPlugin plugin)
Unregister a RepositoryWriterPlugin. |
protected void |
writeRecord(String recordXml,
String xmlFormat,
String collection,
String id,
DcsDataRecord dcsDataRecord)
Writes provided metadata to the index and to other registered repositories, such as the NDR. |
protected void |
writeRecord(String recId,
String recordXml,
XMLDocReader docReader,
DcsDataRecord dcsDataRecord)
Convenience method for RepositoryServices calls that have the docReader handy, calls writeRecord after computing required params. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected RepositoryWriter(ServletContext servletContext)
servletContext
- NOT YET DOCUMENTEDMethod Detail |
---|
public void addPlugin(RepositoryWriterPlugin plugin)
plugin
- the RepositoryWriterPluginpublic void removePlugin(RepositoryWriterPlugin plugin)
plugin
- the RepositoryWriterPluginpublic List getPlugins()
protected void writeRecord(String recId, String recordXml, XMLDocReader docReader, DcsDataRecord dcsDataRecord) throws RecordUpdateException, Exception
recId
- metadata record idrecordXml
- metadata record as xml stringdocReader
- docReader for metadatadcsDataRecord
- dcsDataRecord for metadata
RecordUpdateException
- if record cannot be written to index
Exception
- NOT YET DOCUMENTEDprotected void writeRecord(String recordXml, String xmlFormat, String collection, String id, DcsDataRecord dcsDataRecord) throws RecordUpdateException, Exception
First try to write to the external repository. This attempt may fail before the record has been indexed the first time, if a RepositoryWriterPlugin required the index (as the NDR plugin does). In this case, a syncError is registered in the index.
recordXml
- metadata record as xml stringxmlFormat
- format of metadatacollection
- collection key of metadata record (e.g.,
"dcc")id
- metadata record iddcsDataRecord
- dcsDataRecord for metadata
RecordUpdateException
- if record cannot be written to index
Exception
- NOT YET DOCUMENTEDprotected boolean deleteRecord(String recId, DcsDataRecord dcsDataRecord) throws Exception
Current plugin exception policy: If there is a pluginError, the record is NOT deleted, but instead it is re-indexed as a sync-error.
recId
- NOT YET DOCUMENTEDdcsDataRecord
- NOT YET DOCUMENTED
Exception
- NOT YET DOCUMENTEDprotected boolean deleteCollection(CollectionConfig config) throws Exception
RepositoryService
config
- NOT YET DOCUMENTED
Exception
- NOT YET DOCUMENTEDprotected void init() throws Exception
Exception
- NOT YET DOCUMENTED
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |