Class Comment
java.lang.Object
org.opencastproject.elasticsearch.index.objects.event.Comment
- All Implemented Interfaces:
IndexObject
Object wrapper for a recording comment.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe document idstatic final StringThe name of the surrounding XML tag to wrap a result of multiple commentsFields inherited from interface org.opencastproject.elasticsearch.index.objects.IndexObject
INDEX_XML_NAMESPACE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic javax.xml.bind.UnmarshallerCreate an unmarshaller for commentsgetId()getText()voidvoidvoidsetResolvedStatus(Boolean resolvedStatus) voidtoJSON()Serializes the recording comment.toXML()Serializes the recording comment to an XML format.static CommentvalueOf(InputStream xml, javax.xml.bind.Unmarshaller unmarshaller) Reads the recording comment from the input stream.static CommentvalueOfJson(InputStream json) Reads the recording comment from the input stream.
-
Field Details
-
DOCUMENT_TYPE
The document id- See Also:
-
XML_SURROUNDING_TAG
The name of the surrounding XML tag to wrap a result of multiple comments- See Also:
-
-
Constructor Details
-
Comment
public Comment()Required default no arg constructor for JAXB. -
Comment
The recording identifier.- Parameters:
id- the object idreason- the reason
-
-
Method Details
-
getId
-
setId
-
getReason
-
setReason
-
getText
-
setText
-
isResolvedStatus
-
setResolvedStatus
-
valueOf
public static Comment valueOf(InputStream xml, javax.xml.bind.Unmarshaller unmarshaller) throws IOException Reads the recording comment from the input stream.- Parameters:
xml- the input streamunmarshaller- the unmarshaller to use- Returns:
- the deserialized recording comment
- Throws:
IOException
-
valueOfJson
public static Comment valueOfJson(InputStream json) throws IOException, org.codehaus.jettison.json.JSONException, XMLStreamException, javax.xml.bind.JAXBException Reads the recording comment from the input stream.- Parameters:
json- the input stream- Returns:
- the deserialized recording comment
- Throws:
org.codehaus.jettison.json.JSONExceptionXMLStreamExceptionjavax.xml.bind.JAXBExceptionIOException
-
toJSON
Serializes the recording comment.- Returns:
- the serialized recording comment
-
toXML
Serializes the recording comment to an XML format.- Returns:
- A String with this comment's content as XML.
-
createUnmarshaller
Create an unmarshaller for comments- Returns:
- an unmarshaller for comments
- Throws:
IOException
-