Package org.opencastproject.smil.entity
Class SmilImpl
java.lang.Object
org.opencastproject.smil.entity.SmilObjectImpl
org.opencastproject.smil.entity.SmilImpl
- All Implemented Interfaces:
Smil,SmilObject
Smil implementation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all content in head and body.static SmilUnmarshall a SMIL document from file.static SmilUnmarshall a SMIL document from string.Returns element with given Id.getBody()Returns body of the SMIL.getElementOrNull(String elementId) Returns element with given elementId or null.getHead()Returns head of the SMIL.protected StringReturnsSmilObjectId prefix (must begin with alphanumeric charackter).voidputAllChilds(List<SmilObject> elements) Put all containing elements intoListgiven as parameter.removeElement(String elementId) Remove element with given Id and returns it.voidSet the body of the SMIL.voidSet the head of the SMIL.toXML()Serialize this object.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
-
SmilImpl
public SmilImpl()Empty constructor.
-
-
Method Details
-
getHead
Returns head of the SMIL. -
setHead
Set the head of the SMIL.- Parameters:
head- the head to set
-
getBody
Returns body of the SMIL. -
setBody
Set the body of the SMIL.- Parameters:
body- the body to set
-
getIdPrefix
ReturnsSmilObjectId prefix (must begin with alphanumeric charackter).- Specified by:
getIdPrefixin classSmilObjectImpl- Returns:
- Id prefix
-
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
-
toXML
Serialize this object.- Specified by:
toXMLin interfaceSmil- Returns:
- the XML representation of the
Smilobject - Throws:
javax.xml.bind.JAXBException- if serializing failSAXExceptionMalformedURLException
-
fromXML
Unmarshall a SMIL document from string. -
fromXML
Unmarshall a SMIL document from file. -
clear
public void clear()Clear all content in head and body. -
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
-
get
Returns element with given Id.- Specified by:
getin interfaceSmil- Parameters:
elementId- element Id- Returns:
- element with given Id
- Throws:
SmilException- if there is no element with the same Id
-