org.apache.stanbol.entityhub.jersey.parsers
Class RepresentationReader
java.lang.Object
org.apache.stanbol.entityhub.jersey.parsers.RepresentationReader
- All Implemented Interfaces:
- javax.ws.rs.ext.MessageBodyReader<Map<String,org.apache.stanbol.entityhub.servicesapi.model.Representation>>
@Provider
public class RepresentationReader
- extends Object
- implements javax.ws.rs.ext.MessageBodyReader<Map<String,org.apache.stanbol.entityhub.servicesapi.model.Representation>>
Provides support for reading Representation form Requests. This implementation
supports all RDF supports as well as MediaType.APPLICATION_FORM_URLENCODED
- in case the data are sent from an HTML form - and
MediaType.MULTIPART_FORM_DATA - mime encoded data.
In case of an HTML form the encoding need to be specified by the parameter
"encoding" for the entity data the parameters "entity" or "content" can be
used.
- Author:
- Rupert Westenthaler
|
Method Summary |
boolean |
isReadable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType)
|
Map<String,org.apache.stanbol.entityhub.servicesapi.model.Representation> |
parseFromContent(MessageBodyReaderUtils.RequestData content,
javax.ws.rs.core.MediaType acceptedMediaType)
|
Map<String,org.apache.stanbol.entityhub.servicesapi.model.Representation> |
readFrom(Class<Map<String,org.apache.stanbol.entityhub.servicesapi.model.Representation>> 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 |
servletContext
@Context
protected javax.servlet.ServletContext servletContext
supportedMediaTypes
public static final Set<String> supportedMediaTypes
RepresentationReader
public RepresentationReader()
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<Map<String,org.apache.stanbol.entityhub.servicesapi.model.Representation>>
readFrom
public Map<String,org.apache.stanbol.entityhub.servicesapi.model.Representation> readFrom(Class<Map<String,org.apache.stanbol.entityhub.servicesapi.model.Representation>> 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<Map<String,org.apache.stanbol.entityhub.servicesapi.model.Representation>>
- Throws:
IOException
javax.ws.rs.WebApplicationException
parseFromContent
public Map<String,org.apache.stanbol.entityhub.servicesapi.model.Representation> parseFromContent(MessageBodyReaderUtils.RequestData content,
javax.ws.rs.core.MediaType acceptedMediaType)
Copyright © 2010-2013 The Apache Software Foundation. All Rights Reserved.