Package org.mycore.ocfl
Class MCROCFLXMLClassificationManager
java.lang.Object
org.mycore.ocfl.MCROCFLXMLClassificationManager
- All Implemented Interfaces:
MCRXMLClassificationManager
OCFL File Manager for MyCoRe Classifications
- Author:
- Tobias Lenhardt [Hammer1279]
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
buildFilePath
(MCRCategoryID mcrid) Build file path from ID, use for root classifications only!protected edu.wisc.library.ocfl.api.model.VersionInfo
buildVersionInfo
(String message, Date versionDate) protected static char
convertMessageToType
(String message) void
create
(MCRCategoryID mcrCg, MCRContent xml) void
delete
(MCRCategoryID mcrid) protected String
getOCFLObjectID
(MCRCategoryID mcrid) protected edu.wisc.library.ocfl.api.OcflRepository
retrieveContent
(MCRCategoryID mcrid, String revision) Load a Classification from the OCFL Store.void
update
(MCRCategoryID mcrCg, MCRContent xml) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.mycore.datamodel.common.MCRXMLClassificationManager
retrieveContent
-
Field Details
-
MESSAGE_CREATED
- See Also:
-
MESSAGE_UPDATED
- See Also:
-
MESSAGE_DELETED
- See Also:
-
repositoryKey
-
MESSAGE_TYPE_MAPPING
-
-
Constructor Details
-
MCROCFLXMLClassificationManager
public MCROCFLXMLClassificationManager()
-
-
Method Details
-
convertMessageToType
- Throws:
MCRPersistenceException
-
getRepository
- Throws:
ClassCastException
-
create
- Throws:
IOException
-
update
- Throws:
IOException
-
delete
- Throws:
IOException
-
retrieveContent
Load a Classification from the OCFL Store.- Specified by:
retrieveContent
in interfaceMCRXMLClassificationManager
- Parameters:
mcrid
- ID of the Categoryrevision
- Revision of the Category ornull
for HEAD- Returns:
- Content of the Classification
- Throws:
IOException
-
getOCFLObjectID
-
buildFilePath
Build file path from ID, use for root classifications only!- Parameters:
mcrid
- The ID to the Classification- Returns:
- The Path to the File.
- Throws:
MCRUsageException
- if the Category is not a root classification
-
buildVersionInfo
-