public interface MediaPackageElement extends ManifestContributor, Comparable<MediaPackageElement>, Cloneable
| Modifier and Type | Interface and Description |
|---|---|
static class |
MediaPackageElement.Type
The element type todo is the type definitely needed or can the flavor take its responsibilities?
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTag(String tag)
Tags the media package element with the given tag.
|
void |
clearReference()
Removes any reference.
|
void |
clearTags()
Removes all tags associated with this element
|
Object |
clone()
Create a deep copy of this object.
|
boolean |
containsTag(Collection<String> tags)
Returns
true if the media package element contains at least one of the given tags. |
boolean |
containsTag(String tag)
Returns
true if the media package element contains the given tag. |
Checksum |
getChecksum()
Returns the file's checksum.
|
String |
getElementDescription()
Returns a human readable name for this media package element.
|
MediaPackageElement.Type |
getElementType()
Returns the element's manifest type.
|
MediaPackageElementFlavor |
getFlavor()
Returns the element's type as defined for the specific media package element.
|
String |
getIdentifier()
Returns the element identifier.
|
MediaPackage |
getMediaPackage()
Returns the media package if the element has been added,
null otherwise. |
MimeType |
getMimeType()
Returns the element's mimetype as found in the ISO Mime Type Registrations.
|
MediaPackageReference |
getReference()
Returns a reference to another entitiy, both inside or outside the media package.
|
long |
getSize()
Returns the number of bytes that are occupied by this media package element.
|
String[] |
getTags()
Returns the tags for this media package element or an empty array if there are no tags.
|
URI |
getURI()
Returns a reference to the element location.
|
void |
referTo(MediaPackage mediaPackage)
Adds a reference to the media package
mediaPackage. |
void |
referTo(MediaPackageElement element)
Adds a reference to the media package element
element. |
void |
referTo(MediaPackageReference reference)
Adds an arbitrary reference.
|
void |
removeTag(String tag)
Removes the tag from the media package element.
|
void |
setChecksum(Checksum checksum)
Sets the new checksum on this media package element.
|
void |
setElementDescription(String description)
Sets the element description of this media package element.
|
void |
setFlavor(MediaPackageElementFlavor flavor)
Sets the flavor on this media package element.
|
void |
setIdentifier(String id)
Sets the element identifier.
|
void |
setMimeType(MimeType mimeType)
Sets the mime type on this media package element.
|
void |
setReference(MediaPackageReference reference)
Sets the element reference.
|
void |
setSize(long size)
Sets the file size in bytes
|
void |
setURI(URI uri)
Sets the elements location.
|
void |
verify()
Verifies the integrity of the media package element.
|
toManifestcompareToString getIdentifier()
void setIdentifier(String id)
id - the new element identifierMediaPackageElement.Type getElementType()
String getElementDescription()
void setElementDescription(String description)
description - the new element descriptionvoid addTag(String tag)
tag - the tagvoid removeTag(String tag)
tag - the tagboolean containsTag(String tag)
true if the media package element contains the given tag.tag - the tagtrue if the element is taggedboolean containsTag(Collection<String> tags)
true if the media package element contains at least one of the given tags. If there are no
tags contained in the set, then the element is considered to match as well.tags - the set of tagtrue if the element is tagged accordinglyString[] getTags()
void clearTags()
MediaPackage getMediaPackage()
null otherwise.MediaPackageReference getReference()
void setReference(MediaPackageReference reference)
reference - the referenceURI getURI()
void setURI(URI uri)
uri - the element locationChecksum getChecksum()
void setChecksum(Checksum checksum)
checksum - the checksumMimeType getMimeType()
For example, in case of motion jpeg slides, this method will return the mime type for video/mj2.
void setMimeType(MimeType mimeType)
mimeType - the new mime typeMediaPackageElementFlavor getFlavor()
For example, in case of a video track, the type could be video/x-presentation.
void setFlavor(MediaPackageElementFlavor flavor)
flavor - the new flavorlong getSize()
void setSize(long size)
size - void verify()
throws MediaPackageException
MediaPackageException - if the media package element is in an incosistant statevoid referTo(MediaPackage mediaPackage)
mediaPackage.
Note that an element can only refer to one object. Therefore, any existing reference will be replaced.
mediaPackage - the media package to refere tovoid referTo(MediaPackageElement element)
element.
Note that an element can only refere to one object. Therefore, any existing reference will be replaced. Also note
that if this element is part of a media package, a consistency check will be made making sure the refered element
is also part of the same media package. If not, a MediaPackageException will be thrown.
element - the element to refere tovoid referTo(MediaPackageReference reference)
Note that an element can only have one reference. Therefore, any existing reference will be replaced. Also note
that if this element is part of a media package, a consistency check will be made making sure the refered element
is also part of the same media package. If not, a MediaPackageException will be thrown.
reference - the referencevoid clearReference()
Object clone()
Copyright © 2009–2021 Opencast Project. All rights reserved.