Class DublinCoreUtil
java.lang.Object
org.opencastproject.metadata.dublincore.DublinCoreUtil
Utility functions for DublinCores.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ChecksumCalculate an MD5 checksum for a DublinCore catalog.static booleanDefine equality on DublinCoreCatalogs.static List<XMLCatalogImpl.CatalogEntry> Return a sorted list of all catalog entries.static DublinCoreCatalogloadDublinCore(Workspace workspace, MediaPackageElement mpe) Load the DublinCore catalog identified bympe.static Optional<DublinCoreCatalog> loadEpisodeDublinCore(Workspace workspace, MediaPackage mediaPackage) Load the episode DublinCore catalog contained in a media package.
-
Method Details
-
loadEpisodeDublinCore
public static Optional<DublinCoreCatalog> loadEpisodeDublinCore(Workspace workspace, MediaPackage mediaPackage) Load the episode DublinCore catalog contained in a media package.- Returns:
- the catalog or none if the media package does not contain an episode DublinCore
-
loadDublinCore
Load the DublinCore catalog identified bympe. Throws an exception if it does not exist or cannot be loaded by any reason.- Returns:
- the catalog
-
equals
Define equality on DublinCoreCatalogs. Two DublinCores are considered equal if they have the same properties and if each property has the same values in the same order.Note: As long as http://opencast.jira.com/browse/MH-8759 is not fixed, the encoding scheme of values is not considered.
Implementation Note: DublinCores should not be compared by their string serialization since the ordering of properties is not defined and cannot be guaranteed between serializations.
-
getPropertiesSorted
Return a sorted list of all catalog entries. -
calculateChecksum
Calculate an MD5 checksum for a DublinCore catalog.
-