@Scope(value="request") @Path(value="/{path: .*}") public class FedoraLdp extends ContentExposingResource
Modifier and Type | Field and Description |
---|---|
protected String |
externalPath |
lockManager, MESSAGE_EXTERNAL_BODY, prefer, request, resource, servletResponse
idTranslator, securityContext, session
binaryService, containerService, defaultPidMinter, eventBus, headers, nodeService, pidMinter, sessions, uriInfo, versionService
Constructor and Description |
---|
FedoraLdp()
Default JAX-RS entry point
|
FedoraLdp(String externalPath)
Create a new FedoraNodes instance for a given path
|
Modifier and Type | Method and Description |
---|---|
protected void |
addResourceHttpHeaders(FedoraResource resource)
Add any resource-specific headers to the response
|
javax.ws.rs.core.Response |
createObject(org.glassfish.jersey.media.multipart.ContentDisposition contentDisposition,
javax.ws.rs.core.MediaType requestContentType,
String slug,
InputStream requestBodyStream,
String link,
String digest)
Creates a new object.
|
javax.ws.rs.core.Response |
createOrReplaceObjectRdf(javax.ws.rs.core.MediaType requestContentType,
InputStream requestBodyStream,
org.glassfish.jersey.media.multipart.ContentDisposition contentDisposition,
String ifMatch,
String link,
String digest)
Create a resource at a specified path, or replace triples with provided RDF.
|
javax.ws.rs.core.Response |
deleteObject()
Deletes an object.
|
protected String |
externalPath() |
javax.ws.rs.core.Response |
getResource(String rangeValue)
Retrieve the node profile
|
javax.ws.rs.core.Response |
head()
Retrieve the node headers
|
javax.ws.rs.core.Response |
options()
Outputs information about the supported HTTP methods, etc.
|
void |
postConstruct()
Run these actions after initializing this resource
|
javax.ws.rs.core.Response |
updateSparql(InputStream requestBodyStream)
Update an object using SPARQL-UPDATE
|
addCacheControlHeaders, addResourceLinkHeaders, addResourceLinkHeaders, checkCacheControlHeaders, evaluateRequestPreconditions, getBinaryContent, getContent, getContent, getResourceTriples, getResourceTriples, getSimpleContentType, getTriples, getTriples, getTriples, getTriples, getUri, isExternalBody, isRdfContentType, patchResourcewithSparql, replaceResourceBinaryWithStream, replaceResourceWithStream, resource
asNode, getResourceFromPath, getUserPrincipal, session, setUpJMSInfo, translator
toPath
@PathParam(value="path") protected String externalPath
public FedoraLdp()
@PostConstruct public void postConstruct()
@HEAD @Timed @Produces(value={"text/turtle;charset=utf-8;qs=1.0","application/ld+json;qs=0.8","text/rdf+n3;charset=utf-8","text/n3;charset=utf-8","application/rdf+xml","application/n-triples","text/plain;charset=utf-8","application/x-turtle","text/html;charset=utf-8"}) public javax.ws.rs.core.Response head()
@OPTIONS @Timed public javax.ws.rs.core.Response options()
@GET @Produces(value={"text/turtle;charset=utf-8;qs=1.0","application/ld+json;qs=0.8","text/rdf+n3;charset=utf-8","text/n3;charset=utf-8","application/rdf+xml","application/n-triples","text/plain;charset=utf-8","application/x-turtle","text/html;charset=utf-8"}) public javax.ws.rs.core.Response getResource(@HeaderParam(value="Range") String rangeValue) throws IOException
rangeValue
- the range valueIOException
- if IO exception occurred@DELETE @Timed public javax.ws.rs.core.Response deleteObject()
@PUT @Consumes @Timed public javax.ws.rs.core.Response createOrReplaceObjectRdf(@HeaderParam(value="Content-Type") javax.ws.rs.core.MediaType requestContentType, InputStream requestBodyStream, @HeaderParam(value="Content-Disposition") org.glassfish.jersey.media.multipart.ContentDisposition contentDisposition, @HeaderParam(value="If-Match") String ifMatch, @HeaderParam(value="Link") String link, @HeaderParam(value="Digest") String digest) throws InvalidChecksumException, MalformedRdfException
requestContentType
- the request content typerequestBodyStream
- the request body streamcontentDisposition
- the content disposition valueifMatch
- the if-match valuelink
- the link valuedigest
- the digest headerInvalidChecksumException
- if invalid checksum exception occurredMalformedRdfException
- if malformed rdf exception occurred@Consumes(value="application/sparql-update") @Timed public javax.ws.rs.core.Response updateSparql(InputStream requestBodyStream) throws IOException
requestBodyStream
- the request body streamIOException
- if IO exception occurred@POST @Consumes(value={"application/octet-stream;qs=1.000","*/*"}) @Timed @Produces(value={"text/turtle;charset=utf-8;qs=1.0","application/ld+json;qs=0.8","text/rdf+n3;charset=utf-8","text/n3;charset=utf-8","application/rdf+xml","application/n-triples","text/plain;charset=utf-8","application/x-turtle","text/html;charset=utf-8","*/*"}) public javax.ws.rs.core.Response createObject(@HeaderParam(value="Content-Disposition") org.glassfish.jersey.media.multipart.ContentDisposition contentDisposition, @HeaderParam(value="Content-Type") javax.ws.rs.core.MediaType requestContentType, @HeaderParam(value="Slug") String slug, InputStream requestBodyStream, @HeaderParam(value="Link") String link, @HeaderParam(value="Digest") String digest) throws InvalidChecksumException, IOException, MalformedRdfException
contentDisposition
- the content Disposition valuerequestContentType
- the request content typeslug
- the slug valuerequestBodyStream
- the request body streamlink
- the link valuedigest
- the digest headerInvalidChecksumException
- if invalid checksum exception occurredIOException
- if IO exception occurredMalformedRdfException
- if malformed rdf exception occurredprotected void addResourceHttpHeaders(FedoraResource resource)
ContentExposingResource
addResourceHttpHeaders
in class ContentExposingResource
resource
- the resourceprotected String externalPath()
externalPath
in class ContentExposingResource
Copyright © 2013–2018 DuraSpace, Inc.. All rights reserved.