Package org.opencastproject.metadata
Class StaticMetadataServiceMediaPackageImpl
java.lang.Object
org.opencastproject.metadata.StaticMetadataServiceMediaPackageImpl
- All Implemented Interfaces:
MetadataService<StaticMetadata>,StaticMetadataService
This service provides
StaticMetadata for a given mediapackage, based on the
information in the media package itself.
todo unit tests will follow-
Field Summary
FieldsFields inherited from interface org.opencastproject.metadata.api.MetadataService
PRIORITY_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidGets the metadata for aMediaPackageif possible.intThe priority of this MetadataService compared to others when more than one is registered in the system.voidsetWorkspace(Workspace workspace)
-
Field Details
-
priority
protected int priority -
workspace
-
-
Constructor Details
-
StaticMetadataServiceMediaPackageImpl
public StaticMetadataServiceMediaPackageImpl()
-
-
Method Details
-
setWorkspace
-
activate
-
getMetadata
Gets the metadata for aMediaPackageif possible. If no metadata can be extracted from the catalogs in theMediaPackage, this returns null;- Specified by:
getMetadatain interfaceMetadataService<StaticMetadata>- Parameters:
mp- The mediapackage to inspect for catalogs- Returns:
- The metadata extracted from the media package
- See Also:
-
getPriority
public int getPriority()The priority of this MetadataService compared to others when more than one is registered in the system. When more than one MetadataService is registered, theMetadataService.getMetadata(MediaPackage)method may be called on each service in order of priority. Metadata objects returned by higher priority MetadataServices should override those returned by lower priority services. The lowest number is the highest priority (i.e. 1 is a higher priority than 2).- Specified by:
getPriorityin interfaceMetadataService<StaticMetadata>- Returns:
- The priority
- See Also:
-