Class TrackBuilderPlugin
- All Implemented Interfaces:
MediaPackageElementBuilderPlugin
MediaPackageElementBuilderPlugin recognizes video tracks and provides the
functionality of reading it on behalf of the media package.-
Field Summary
Fields inherited from class org.opencastproject.mediapackage.elementbuilder.AbstractElementBuilderPlugin
mimeTypes, priority, xpath -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaccept(URI uri, MediaPackageElement.Type type, MediaPackageElementFlavor flavor) This method is called on every registered media package builder plugin until one of these plugins returnstrue.booleanaccept(MediaPackageElement.Type type, MediaPackageElementFlavor flavor) This method is called if the media package builder tries to create a new media package element of typeelementType.booleanThis method is called while the media package builder parses a media package manifest.elementFromManifest(Node elementNode, MediaPackageSerializer serializer) Creates a media package element from the DOM element.elementFromURI(URI uri) Creates a media package element from the given url that was previously accepted.newElement(MediaPackageElement.Type type, MediaPackageElementFlavor flavor) Creates a new media package element of the specified type.toString()Methods inherited from class org.opencastproject.mediapackage.elementbuilder.AbstractElementBuilderPlugin
destroy, getPriority, init, setPriority
-
Constructor Details
-
TrackBuilderPlugin
public TrackBuilderPlugin()
-
-
Method Details
-
accept
Description copied from interface:MediaPackageElementBuilderPluginThis method is called if the media package builder tries to create a new media package element of typeelementType.Every registered builder plugin will then be asked whether it is able to create a media package element from the given element type. If this is the case for a plugin, it will then be asked to create such an element by a call to
MediaPackageElementBuilderPlugin.newElement(org.opencastproject.mediapackage.MediaPackageElement.Type,MediaPackageElementFlavor).- Parameters:
type- the typeflavor- the element flavor- Returns:
trueif the plugin is able to create such an element- See Also:
-
accept
Description copied from interface:MediaPackageElementBuilderPluginThis method is called while the media package builder parses a media package manifest.Every registered builder plugin will then be asked, whether it is able to create a media package element from the given element definition.
The element must then be constructed and returned in the call to
MediaPackageElementBuilderPlugin.elementFromManifest(Node, MediaPackageSerializer).- Parameters:
elementNode- the node- Returns:
trueif the plugin is able to create such an element- See Also:
-
accept
Description copied from interface:MediaPackageElementBuilderPluginThis method is called on every registered media package builder plugin until one of these plugins returnstrue. If no plugin recognises the file, it is rejected.The parameters
typeandflavormay be taken as strong hints and may both benull.Implementers schould return the correct mime type for the given file if they are absolutely sure about the file. Otherwise,
nullshould be returned.- Parameters:
uri- the element locationtype- the element typeflavor- the element flavor- Returns:
trueif the plugin can handle the element- See Also:
-
elementFromURI
Description copied from interface:MediaPackageElementBuilderPluginCreates a media package element from the given url that was previously accepted.- Parameters:
uri- the element location- Returns:
- the new media package element
- Throws:
UnsupportedElementException- if creating the media package element fails- See Also:
-
newElement
public MediaPackageElement newElement(MediaPackageElement.Type type, MediaPackageElementFlavor flavor) Description copied from interface:MediaPackageElementBuilderPluginCreates a new media package element of the specified type.- Parameters:
type- the element typeflavor- the element flavor- Returns:
- the new media package element
- See Also:
-
elementFromManifest
public MediaPackageElement elementFromManifest(Node elementNode, MediaPackageSerializer serializer) throws UnsupportedElementException Description copied from interface:MediaPackageElementBuilderPluginCreates a media package element from the DOM element.- Parameters:
elementNode- the DOM nodeserializer- the media package serializer- Returns:
- the media package element
- Throws:
UnsupportedElementException- See Also:
-
toString
-