Interface MediaPackageElementBuilder

All Known Implementing Classes:
AttachmentBuilderPlugin, MediaPackageElementBuilderImpl

public interface MediaPackageElementBuilder
A media package element builder provides factory methods for the creation and loading of media package elements from files.
  • Method Details

    • elementFromURI

      Creates 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.

      Parameters:
      uri - the element location
      Returns:
      the new media package element
      Throws:
      UnsupportedElementException - if creating the media package element fails
    • elementFromURI

      Creates a media package element from the given file that was previously accepted, while type and flavor may be taken as strong hints and may both be null.

      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.

      Parameters:
      uri - the element location
      type - the element type
      flavor - the element flavor
      Returns:
      the new media package element
      Throws:
      UnsupportedElementException - if creating the media package element fails
    • elementFromManifest

      MediaPackageElement elementFromManifest(Node elementNode, MediaPackageSerializer serializer) throws UnsupportedElementException
      Creates a media package element from the DOM element.
      Parameters:
      elementNode - the DOM node
      serializer - the media package serializer
      Returns:
      the media package element
      Throws:
      UnsupportedElementException - if reading the file from manifest fails
    • newElement

      Creates a new media package elment of the specified type.
      Parameters:
      type - the element type
      flavor - the element flavor
      Returns:
      the new media package element