Package org.opencastproject.mediapackage
Class MediaPackageElementBuilderImpl
java.lang.Object
org.opencastproject.mediapackage.MediaPackageElementBuilderImpl
- All Implemented Interfaces:
MediaPackageElementBuilder
Default implementation for a media package element builder.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionelementFromManifest(Node node, MediaPackageSerializer serializer) Creates a media package element from the DOM element.elementFromURI(URI uri) Creates a media package element from the given file that was previously accepted.elementFromURI(URI uri, MediaPackageElement.Type type, MediaPackageElementFlavor flavor) Creates a media package element from the given file that was previously accepted, whiletypeandflavormay be taken as strong hints and may both benull.newElement(MediaPackageElement.Type type, MediaPackageElementFlavor flavor) Creates a new media package elment of the specified type.
-
Constructor Details
-
MediaPackageElementBuilderImpl
public MediaPackageElementBuilderImpl()
-
-
Method Details
-
elementFromURI
Description copied from interface:MediaPackageElementBuilderCreates a media package element from the given file that was previously accepted.Since only the file is given, it is possible, that the best builder plugin cannot be uniquely identified and may require additional contraints, e. g. a matching filename. Be sure to check the documentation of the corresponding plugin for details.
- Specified by:
elementFromURIin interfaceMediaPackageElementBuilder- Parameters:
uri- the element location- Returns:
- the new media package element
- Throws:
UnsupportedElementException- if creating the media package element fails- See Also:
-
elementFromURI
public MediaPackageElement elementFromURI(URI uri, MediaPackageElement.Type type, MediaPackageElementFlavor flavor) throws UnsupportedElementException Description copied from interface:MediaPackageElementBuilderCreates a media package element from the given file that was previously accepted, whiletypeandflavormay be taken as strong hints and may both benull.If only the file is given, it is possible, that the best suited builder plugin cannot be uniquely identified and may require additional contraints, e. g. a matching filename. Be sure to check the documentation of the corresponding builder plugin for details.
- Specified by:
elementFromURIin interfaceMediaPackageElementBuilder- Parameters:
uri- the element locationtype- the element typeflavor- the element flavor- Returns:
- the new media package element
- Throws:
UnsupportedElementException- if creating the media package element fails- See Also:
-
elementFromManifest
public MediaPackageElement elementFromManifest(Node node, MediaPackageSerializer serializer) throws UnsupportedElementException Description copied from interface:MediaPackageElementBuilderCreates a media package element from the DOM element.- Specified by:
elementFromManifestin interfaceMediaPackageElementBuilder- Parameters:
node- the DOM nodeserializer- the media package serializer- Returns:
- the media package element
- Throws:
UnsupportedElementException- if reading the file from manifest fails- See Also:
-
newElement
public MediaPackageElement newElement(MediaPackageElement.Type type, MediaPackageElementFlavor flavor) Description copied from interface:MediaPackageElementBuilderCreates a new media package elment of the specified type.- Specified by:
newElementin interfaceMediaPackageElementBuilder- Parameters:
type- the element typeflavor- the element flavor- Returns:
- the new media package element
- See Also:
-