org.mycore.datamodel.ifs
Interface MCRFileMetadataStore

All Known Implementing Classes:
MCRHIBFileMetadataStore

public interface MCRFileMetadataStore

Implementations of this class can be used to store the metadata of all MCRFilesystemNodes in a persistent datastore. While MCRContentStores hold a file's content, this store holds its descriptive data like the directory structure, file type, checksum and size. There can only be one instance to be used in a system, that instance is configured by the property MCR.Persistence.IFS.FileMetadataStore.Class

Version:
$Revision: 13085 $ $Date: 2008-02-06 18:27:24 +0100 (Mi, 06 Feb 2008) $
Author:
Frank Lützenkirchen
See Also:
MCRFileMetadataManager, MCRFilesystemNode, MCRContentStore

Method Summary
 void deleteNode(String ID)
          Deletes all data of a given MCRFilesystemNode in the persistent metadata store.
 MCRFilesystemNode retrieveChild(String parentID, String name)
          Retrieves a child node of an MCRDirectory from the persistent store.
 Vector retrieveChildrenIDs(String parentID)
          Returns a list of the IDs of all children of a given parent MCRDirectory.
 MCRFilesystemNode retrieveNode(String ID)
          Retrieves the MCRFilesystemNode with that ID from the persistent store.
 String retrieveRootNodeID(String ownerID)
          Retrieves the root MCRFilesystemNode that has no parent and is owned by the object with the given owner ID.
 void storeNode(MCRFilesystemNode node)
          Creates or updates the data of the given node in the persistent store.
 

Method Detail

storeNode

void storeNode(MCRFilesystemNode node)
               throws MCRPersistenceException
Creates or updates the data of the given node in the persistent store.

Parameters:
node - the MCRFilesystemNode to be stored
Throws:
MCRPersistenceException

retrieveNode

MCRFilesystemNode retrieveNode(String ID)
                               throws MCRPersistenceException
Retrieves the MCRFilesystemNode with that ID from the persistent store.

Parameters:
ID - the unique ID of the MCRFilesystemNode
Returns:
the node with that ID, or null if no such node exists
Throws:
MCRPersistenceException

retrieveChild

MCRFilesystemNode retrieveChild(String parentID,
                                String name)
                                throws MCRPersistenceException
Retrieves a child node of an MCRDirectory from the persistent store.

Parameters:
parentID - the unique ID of the parent MCRDirectory
name - the filename of the child node in that directory
Returns:
the child MCRFilesystemNode, or null if no such node exists
Throws:
MCRPersistenceException

retrieveRootNodeID

String retrieveRootNodeID(String ownerID)
                          throws MCRPersistenceException
Retrieves the root MCRFilesystemNode that has no parent and is owned by the object with the given owner ID.

Parameters:
ownerID - the ID of the owner of the root node.
Returns:
an MCRFilesystemNode that has no parent and this owner ID, or null if no such node exists
Throws:
MCRPersistenceException

retrieveChildrenIDs

Vector retrieveChildrenIDs(String parentID)
                           throws MCRPersistenceException
Returns a list of the IDs of all children of a given parent MCRDirectory.

Parameters:
parentID - the ID of the parent MCRDirectory
Returns:
a Vector of String objects that are the IDs of all child nodes in that directory
Throws:
MCRPersistenceException

deleteNode

void deleteNode(String ID)
                throws MCRPersistenceException
Deletes all data of a given MCRFilesystemNode in the persistent metadata store.

Parameters:
ID - the unique ID of the MCRFilesystemNode to delete
Throws:
MCRPersistenceException