Class MCRStoredMetadata

java.lang.Object
org.mycore.datamodel.ifs2.MCRStoredMetadata
Direct Known Subclasses:
MCRVersionedMetadata

public class MCRStoredMetadata extends Object
Represents an XML metadata document that is stored in MCRMetadataStore.
Author:
Frank Lützenkirchen
  • Field Details

    • id

      protected int id
      The ID of the metadata document
    • path

      protected Path path
      The file object in local filesystem storing the data
    • store

      protected MCRMetadataStore store
      The store this document is stored in
    • deleted

      protected boolean deleted
  • Method Details

    • update

      public void update(MCRContent xml) throws IOException, JDOMException
      Updates the stored XML document
      Parameters:
      xml - the XML document to be stored
      Throws:
      JDOMException - if content is not XML and corresponding MCRMetadataStore forces MCRContent to be XML
      IOException
    • getMetadata

      public MCRContent getMetadata() throws IOException
      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

      public MCRMetadataStore getStore()
      Returns the store this metadata document is stored in
      Returns:
      the store this metadata document is stored in
    • getLastModified

      public Date getLastModified() throws IOException
      Returns the date this metadata document was last modified
      Returns:
      the date this metadata document was last modified
      Throws:
      IOException
    • setLastModified

      public void setLastModified(Date date) throws IOException
      Sets the date this metadata document was last modified
      Parameters:
      date - the date this metadata document was last modified
      Throws:
      IOException
    • delete

      public void delete() throws IOException
      Deletes the metadata document. This object is invalid afterwards, do not use it any more.
      Throws:
      IOException
    • isDeleted

      public boolean isDeleted() throws IOException
      Returns true if this object is deleted
      Throws:
      IOException