org.apache.stanbol.reasoners.web.writers
Class JenaModelWriter

java.lang.Object
  extended by org.apache.stanbol.reasoners.web.writers.JenaModelWriter
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<com.hp.hpl.jena.rdf.model.Model>

@Provider
public class JenaModelWriter
extends java.lang.Object
implements javax.ws.rs.ext.MessageBodyWriter<com.hp.hpl.jena.rdf.model.Model>

Writer for jena Model

Author:
enridaga

Constructor Summary
JenaModelWriter()
           
 
Method Summary
 long getSize(com.hp.hpl.jena.rdf.model.Model t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isWriteable(java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 java.io.ByteArrayOutputStream toStream(com.hp.hpl.jena.rdf.model.Model t, java.lang.String mediaType)
           
 void writeTo(com.hp.hpl.jena.rdf.model.Model t, java.lang.Class<?> type, java.lang.reflect.Type genericType, java.lang.annotation.Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders, java.io.OutputStream entityStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JenaModelWriter

public JenaModelWriter()
Method Detail

isWriteable

public boolean isWriteable(java.lang.Class<?> type,
                           java.lang.reflect.Type genericType,
                           java.lang.annotation.Annotation[] annotations,
                           javax.ws.rs.core.MediaType mediaType)
Specified by:
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<com.hp.hpl.jena.rdf.model.Model>

getSize

public long getSize(com.hp.hpl.jena.rdf.model.Model t,
                    java.lang.Class<?> type,
                    java.lang.reflect.Type genericType,
                    java.lang.annotation.Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType)
Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter<com.hp.hpl.jena.rdf.model.Model>

toStream

public java.io.ByteArrayOutputStream toStream(com.hp.hpl.jena.rdf.model.Model t,
                                              java.lang.String mediaType)

writeTo

public void writeTo(com.hp.hpl.jena.rdf.model.Model t,
                    java.lang.Class<?> type,
                    java.lang.reflect.Type genericType,
                    java.lang.annotation.Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType,
                    javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> httpHeaders,
                    java.io.OutputStream entityStream)
             throws java.io.IOException,
                    javax.ws.rs.WebApplicationException
Specified by:
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<com.hp.hpl.jena.rdf.model.Model>
Throws:
java.io.IOException
javax.ws.rs.WebApplicationException


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.