Class Mpeg7CatalogImpl
java.lang.Object
org.opencastproject.metadata.mpeg7.Mpeg7CatalogImpl
- All Implemented Interfaces:
Cloneable,org.opencastproject.metadata.api.MetadataCatalog,Mpeg7,Mpeg7Catalog
Implements the mpeg-7 metadata container.
-
Field Summary
FieldsFields inherited from interface org.opencastproject.metadata.mpeg7.Mpeg7Catalog
ANY_MPEG7 -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new mpeg-7 metadata container.Creates a new mpeg-7 metadata container from the serialized stream. -
Method Summary
Modifier and TypeMethodDescriptionaddAudioContent(String id, MediaTime time, MediaLocator locator) Adds audio content to the catalog.addAudioVisualContent(String id, MediaTime time, MediaLocator locator) Adds audiovisual content to the catalog.addVideoContent(String id, MediaTime time, MediaLocator locator) Adds video content to the catalog.Returns an iteration of the tracks of typeAudio.Returns an iteration of the tracks of typeAudioVisual.clone()getAudioById(String id) Returns the audio track with the given id ornullif the track does not exist.Returns the audiovisual track with the given id ornullif the track does not exist.MultimediaContent<? extends MultimediaContentType> Returns the multimedia content container element for tracks of the given type (eitherAudio,VideoorAudiovisual).getVideoById(String id) Returns the video track with the given id ornullif the track does not exist.booleanReturnstrueif the catalog contains multimedia content of typeAudioType.booleanReturnstrueif the catalog contains multimedia content of typeAudioVisualType.booleanReturnstrueif the catalog contains multimedia content of typeVideoType.Iterator<MultimediaContent<? extends MultimediaContentType>> Returns an iteration of the multimedia content container contained in this mpeg-7 document.static Mpeg7CatalogImplCreates a new mpeg-7 metadata container file.Removes the audio content with the specified id.Removes the audiovisual content with the specified id.Removes the video content with the specified id.toXml()Saves the mpeg-7 metadata container to disk.Returns an iteration of the tracks of typeVideo.
-
Field Details
-
NS
The default element namespace- See Also:
-
-
Constructor Details
-
Mpeg7CatalogImpl
public Mpeg7CatalogImpl()Creates a new mpeg-7 metadata container. -
Mpeg7CatalogImpl
Creates a new mpeg-7 metadata container from the serialized stream.
-
-
Method Details
-
newInstance
Creates a new mpeg-7 metadata container file.- Returns:
- the new mpeg-7 metadata container
-
multimediaContent
Description copied from interface:Mpeg7Returns an iteration of the multimedia content container contained in this mpeg-7 document.- Specified by:
multimediaContentin interfaceMpeg7- Returns:
- the multimedia content container
- See Also:
-
getMultimediaContent
public MultimediaContent<? extends MultimediaContentType> getMultimediaContent(MultimediaContent.Type type) Description copied from interface:Mpeg7Returns the multimedia content container element for tracks of the given type (eitherAudio,VideoorAudiovisual).- Specified by:
getMultimediaContentin interfaceMpeg7- Returns:
- the multimedia content container of the specified type
- See Also:
-
toXml
Saves the mpeg-7 metadata container to disk.- Specified by:
toXmlin interfaceMpeg7Catalog- Throws:
ParserConfigurationException- if the xml parser environment is not correctly configuredTransformerException- if serialization of the metadata document failsIOException- if an error with catalog file handling occurs
-
addAudioContent
Description copied from interface:Mpeg7Adds audio content to the catalog.- Specified by:
addAudioContentin interfaceMpeg7- Parameters:
id- the audio track idtime- the audio track time constraintslocator- the track locator- See Also:
-
removeAudioContent
Description copied from interface:Mpeg7Removes the audio content with the specified id.- Specified by:
removeAudioContentin interfaceMpeg7- Parameters:
id- the content id- See Also:
-
hasAudioContent
public boolean hasAudioContent()Description copied from interface:Mpeg7Returnstrueif the catalog contains multimedia content of typeAudioType.- Specified by:
hasAudioContentin interfaceMpeg7- Returns:
trueif audio content is contained- See Also:
-
audioContent
Description copied from interface:Mpeg7Returns an iteration of the tracks of typeAudio.- Specified by:
audioContentin interfaceMpeg7- Returns:
- the audio tracks
- See Also:
-
addVideoContent
Description copied from interface:Mpeg7Adds video content to the catalog.- Specified by:
addVideoContentin interfaceMpeg7- Parameters:
id- the video track idtime- the video track time constraintslocator- the track locator- See Also:
-
removeVideoContent
Description copied from interface:Mpeg7Removes the video content with the specified id.- Specified by:
removeVideoContentin interfaceMpeg7- Parameters:
id- the content id- See Also:
-
hasVideoContent
public boolean hasVideoContent()Description copied from interface:Mpeg7Returnstrueif the catalog contains multimedia content of typeVideoType.- Specified by:
hasVideoContentin interfaceMpeg7- Returns:
trueif video content is contained- See Also:
-
videoContent
Description copied from interface:Mpeg7Returns an iteration of the tracks of typeVideo.- Specified by:
videoContentin interfaceMpeg7- Returns:
- the video tracks
- See Also:
-
addAudioVisualContent
Description copied from interface:Mpeg7Adds audiovisual content to the catalog.- Specified by:
addAudioVisualContentin interfaceMpeg7- Parameters:
id- the track idtime- the track's time constraintslocator- track's locator- See Also:
-
removeAudioVisualContent
Description copied from interface:Mpeg7Removes the audiovisual content with the specified id.- Specified by:
removeAudioVisualContentin interfaceMpeg7- Parameters:
id- the content id- See Also:
-
hasAudioVisualContent
public boolean hasAudioVisualContent()Description copied from interface:Mpeg7Returnstrueif the catalog contains multimedia content of typeAudioVisualType.- Specified by:
hasAudioVisualContentin interfaceMpeg7- Returns:
trueif audiovisual content is contained- See Also:
-
audiovisualContent
Description copied from interface:Mpeg7Returns an iteration of the tracks of typeAudioVisual.- Specified by:
audiovisualContentin interfaceMpeg7- Returns:
- the audiovisual tracks
- See Also:
-
getAudioById
Description copied from interface:Mpeg7Returns the audio track with the given id ornullif the track does not exist.- Specified by:
getAudioByIdin interfaceMpeg7- Parameters:
id- the audio track id- Returns:
- the audio track
- See Also:
-
getAudioVisualById
Description copied from interface:Mpeg7Returns the audiovisual track with the given id ornullif the track does not exist.- Specified by:
getAudioVisualByIdin interfaceMpeg7- Parameters:
id- the track id- Returns:
- the track
- See Also:
-
getVideoById
Description copied from interface:Mpeg7Returns the video track with the given id ornullif the track does not exist.- Specified by:
getVideoByIdin interfaceMpeg7- Parameters:
id- the video track id- Returns:
- the video track
- See Also:
-
clone
- Specified by:
clonein interfaceMpeg7Catalog- Overrides:
clonein classObject
-