org.apache.stanbol.entityhub.jersey.writers
Class QueryResultListWriter

java.lang.Object
  extended by org.apache.stanbol.entityhub.jersey.writers.QueryResultListWriter
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<QueryResultList<?>>

@Provider
public class QueryResultListWriter
extends java.lang.Object
implements javax.ws.rs.ext.MessageBodyWriter<QueryResultList<?>>

TODO: Replace with Serializer infrastructure similar to Serializer


Field Summary
static java.lang.String DEFAULT_ENCODING
           
protected static java.util.Set<java.lang.String> produces
           
protected  javax.servlet.ServletContext servletContext
           
 
Constructor Summary
QueryResultListWriter()
           
 
Method Summary
protected  org.apache.clerezza.rdf.core.serializedform.Serializer getSerializer()
           
 long getSize(QueryResultList<?> result, 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)
           
 void writeTo(QueryResultList<?> resultList, java.lang.Class<?> doNotUse, 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
 

Field Detail

produces

protected static final java.util.Set<java.lang.String> produces

DEFAULT_ENCODING

public static final java.lang.String DEFAULT_ENCODING
See Also:
Constant Field Values

servletContext

@Context
protected javax.servlet.ServletContext servletContext
Constructor Detail

QueryResultListWriter

public QueryResultListWriter()
Method Detail

getSerializer

protected org.apache.clerezza.rdf.core.serializedform.Serializer getSerializer()

getSize

public long getSize(QueryResultList<?> result,
                    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<QueryResultList<?>>

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<QueryResultList<?>>

writeTo

public void writeTo(QueryResultList<?> resultList,
                    java.lang.Class<?> doNotUse,
                    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<QueryResultList<?>>
Throws:
java.io.IOException
javax.ws.rs.WebApplicationException


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