Package org.opencastproject.smil.impl
Class SmilResponseImpl
java.lang.Object
org.opencastproject.smil.impl.SmilResponseImpl
- All Implemented Interfaces:
SmilResponse
SmilResponse implementation.-
Constructor Summary
ConstructorsConstructorDescriptionSmilResponseImpl(Smil smil) ConstructorSmilResponseImpl(Smil smil, SmilObject entity) Constructor.SmilResponseImpl(Smil smil, SmilObject[] entities) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected static SmilResponsefromXml(InputStream smilResponseXml) DeserializeSmilResponsefrom XML.static SmilResponseDeserializeSmilResponsefrom XML.ReturnsSmilObjects if there are any or throwsSmilException.intReturns number of entities defined with this response.ReturnsSmilObjectif only one entity stored.getSmil()ReturnsSmilobject from response.toXml()Return XML serialized instance of thisSmilResponse.
-
Constructor Details
-
SmilResponseImpl
Constructor- Parameters:
smil- to set
-
SmilResponseImpl
Constructor.- Parameters:
smil- to setentity- to set
-
SmilResponseImpl
Constructor.- Parameters:
smil- to setentities- to set
-
-
Method Details
-
getSmil
ReturnsSmilobject from response.- Specified by:
getSmilin interfaceSmilResponse- Returns:
Smilobject
-
getEntitiesCount
public int getEntitiesCount()Returns number of entities defined with this response.- Specified by:
getEntitiesCountin interfaceSmilResponse- Returns:
- number of entities
-
getEntity
ReturnsSmilObjectif only one entity stored. ThrowsSmilExceptionotherwise.- Specified by:
getEntityin interfaceSmilResponse- Returns:
SmilObject- Throws:
SmilException- if entities count not one
-
getEntities
ReturnsSmilObjects if there are any or throwsSmilException.- Specified by:
getEntitiesin interfaceSmilResponse- Returns:
SmilObjects as array- Throws:
SmilException- if there are no entities defined by response.
-
toXml
Return XML serialized instance of thisSmilResponse.- Specified by:
toXmlin interfaceSmilResponse- Returns:
SmilResponseas XML- Throws:
javax.xml.bind.JAXBException- if serialization failed
-
fromXml
DeserializeSmilResponsefrom XML.- Parameters:
smilResponseXml-SmilResponseas XML- Returns:
SmilResponseobject- Throws:
javax.xml.bind.JAXBException- if deserialization fail
-
fromXml
protected static SmilResponse fromXml(InputStream smilResponseXml) throws javax.xml.bind.JAXBException DeserializeSmilResponsefrom XML.- Parameters:
smilResponseXml-SmilResponseas XMLInputStream- Returns:
SmilResponseobject- Throws:
javax.xml.bind.JAXBException- if deserialization fail
-