@Provider
@Produces(value={"text/rdf+n3","application/n-triples","application/rdf+xml","text/turtle","application/x-turtle","application/rdf+json"})
public class GraphNodeWriter
extends Object
implements javax.ws.rs.ext.MessageBodyWriter<GraphNode>
The expansion can be widened by using the query parameters xPropObj and xProSubj. These parameters specify property uris (both parameters might be repeated). For the specified properties their objects respectively subjects are expanded as if they were bnodes.
| Modifier and Type | Field and Description |
|---|---|
static String |
OBJ_EXP_PARAM |
static String |
SUBJ_EXP_PARAM |
| Constructor and Description |
|---|
GraphNodeWriter() |
| Modifier and Type | Method and Description |
|---|---|
long |
getSize(GraphNode n,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
boolean |
isWriteable(Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType) |
void |
setSerializer(Serializer serializer) |
void |
setUriInfo(javax.ws.rs.core.UriInfo uriInfo) |
void |
unsetSerializer(Serializer serializer) |
void |
writeTo(GraphNode node,
Class<?> type,
Type genericType,
Annotation[] annotations,
javax.ws.rs.core.MediaType mediaType,
javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders,
OutputStream entityStream) |
public static final String OBJ_EXP_PARAM
public static final String SUBJ_EXP_PARAM
public void setSerializer(Serializer serializer)
public void unsetSerializer(Serializer serializer)
public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
isWriteable in interface javax.ws.rs.ext.MessageBodyWriter<GraphNode>public long getSize(GraphNode n, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType)
getSize in interface javax.ws.rs.ext.MessageBodyWriter<GraphNode>public void writeTo(GraphNode node, Class<?> type, Type genericType, Annotation[] annotations, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String,Object> httpHeaders, OutputStream entityStream) throws IOException, javax.ws.rs.WebApplicationException
writeTo in interface javax.ws.rs.ext.MessageBodyWriter<GraphNode>IOExceptionjavax.ws.rs.WebApplicationException@Context public void setUriInfo(javax.ws.rs.core.UriInfo uriInfo)
Copyright © 2015–2022 The Apache Software Foundation. All rights reserved.