public class AttachmentBuilderPlugin extends AbstractAttachmentBuilderPlugin implements MediaPackageElementBuilder
MediaPackageElementBuilderPlugin recognizes arbitrary attachments and creates
media package element representations for them.
A media package element is considered an attachment by this plugin if it is of type Attachment and does not
have any specializing flavor.
flavor, typemimeTypes, priority, xpath| Constructor and Description |
|---|
AttachmentBuilderPlugin() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Node elementNode)
This implementation of
accept tests for the correct node type (attachment). |
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. |
int |
getPriority()
Returns -1 by default.
|
String |
toString() |
accept, elementFromManifest, elementFromURI, elementFromURI, newElement, specializeAttachmentdestroy, init, setPriorityclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitelementFromManifest, elementFromURI, elementFromURI, newElementpublic 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.
accept in interface MediaPackageElementBuilderPluginaccept in class AbstractAttachmentBuilderPluginuri - the element locationtype - the element typeflavor - the element flavortrue if the plugin can handle the elementAbstractAttachmentBuilderPlugin.accept(URI,
org.opencastproject.mediapackage.MediaPackageElement.Type ,
org.opencastproject.mediapackage.MediaPackageElementFlavor)public boolean accept(Node elementNode)
AbstractAttachmentBuilderPluginaccept tests for the correct node type (attachment).accept in interface MediaPackageElementBuilderPluginaccept in class AbstractAttachmentBuilderPluginelementNode - the nodetrue if the plugin is able to create such an elementAbstractAttachmentBuilderPlugin.accept(org.w3c.dom.Node)public int getPriority()
-1 as its priority.getPriority in class AbstractElementBuilderPluginAbstractElementBuilderPlugin.getPriority()public String toString()
toString in class AbstractAttachmentBuilderPluginObject.toString()Copyright © 2009–2020 Opencast Project. All rights reserved.