Class MCRFileStore

java.lang.Object
org.mycore.datamodel.ifs2.MCRStore
org.mycore.datamodel.ifs2.MCRFileStore

public class MCRFileStore extends MCRStore
Stores file collections containing files and directories. For each store, properties must be defined, for example MCR.IFS2.Store.ID.Class=org.mycore.datamodel.ifs2.MCRFileStore MCR.IFS2.Store.ID.BaseDir=/foo/bar MCR.IFS2.Store.ID.SlotLayout=4-2-2
Author:
Frank Lützenkirchen
  • Constructor Details

    • MCRFileStore

      public MCRFileStore()
  • Method Details

    • create

      public MCRFileCollection create() throws IOException
      Creates and stores a new, empty file collection using the next free ID in the store.
      Returns:
      a newly created file collection
      Throws:
      IOException
    • create

      public MCRFileCollection create(int id) throws IOException
      Creates and stores a new, empty file collection with the given ID
      Parameters:
      id - the ID of the file collection
      Returns:
      a newly created file collection
      Throws:
      IOException - when a file collection with the given ID already exists
    • delete

      public void delete(int id) throws IOException
      Description copied from class: MCRStore
      Deletes the data stored under the given ID from the store
      Overrides:
      delete in class MCRStore
      Parameters:
      id - the ID of the document to be deleted
      Throws:
      IOException
    • retrieve

      public MCRFileCollection retrieve(int id) throws IOException
      Returns the file collection stored under the given ID, or null when no collection is stored for the given ID.
      Parameters:
      id - the file collection's ID
      Returns:
      the file collection with the given ID, or null
      Throws:
      IOException
    • repairAllMetadata

      public void repairAllMetadata() throws IOException
      Repairs metadata of all file collections stored here
      Throws:
      IOException