org.apache.stanbol.entityhub.jersey.parsers
Class FieldQueryReader

java.lang.Object
  extended by org.apache.stanbol.entityhub.jersey.parsers.FieldQueryReader
All Implemented Interfaces:
javax.ws.rs.ext.MessageBodyReader<org.apache.stanbol.entityhub.servicesapi.query.FieldQuery>

@Provider
public class FieldQueryReader
extends Object
implements javax.ws.rs.ext.MessageBodyReader<org.apache.stanbol.entityhub.servicesapi.query.FieldQuery>


Constructor Summary
FieldQueryReader(javax.servlet.ServletContext context)
           
 
Method Summary
static org.apache.stanbol.entityhub.servicesapi.query.FieldQuery fromJSON(String jsonQueryString, javax.ws.rs.core.MediaType acceptedMediaType, org.apache.stanbol.commons.namespaceprefix.NamespacePrefixService nsPrefixService)
           
 boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
           
 org.apache.stanbol.entityhub.servicesapi.query.FieldQuery readFrom(Class<org.apache.stanbol.entityhub.servicesapi.query.FieldQuery> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders, InputStream entityStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldQueryReader

public FieldQueryReader(@Context
                        javax.servlet.ServletContext context)
Method Detail

isReadable

public boolean isReadable(Class<?> type,
                          Type genericType,
                          Annotation[] annotations,
                          javax.ws.rs.core.MediaType mediaType)
Specified by:
isReadable in interface javax.ws.rs.ext.MessageBodyReader<org.apache.stanbol.entityhub.servicesapi.query.FieldQuery>

readFrom

public org.apache.stanbol.entityhub.servicesapi.query.FieldQuery readFrom(Class<org.apache.stanbol.entityhub.servicesapi.query.FieldQuery> type,
                                                                          Type genericType,
                                                                          Annotation[] annotations,
                                                                          javax.ws.rs.core.MediaType mediaType,
                                                                          javax.ws.rs.core.MultivaluedMap<String,String> httpHeaders,
                                                                          InputStream entityStream)
                                                                   throws IOException,
                                                                          javax.ws.rs.WebApplicationException
Specified by:
readFrom in interface javax.ws.rs.ext.MessageBodyReader<org.apache.stanbol.entityhub.servicesapi.query.FieldQuery>
Throws:
IOException
javax.ws.rs.WebApplicationException

fromJSON

public static org.apache.stanbol.entityhub.servicesapi.query.FieldQuery fromJSON(String jsonQueryString,
                                                                                 javax.ws.rs.core.MediaType acceptedMediaType,
                                                                                 org.apache.stanbol.commons.namespaceprefix.NamespacePrefixService nsPrefixService)
                                                                          throws org.codehaus.jettison.json.JSONException,
                                                                                 javax.ws.rs.WebApplicationException
Parameters:
queryFactory -
jsonQueryString -
acceptedMediaType - used to add the accept header to Error responses
Returns:
Throws:
org.codehaus.jettison.json.JSONException
javax.ws.rs.WebApplicationException


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