Package org.opencastproject.smil.entity
Class SmilBodyImpl
java.lang.Object
org.opencastproject.smil.entity.SmilObjectImpl
org.opencastproject.smil.entity.SmilBodyImpl
- All Implemented Interfaces:
SmilBody,SmilObject
SmilBody implementation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMediaElement(SmilMediaObject mediaObject, String parentId) Add givenSmilMediaObjectto the element with given Id.voidclear()Remove all media Elements inside.getElementOrNull(String elementId) Returns element with given elementId or null.protected StringReturnsSmilObjectId prefix (must begin with alphanumeric charackter).Returns the SMIL elements inside the body.protected List<SmilMediaObject> Returns SMIL media elements.voidputAllChilds(List<SmilObject> elements) Put all containing elements intoListgiven as parameter.removeElement(String elementId) Remove element with given Id and returns it.protected voidsetMediaObjects(List<SmilMediaObject> mediaElements) Set SMIL media elements.Methods inherited from class org.opencastproject.smil.entity.SmilObjectImpl
getIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opencastproject.smil.entity.api.SmilObject
getId
-
Constructor Details
-
SmilBodyImpl
public SmilBodyImpl()
-
-
Method Details
-
getMediaElements
Returns the SMIL elements inside the body. TheListis immutable, use SmilService to modify it.- Specified by:
getMediaElementsin interfaceSmilBody- Returns:
- the media elements
-
getMediaObjects
Returns SMIL media elements.- Returns:
- the media elements
-
setMediaObjects
Set SMIL media elements.- Parameters:
mediaElements- the mediae lements to set
-
getIdPrefix
ReturnsSmilObjectId prefix (must begin with alphanumeric charackter).- Specified by:
getIdPrefixin classSmilObjectImpl- Returns:
- Id prefix
-
addMediaElement
Add givenSmilMediaObjectto the element with given Id.- Parameters:
mediaObject- to addparentId- where to add new media- Throws:
SmilException- if there is no element inside with given Id
-
removeElement
Remove element with given Id and returns it. Returns null if there is no element with given Id.- Specified by:
removeElementin classSmilObjectImpl- Parameters:
elementId- element Id- Returns:
- removed element or null
-
clear
public void clear()Remove all media Elements inside. -
getElementOrNull
Returns element with given elementId or null.- Specified by:
getElementOrNullin classSmilObjectImpl- Parameters:
elementId- element Id- Returns:
- element with given elementId or null
-
putAllChilds
Put all containing elements intoListgiven as parameter.- Specified by:
putAllChildsin classSmilObjectImpl- Parameters:
elements-Listwhere to pul child elements to
-