Package org.restlet.ext.rdf
Class RdfClientResource
- java.lang.Object
-
- org.restlet.resource.Resource
-
- org.restlet.resource.ClientResource
-
- org.restlet.ext.rdf.RdfClientResource
-
public class RdfClientResource extends org.restlet.resource.ClientResource
Linked client resource. In addition to regular client resources, this class offers additional method aware of links exposed by RDF, making it natural to navigate the Web of data.- Author:
- Jerome Louvel
-
-
Constructor Summary
Constructors Constructor Description RdfClientResource(java.lang.String uri)
Constructor.RdfClientResource(java.net.URI uri)
Constructor.RdfClientResource(org.restlet.Context context, java.lang.String uri)
Constructor.RdfClientResource(org.restlet.Context context, java.net.URI uri)
Constructor.RdfClientResource(org.restlet.Context context, org.restlet.data.Method method, java.lang.String uri)
Constructor.RdfClientResource(org.restlet.Context context, org.restlet.data.Method method, java.net.URI uri)
Constructor.RdfClientResource(org.restlet.Context context, org.restlet.data.Method method, org.restlet.data.Reference reference)
Constructor.RdfClientResource(org.restlet.Context context, org.restlet.data.Reference reference)
Constructor.RdfClientResource(org.restlet.Context context, org.restlet.Request request, org.restlet.Response response)
Constructor.RdfClientResource(org.restlet.data.Method method, java.lang.String uri)
Constructor.RdfClientResource(org.restlet.data.Method method, java.net.URI uri)
Constructor.RdfClientResource(org.restlet.data.Method method, org.restlet.data.Reference reference)
Constructor.RdfClientResource(org.restlet.data.Reference reference)
Constructor.RdfClientResource(org.restlet.Request request, org.restlet.Response response)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<RdfClientResource>
getLinked()
Returns all the linked resources, based on the RDF representation exposed.java.util.Set<RdfClientResource>
getLinked(java.util.Collection<org.restlet.data.Reference> typeRefs)
Returns the linked resources, based on the RDF representation exposed.java.util.Set<RdfClientResource>
getLinked(org.restlet.data.Reference typeRef)
Returns the linked resources, based on the RDF representation exposed.Graph
getLinks()
Returns the links exposed by this resource.java.util.Set<Couple<org.restlet.data.Reference,Literal>>
getLiterals()
Returns all the linked literals, based on the RDF representation exposed.java.util.Set<Literal>
getLiterals(org.restlet.data.Reference typeRef)
Returns the linked literals, based on the RDF representation exposed.void
refresh()
Refreshes the links cache.-
Methods inherited from class org.restlet.resource.ClientResource
accept, accept, addQueryParameter, addQueryParameter, addQueryParameters, addSegment, create, create, create, createNext, createRequest, createResponse, delete, delete, delete, doError, doError, doError, doRelease, finalize, get, get, get, getAttribute, getChild, getChild, getChild, getChild, getMaxRedirects, getNext, getOnResponse, getOnSent, getParent, getParent, getRetryAttempts, getRetryDelay, handle, handle, handle, handle, handle, handle, handle, handle, handle, handleInbound, handleOutbound, hasNext, head, head, isFollowingRedirects, isRequestEntityBuffering, isResponseEntityBuffering, isRetryOnError, options, options, options, patch, patch, patch, patch, post, post, post, post, put, put, put, put, redirect, retry, setAttribute, setChallengeResponse, setChallengeResponse, setClientInfo, setConditions, setCookies, setEntityBuffering, setFollowingRedirects, setHostRef, setHostRef, setLoggable, setMaxRedirects, setMethod, setNext, setOnResponse, setOnSent, setOriginalRef, setProtocol, setProxyChallengeResponse, setProxyChallengeResponse, setRanges, setReference, setReference, setReferrerRef, setReferrerRef, setRequestEntityBuffering, setResponseEntityBuffering, setRetryAttempts, setRetryDelay, setRetryOnError, wrap, wrap
-
Methods inherited from class org.restlet.resource.Resource
doCatch, doError, doInit, getAllowedMethods, getApplication, getChallengeRequests, getChallengeResponse, getClientInfo, getConditions, getConnegService, getContext, getConverterService, getCookies, getCookieSettings, getDimensions, getHostRef, getLocationRef, getLogger, getMatrix, getMatrixValue, getMaxForwards, getMetadataService, getMethod, getOriginalRef, getProtocol, getProxyChallengeRequests, getProxyChallengeResponse, getQuery, getQueryValue, getRanges, getReference, getReferrerRef, getRequest, getRequestAttributes, getRequestCacheDirectives, getRequestEntity, getResponse, getResponseAttributes, getResponseCacheDirectives, getResponseEntity, getRootRef, getServerInfo, getStatus, getStatusService, init, isConfidential, isLoggable, release, setApplication, setQueryValue, setRequest, setResponse, toBoolean, toByte, toDouble, toFloat, toInteger, toLong, toObject, toRepresentation, toRepresentation, toRepresentation, toShort, toString
-
-
-
-
Constructor Detail
-
RdfClientResource
public RdfClientResource(org.restlet.Context context, org.restlet.data.Method method, org.restlet.data.Reference reference)
Constructor.- Parameters:
context
- The context.method
- The method to call.reference
- The target reference.
-
RdfClientResource
public RdfClientResource(org.restlet.Context context, org.restlet.data.Method method, java.lang.String uri)
Constructor.- Parameters:
context
- The context.method
- The method to call.uri
- The target URI.
-
RdfClientResource
public RdfClientResource(org.restlet.Context context, org.restlet.data.Method method, java.net.URI uri)
Constructor.- Parameters:
context
- The context.method
- The method to call.uri
- The target URI.
-
RdfClientResource
public RdfClientResource(org.restlet.Context context, org.restlet.data.Reference reference)
Constructor.- Parameters:
context
- The context.reference
- The target reference.
-
RdfClientResource
public RdfClientResource(org.restlet.Context context, org.restlet.Request request, org.restlet.Response response)
Constructor.- Parameters:
context
- The current context.request
- The handled request.response
- The handled response.
-
RdfClientResource
public RdfClientResource(org.restlet.Context context, java.lang.String uri)
Constructor.- Parameters:
context
- The context.uri
- The target URI.
-
RdfClientResource
public RdfClientResource(org.restlet.Context context, java.net.URI uri)
Constructor.- Parameters:
context
- The context.uri
- The target URI.
-
RdfClientResource
public RdfClientResource(org.restlet.data.Method method, org.restlet.data.Reference reference)
Constructor.- Parameters:
method
- The method to call.reference
- The target reference.
-
RdfClientResource
public RdfClientResource(org.restlet.data.Method method, java.lang.String uri)
Constructor.- Parameters:
method
- The method to call.uri
- The target URI.
-
RdfClientResource
public RdfClientResource(org.restlet.data.Method method, java.net.URI uri)
Constructor.- Parameters:
method
- The method to call.uri
- The target URI.
-
RdfClientResource
public RdfClientResource(org.restlet.data.Reference reference)
Constructor.- Parameters:
reference
- The target reference.
-
RdfClientResource
public RdfClientResource(org.restlet.Request request, org.restlet.Response response)
Constructor.- Parameters:
request
- The handled request.response
- The handled response.
-
RdfClientResource
public RdfClientResource(java.lang.String uri)
Constructor.- Parameters:
uri
- The target URI.
-
RdfClientResource
public RdfClientResource(java.net.URI uri)
Constructor.- Parameters:
uri
- The target URI.
-
-
Method Detail
-
getLinked
public java.util.Set<RdfClientResource> getLinked()
Returns all the linked resources, based on the RDF representation exposed.- Returns:
- All the linked resources.
- See Also:
getLinks()
-
getLinked
public java.util.Set<RdfClientResource> getLinked(java.util.Collection<org.restlet.data.Reference> typeRefs)
Returns the linked resources, based on the RDF representation exposed. The type of links to follow can be restricted.- Parameters:
typeRefs
- The set of types references of the links to select or null.- Returns:
- All the linked resources.
- See Also:
getLinks()
-
getLinked
public java.util.Set<RdfClientResource> getLinked(org.restlet.data.Reference typeRef)
Returns the linked resources, based on the RDF representation exposed. The type of links to follow can be restricted.- Parameters:
typeRef
- The type reference of the links to select or null.- Returns:
- All the linked resources.
- See Also:
getLinks()
-
getLinks
public Graph getLinks()
Returns the links exposed by this resource.- Returns:
- The links exposed by this resource.
-
getLiterals
public java.util.Set<Couple<org.restlet.data.Reference,Literal>> getLiterals()
Returns all the linked literals, based on the RDF representation exposed.- Returns:
- All the linked literals.
- See Also:
getLinks()
-
getLiterals
public java.util.Set<Literal> getLiterals(org.restlet.data.Reference typeRef)
Returns the linked literals, based on the RDF representation exposed. The type of links to follow can be restricted.- Parameters:
typeRef
- The type reference of the links to select or null.- Returns:
- All the linked literals.
- See Also:
getLiterals()
-
refresh
public void refresh()
Refreshes the links cache.
-
-