|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.datamodel.ifs2.MCRStore
org.mycore.datamodel.ifs2.MCRMetadataStore
org.mycore.datamodel.ifs2.MCRVersioningMetadataStore
public class MCRVersioningMetadataStore
Stores metadata objects both in a local filesystem structure and in a Subversion repository. Changes can be tracked and restored. To enable versioning, configure the repository URL, for example MCR.IFS2.Store.DocPortal_document.SVNRepositoryURL=file:///foo/svnroot/
| Field Summary | |
|---|---|
protected static Logger |
LOGGER
|
protected org.tmatesoft.svn.core.SVNURL |
repURL
|
| Fields inherited from class org.mycore.datamodel.ifs2.MCRMetadataStore |
|---|
forceXML |
| Fields inherited from class org.mycore.datamodel.ifs2.MCRStore |
|---|
ASCENDING, DESCENDING, dir, id, idLength, lastID, offset, prefix, slotLength, stores, suffix |
| Constructor Summary | |
|---|---|
MCRVersioningMetadataStore()
|
|
| Method Summary | |
|---|---|
protected MCRVersionedMetadata |
buildMetadataObject(org.apache.commons.vfs.FileObject fo,
int id)
Builds a new stored metadata object in this store |
MCRVersionedMetadata |
create(MCRContent xml)
Stores a newly created document, using the next free ID. |
MCRVersionedMetadata |
create(MCRContent xml,
int id)
Stores a newly created document under the given ID. |
void |
delete(int id)
Deletes the data stored under the given ID from the store |
(package private) org.tmatesoft.svn.core.io.SVNRepository |
getRepository()
Returns the SVN repository used to manage metadata versions in this store. |
(package private) org.tmatesoft.svn.core.SVNURL |
getRepositoryURL()
Returns the URL of the SVN repository used to manage metadata versions in this store. |
static MCRVersioningMetadataStore |
getStore(String type)
Returns the store for the given metadata document type |
protected void |
init(String type)
Initializes a new metadata store instance. |
MCRVersionedMetadata |
retrieve(int id)
Returns the metadata stored under the given ID, or null. |
void |
updateAll()
Updates all stored metadata to the latest revision in SVN |
| Methods inherited from class org.mycore.datamodel.ifs2.MCRMetadataStore |
|---|
shouldForceXML |
| Methods inherited from class org.mycore.datamodel.ifs2.MCRStore |
|---|
delete, exists, getBaseDir, getHighestStoredID, getID, getNextFreeID, getSlot, getSlotPath, getSlotPaths, listIDs |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Logger LOGGER
protected org.tmatesoft.svn.core.SVNURL repURL
| Constructor Detail |
|---|
public MCRVersioningMetadataStore()
| Method Detail |
|---|
public static MCRVersioningMetadataStore getStore(String type)
type - the type of metadata to store
protected void init(String type)
MCRMetadataStore
init in class MCRMetadataStoretype - the document type that is stored in this store
org.tmatesoft.svn.core.io.SVNRepository getRepository()
throws Exception
Exception
org.tmatesoft.svn.core.SVNURL getRepositoryURL()
throws Exception
Exception
public MCRVersionedMetadata create(MCRContent xml,
int id)
throws Exception
MCRMetadataStore
create in class MCRMetadataStorexml - the XML document to be storedid - the ID under which the document should be stored
Exception
public MCRVersionedMetadata create(MCRContent xml)
throws Exception
MCRMetadataStore
create in class MCRMetadataStorexml - the XML document to be stored
Exception
public MCRVersionedMetadata retrieve(int id)
throws Exception
retrieve in class MCRMetadataStoreid - the ID of the XML document
Exception
public void updateAll()
throws Exception
Exception
public void delete(int id)
throws Exception
MCRStore
delete in class MCRStoreid - the ID of the document to be deleted
Exception
protected MCRVersionedMetadata buildMetadataObject(org.apache.commons.vfs.FileObject fo,
int id)
MCRMetadataStore
buildMetadataObject in class MCRMetadataStorefo - the FileObject that stores the dataid - the ID of the metadata object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||