Package org.opencastproject.mediapackage
Interface MediaPackageReference
- All Superinterfaces:
Cloneable
- All Known Implementing Classes:
MediaPackageReferenceImpl
A
MediaPackageElementRef provides means of pointing to other elements in the media package.
A metadata catalog could for example contain a reference to the track that was used to extract the data contained in it.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a deep copy of this reference.Returns the reference identifier.Returns additional properties that further define what the object is referencing.getProperty(String key) Returns the property with namekeyornullif no such property exists.getType()Returns the reference type.booleanmatches(MediaPackageReference reference) Returnstrueif this reference matchesreferenceby means of type and identifier.voidsetProperty(String key, String value) Adds an additional property to further define the object reference.
-
Field Details
-
TYPE_MEDIAPACKAGE
- See Also:
-
TYPE_TRACK
- See Also:
-
TYPE_CATALOG
- See Also:
-
TYPE_ATTACHMENT
- See Also:
-
TYPE_SERIES
- See Also:
-
SELF
- See Also:
-
ANY
- See Also:
-
-
Method Details
-
getType
String getType()Returns the reference type.There is a list of well known types describing media package elements:
mediapackagea reference to the parent media packagetrackreferes to a track inside the media packagecatalogreferes to a catalog inside the media packageattachmentreferes to an attachment inside the media packageseriesreferes to a series
- Returns:
- the reference type
-
getIdentifier
String getIdentifier()Returns the reference identifier.The identifier will usually refer to the id of the media package element, should the reference point to an element inside the media package (see
MediaPackageElement.getIdentifier()).In case of a reference to another media package, this will reflect the media package id (see
MediaPackage.getIdentifier()) orselfif it refers to the parent media package.- Returns:
- the reference identifier
-
matches
Returnstrueif this reference matchesreferenceby means of type and identifier.- Parameters:
reference- the media package reference- Returns:
trueif the reference matches
-
getProperties
Returns additional properties that further define what the object is referencing.An example would be the point in time for a slide preview:
<attachment ref="track:track-7;time=8764"> </attachment>
- Returns:
- the properties of this reference
-
getProperty
Returns the property with namekeyornullif no such property exists.- Parameters:
key- the property name- Returns:
- the property value
-
setProperty
Adds an additional property to further define the object reference. Set the value to null in order to remove a property.- Parameters:
key- The unique keyvalue- The value of the property
-
clone
Object clone()Returns a deep copy of this reference.- Returns:
- the clone
-