|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.datamodel.ifs2.MCRStoredMetadata
org.mycore.datamodel.ifs2.MCRVersionedMetadata
public class MCRVersionedMetadata
Represents an XML metadata document that is stored in a local filesystem store and in parallel in a Subversion repository to track and restore changes.
| Field Summary | |
|---|---|
protected static Logger |
LOGGER
The logger |
protected long |
revision
The revision number of the metadata version that is currently in the local filesystem store. |
| Fields inherited from class org.mycore.datamodel.ifs2.MCRStoredMetadata |
|---|
fo, id, store |
| Constructor Summary | |
|---|---|
MCRVersionedMetadata(MCRMetadataStore store,
org.apache.commons.vfs.FileObject fo,
int id)
Creates a new metadata object both in the local store and in the SVN repository |
|
| Method Summary | |
|---|---|
(package private) void |
commit(String mode)
|
(package private) void |
create(MCRContent xml)
Stores a new metadata object first in the SVN repository, then additionally in the local store. |
void |
delete()
Deletes this metadata object in the SVN repository, and in the local store. |
long |
getRevision()
Returns the revision number of the version currently stored in the local filesystem store. |
MCRVersioningMetadataStore |
getStore()
Returns the store this metadata document is stored in |
boolean |
isUpToDate()
Checks if the version in the local store is up to date with the latest version in SVN repository |
List<MCRMetadataVersion> |
listVersions()
Lists all versions of this metadata object available in the subversion repository |
void |
update()
Updates the version stored in the local filesystem to the latest version from Subversion repository HEAD. |
void |
update(MCRContent xml)
Updates this metadata object, first in the SVN repository and then in the local store |
| Methods inherited from class org.mycore.datamodel.ifs2.MCRStoredMetadata |
|---|
getID, getLastModified, getMetadata, isDeleted, setLastModified |
| 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 long revision
| Constructor Detail |
|---|
MCRVersionedMetadata(MCRMetadataStore store,
org.apache.commons.vfs.FileObject fo,
int id)
store - the store this object is stored info - the file storing the data in the local filesystemid - the id of the metadata object| Method Detail |
|---|
public MCRVersioningMetadataStore getStore()
MCRStoredMetadata
getStore in class MCRStoredMetadata
void create(MCRContent xml)
throws Exception
create in class MCRStoredMetadataxml - the metadata document to store
Exception
public void update(MCRContent xml)
throws Exception
update in class MCRStoredMetadataxml - the new version of the document metadata
Exception
void commit(String mode)
throws Exception
Exception
public void delete()
throws Exception
delete in class MCRStoredMetadataException
public void update()
throws Exception
Exception
public List<MCRMetadataVersion> listVersions()
throws Exception
Exceptionpublic long getRevision()
public boolean isUpToDate()
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||