at.ac.tuwien.infosys.sm4all.copal.rest.provider
Class XMLContextQueriesWriter

java.lang.Object
  extended by at.ac.tuwien.infosys.sm4all.copal.rest.provider.XMLContextQueriesWriter
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyWriter<ContextQueries>

@Provider
public class XMLContextQueriesWriter
extends Object
implements javax.ws.rs.ext.MessageBodyWriter<ContextQueries>

A MessageBodyWriter that transforms an instance of ContextQueries into application/xml.

Author:
sanjin

Constructor Summary
XMLContextQueriesWriter()
          Creates an instance of application/xml ContextQueries MessageBodyWriter.
 
Method Summary
 long getSize(ContextQueries queries, Class<?> klass, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 boolean isWriteable(Class<?> klass, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 void writeTo(ContextQueries queries, Class<?> klass, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLContextQueriesWriter

public XMLContextQueriesWriter()
Creates an instance of application/xml ContextQueries MessageBodyWriter.

Method Detail

getSize

public long getSize(ContextQueries queries,
                    Class<?> klass,
                    Type genericType,
                    Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType)
Specified by:
getSize in interface javax.ws.rs.ext.MessageBodyWriter<ContextQueries>

isWriteable

public boolean isWriteable(Class<?> klass,
                           Type genericType,
                           Annotation[] annotations,
                           javax.ws.rs.core.MediaType mediaType)
Specified by:
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<ContextQueries>

writeTo

public void writeTo(ContextQueries queries,
                    Class<?> klass,
                    Type genericType,
                    Annotation[] annotations,
                    javax.ws.rs.core.MediaType mediaType,
                    javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
                    OutputStream out)
             throws javax.ws.rs.WebApplicationException
Specified by:
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<ContextQueries>
Throws:
javax.ws.rs.WebApplicationException


Copyright © 2010 Distributed Systems Group, Vienna University of Technology. All Rights Reserved.