Package org.mycore.datamodel.ifs2
Class MCRStoredMetadata
java.lang.Object
org.mycore.datamodel.ifs2.MCRStoredMetadata
- Direct Known Subclasses:
MCRVersionedMetadata
Represents an XML metadata document that is stored in MCRMetadataStore.
- Author:
- Frank Lützenkirchen
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
Deletes the metadata document.int
getID()
Returns the ID of this metadata documentReturns the date this metadata document was last modifiedReturns the stored XML documentgetStore()
Returns the store this metadata document is stored inboolean
Returns true if this object is deletedvoid
setLastModified
(Date date) Sets the date this metadata document was last modifiedvoid
update
(MCRContent xml) Updates the stored XML document
-
Field Details
-
id
protected int idThe ID of the metadata document -
path
The file object in local filesystem storing the data -
store
The store this document is stored in -
deleted
protected boolean deleted
-
-
Method Details
-
update
Updates the stored XML document- Parameters:
xml
- the XML document to be stored- Throws:
JDOMException
- if content is not XML and correspondingMCRMetadataStore
forces MCRContent to be XMLIOException
-
getMetadata
Returns the stored XML document- Returns:
- the stored XML document
- Throws:
IOException
-
getID
public int getID()Returns the ID of this metadata document- Returns:
- the ID of this metadata document
-
getStore
Returns the store this metadata document is stored in- Returns:
- the store this metadata document is stored in
-
getLastModified
Returns the date this metadata document was last modified- Returns:
- the date this metadata document was last modified
- Throws:
IOException
-
setLastModified
Sets the date this metadata document was last modified- Parameters:
date
- the date this metadata document was last modified- Throws:
IOException
-
delete
Deletes the metadata document. This object is invalid afterwards, do not use it any more.- Throws:
IOException
-
isDeleted
Returns true if this object is deleted- Throws:
IOException
-