@Scope(value="request") @Path(value="/{path: .*}") public class FedoraLdp extends ContentExposingResource
Modifier and Type | Field and Description |
---|---|
protected String |
externalPath |
ACCEPT_DATETIME, context, extContentHandlerFactory, lockManager, namespaceRegistry, prefer, request, RFC3230_SPLITTER, servletResponse
idTranslator, securityContext, session
binaryService, containerService, defaultPidMinter, headers, nodeService, pidMinter, 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
|
protected void |
checkForInsufficientStorageException(Throwable rootThrowable,
Throwable throwable) |
javax.ws.rs.core.Response |
createObject(org.glassfish.jersey.media.multipart.ContentDisposition contentDisposition,
javax.ws.rs.core.MediaType requestContentType,
String slug,
InputStream requestBodyStream,
List<String> rawLinks,
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,
List<String> rawLinks,
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.
|
protected static Collection<String> |
parseDigestHeader(String digest)
Parse the RFC-3230 Digest response header value.
|
javax.ws.rs.core.Response |
updateSparql(InputStream requestBodyStream)
Update an object using SPARQL-UPDATE
|
addCacheControlHeaders, addExternalContentHeaders, addLinkAndOptionsHttpHeaders, buildLink, checkCacheControlHeaders, checksumURI, createUpdateResponse, evaluateRequestPreconditions, getBinaryResourceMediaType, getChildrenLimit, getContent, getResourceTriples, getSimpleContentType, getUri, hasRestrictedPath, isRdfContentType, patchResourcewithSparql, postConstruct, replaceResourceBinaryWithStream, replaceResourceWithStream, resource, setVaryAndPreferenceAppliedHeaders, unpackLinks
asNode, getResourceFromPath, getUserPrincipal, setUpJMSInfo, translator
toPath
@PathParam(value="path") protected String externalPath
public FedoraLdp()
@HEAD @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() throws UnsupportedAlgorithmException
UnsupportedAlgorithmException
- if unsupported digest algorithm occurred@OPTIONS 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, UnsupportedAlgorithmException
rangeValue
- the range valueIOException
- if IO exception occurredUnsupportedAlgorithmException
- if unsupported digest algorithm occurred@DELETE public javax.ws.rs.core.Response deleteObject()
@PUT @Consumes 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") List<String> rawLinks, @HeaderParam(value="Digest") String digest) throws InvalidChecksumException, MalformedRdfException, UnsupportedAlgorithmException
requestContentType
- the request content typerequestBodyStream
- the request body streamcontentDisposition
- the content disposition valueifMatch
- the if-match valuerawLinks
- the raw link valuesdigest
- the digest headerInvalidChecksumException
- if invalid checksum exception occurredMalformedRdfException
- if malformed rdf exception occurredUnsupportedAlgorithmException
- if an unsupported algorithm exception occurs@Consumes(value="application/sparql-update") 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","*/*"}) @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") List<String> rawLinks, @HeaderParam(value="Digest") String digest) throws InvalidChecksumException, MalformedRdfException, UnsupportedAlgorithmException
contentDisposition
- the content Disposition valuerequestContentType
- the request content typeslug
- the slug valuerequestBodyStream
- the request body streamrawLinks
- the link valuesdigest
- the digest headerInvalidChecksumException
- if invalid checksum exception occurredMalformedRdfException
- if malformed rdf exception occurredUnsupportedAlgorithmException
- if an unsupported algorithm exception occursprotected void checkForInsufficientStorageException(Throwable rootThrowable, Throwable throwable) throws InvalidChecksumException
checkForInsufficientStorageException
in class ContentExposingResource
rootThrowable
- The original throwablethrowable
- The throwable under direct scrutiny.InvalidChecksumException
- in case there was a checksum mismatchprotected void addResourceHttpHeaders(FedoraResource resource)
ContentExposingResource
addResourceHttpHeaders
in class ContentExposingResource
resource
- the resourceprotected String externalPath()
externalPath
in class ContentExposingResource
protected static Collection<String> parseDigestHeader(String digest) throws UnsupportedAlgorithmException
digest
- The Digest header valueUnsupportedAlgorithmException
- if an unsupported digest is usedCopyright © 2013–2018 DuraSpace, Inc.. All rights reserved.