Package org.mycore.datamodel.ifs2
Class MCRMetadataVersion
java.lang.Object
org.mycore.datamodel.common.MCRAbstractMetadataVersion<MCRVersionedMetadata>
org.mycore.datamodel.ifs2.MCRMetadataVersion
Provides information about a stored version of metadata and allows to
retrieve that version from SVN
- Author:
- Frank Lützenkirchen
-
Nested Class Summary
Nested classes/interfaces inherited from class org.mycore.datamodel.common.MCRAbstractMetadataVersion
MCRAbstractMetadataVersion.Type
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMCRMetadataVersion
(MCRVersionedMetadata vm, String revision, String user, Date date, char type) -
Method Summary
Methods inherited from class org.mycore.datamodel.common.MCRAbstractMetadataVersion
getDate, getMetadataObject, getRevision, getType, getUser
-
Constructor Details
-
MCRMetadataVersion
public MCRMetadataVersion(MCRVersionedMetadata vm, String revision, String user, Date date, char type)
-
-
Method Details
-
retrieve
Retrieves this version of the metadata- Specified by:
retrieve
in classMCRAbstractMetadataVersion<MCRVersionedMetadata>
- Returns:
- the metadata document as it was in this version
- Throws:
MCRUsageException
- if this is a deleted version, which can not be retrievedIOException
-
restore
Replaces the current version of the metadata object with this version, which means that a new version is created that is identical to this old version. The stored metadata document is updated to this old version of the metadata.- Specified by:
restore
in classMCRAbstractMetadataVersion<MCRVersionedMetadata>
- Throws:
IOException
JDOMException
-