java.lang.Object
org.opencastproject.elasticsearch.index.objects.event.Comment
All Implemented Interfaces:
IndexObject

public class Comment extends Object implements IndexObject
Object wrapper for a recording comment.
  • Field Details

    • DOCUMENT_TYPE

      public static final String DOCUMENT_TYPE
      The document id
      See Also:
    • XML_SURROUNDING_TAG

      public static final String 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

      public Comment(String id, String reason, String text, boolean resolvedStatus)
      The recording identifier.
      Parameters:
      id - the object id
      reason - the reason
  • Method Details

    • getId

      public String getId()
    • setId

      public void setId(String id)
    • getReason

      public String getReason()
    • setReason

      public void setReason(String reason)
    • getText

      public String getText()
    • setText

      public void setText(String text)
    • isResolvedStatus

      public Boolean isResolvedStatus()
    • setResolvedStatus

      public void setResolvedStatus(Boolean resolvedStatus)
    • 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 stream
      unmarshaller - 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.JSONException
      XMLStreamException
      javax.xml.bind.JAXBException
      IOException
    • toJSON

      public String toJSON()
      Serializes the recording comment.
      Returns:
      the serialized recording comment
    • toXML

      public String toXML()
      Serializes the recording comment to an XML format.
      Returns:
      A String with this comment's content as XML.
    • createUnmarshaller

      public static javax.xml.bind.Unmarshaller createUnmarshaller() throws IOException
      Create an unmarshaller for comments
      Returns:
      an unmarshaller for comments
      Throws:
      IOException