Class NarrativeWriter

  • All Implemented Interfaces:
    jakarta.ws.rs.ext.MessageBodyWriter<org.openprovenance.prov.scala.nlg.Narrative>

    @Provider
    @Produces("application/json")
    public class NarrativeWriter
    extends Object
    implements jakarta.ws.rs.ext.MessageBodyWriter<org.openprovenance.prov.scala.nlg.Narrative>
    • Constructor Detail

      • NarrativeWriter

        public NarrativeWriter()
    • Method Detail

      • trimCharSet

        public String trimCharSet​(jakarta.ws.rs.core.MediaType mediaType)
      • isWriteable

        public boolean isWriteable​(Class<?> type,
                                   Type genericType,
                                   Annotation[] annotations,
                                   jakarta.ws.rs.core.MediaType mediaType)
        Specified by:
        isWriteable in interface jakarta.ws.rs.ext.MessageBodyWriter<org.openprovenance.prov.scala.nlg.Narrative>
      • getSize

        public long getSize​(org.openprovenance.prov.scala.nlg.Narrative t,
                            Class<?> type,
                            Type genericType,
                            Annotation[] annotations,
                            jakarta.ws.rs.core.MediaType mediaType)
        Specified by:
        getSize in interface jakarta.ws.rs.ext.MessageBodyWriter<org.openprovenance.prov.scala.nlg.Narrative>
      • writeTo

        public void writeTo​(org.openprovenance.prov.scala.nlg.Narrative narrative,
                            Class<?> type,
                            Type genericType,
                            Annotation[] annotations,
                            jakarta.ws.rs.core.MediaType mediaType,
                            jakarta.ws.rs.core.MultivaluedMap<String,​Object> httpHeaders,
                            OutputStream entityStream)
                     throws IOException
        Specified by:
        writeTo in interface jakarta.ws.rs.ext.MessageBodyWriter<org.openprovenance.prov.scala.nlg.Narrative>
        Throws:
        IOException