public class PublicationBuilderPlugin extends AbstractElementBuilderPlugin
mimeTypes, priority, xpath| Constructor and Description |
|---|
PublicationBuilderPlugin() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(MediaPackageElement.Type type,
MediaPackageElementFlavor flavor)
This method is called if the media package builder tries to create a new media package element of type
elementType. |
boolean |
accept(Node elementNode)
This method is called while the media package builder parses a media package manifest.
|
boolean |
accept(URI uri,
MediaPackageElement.Type type,
MediaPackageElementFlavor flavor)
This method is called on every registered media package builder plugin until one of these plugins returns
true. |
MediaPackageElement |
elementFromManifest(Node elementNode,
MediaPackageSerializer serializer)
Creates a media package element from the DOM element.
|
MediaPackageElement |
elementFromURI(URI uri)
Creates a media package element from the given url that was previously accepted.
|
MediaPackageElement |
newElement(MediaPackageElement.Type type,
MediaPackageElementFlavor flavor)
Creates a new media package element of the specified type.
|
destroy, getPriority, init, setPrioritypublic boolean accept(MediaPackageElement.Type type, MediaPackageElementFlavor flavor)
MediaPackageElementBuilderPluginelementType.
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).
type - the typeflavor - the element flavortrue if the plugin is able to create such an elementpublic boolean accept(URI uri, MediaPackageElement.Type type, MediaPackageElementFlavor flavor)
MediaPackageElementBuilderPlugintrue. If no plugin recognises the file, it is rejected.
The parameters type and flavor may be taken as strong hints and may both be
null.
Implementers schould return the correct mime type for the given file if they are absolutely sure about the file.
Otherwise, null should be returned.
uri - the element locationtype - the element typeflavor - the element flavortrue if the plugin can handle the elementpublic boolean accept(Node elementNode)
MediaPackageElementBuilderPluginEvery 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).
elementNode - the nodetrue if the plugin is able to create such an elementpublic MediaPackageElement elementFromURI(URI uri) throws UnsupportedElementException
MediaPackageElementBuilderPluginuri - the element locationUnsupportedElementException - if creating the media package element failspublic MediaPackageElement elementFromManifest(Node elementNode, MediaPackageSerializer serializer) throws UnsupportedElementException
MediaPackageElementBuilderPluginelementNode - the DOM nodeserializer - the media package serializerUnsupportedElementExceptionpublic MediaPackageElement newElement(MediaPackageElement.Type type, MediaPackageElementFlavor flavor)
MediaPackageElementBuilderPlugintype - the element typeflavor - the element flavorCopyright © 2009–2021 Opencast Project. All rights reserved.