@Scope(value="request") @Path(value="/{path: .*}") public class FedoraLdp extends ContentExposingResource
Modifier and Type | Field and Description |
---|---|
protected String |
externalPath |
protected javax.jcr.Session |
session |
MESSAGE_EXTERNAL_BODY, prefer, request, resource, servletResponse
idTranslator
binaryService, containerService, eventBus, 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(String checksum,
org.glassfish.jersey.media.multipart.ContentDisposition contentDisposition,
javax.ws.rs.core.MediaType requestContentType,
String slug,
InputStream requestBodyStream)
Creates a new object.
|
javax.ws.rs.core.Response |
createOrReplaceObjectRdf(javax.ws.rs.core.MediaType requestContentType,
InputStream requestBodyStream,
String checksum,
org.glassfish.jersey.media.multipart.ContentDisposition contentDisposition,
String ifMatch)
Create a resource at a specified path, or replace triples with provided RDF.
|
javax.ws.rs.core.Response |
deleteObject()
Deletes an object.
|
javax.ws.rs.core.Response |
describe(String rangeValue)
Retrieve the node profile
|
protected String |
externalPath() |
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
|
protected javax.jcr.Session |
session() |
javax.ws.rs.core.Response |
updateSparql(InputStream requestBodyStream)
Update an object using SPARQL-UPDATE
|
addCacheControlHeaders, checkCacheControlHeaders, evaluateRequestPreconditions, getBinaryContent, getContent, getResourceTriples, getSimpleContentType, getTriples, getTriples, getUri, isRdfContentType, patchResourcewithSparql, replaceResourceBinaryWithStream, replaceResourceWithStream, resource
getResourceFromPath, setUpJMSBaseURIs, translator
toPath
@Inject protected javax.jcr.Session session
@PathParam(value="path") protected String externalPath
public FedoraLdp()
@PostConstruct public void postConstruct()
@HEAD @Timed public javax.ws.rs.core.Response head()
javax.jcr.RepositoryException
@OPTIONS @Timed public javax.ws.rs.core.Response options()
@GET @Produces(value={"text/turtle;qs=10","application/ld+json;qs=8","text/rdf+n3","text/n3","application/rdf+xml","application/n-triples","application/xml","text/plain","application/x-turtle","text/html","application/xhtml+xml","*/*"}) public javax.ws.rs.core.Response describe(@HeaderParam(value="Range") String rangeValue) throws IOException
javax.jcr.RepositoryException
IOException
@DELETE @Timed public javax.ws.rs.core.Response deleteObject()
javax.jcr.RepositoryException
@PUT @Consumes @Timed public javax.ws.rs.core.Response createOrReplaceObjectRdf(@HeaderParam(value="Content-Type") javax.ws.rs.core.MediaType requestContentType, InputStream requestBodyStream, @QueryParam(value="checksum") String checksum, @HeaderParam(value="Content-Disposition") org.glassfish.jersey.media.multipart.ContentDisposition contentDisposition, @HeaderParam(value="If-Match") String ifMatch) throws InvalidChecksumException, MalformedRdfException
requestContentType
- requestBodyStream
- javax.jcr.RepositoryException
InvalidChecksumException
MalformedRdfException
@Consumes(value="application/sparql-update") @Timed public javax.ws.rs.core.Response updateSparql(InputStream requestBodyStream) throws IOException, MalformedRdfException
javax.jcr.RepositoryException
IOException
MalformedRdfException
@POST @Consumes(value={"application/octet-stream;qs=1001","*/*"}) @Timed public javax.ws.rs.core.Response createObject(@QueryParam(value="checksum") String checksum, @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) throws InvalidChecksumException, IOException, MalformedRdfException
javax.jcr.RepositoryException
InvalidChecksumException
IOException
MalformedRdfException
protected void addResourceHttpHeaders(FedoraResource resource)
ContentExposingResource
addResourceHttpHeaders
in class ContentExposingResource
protected String externalPath()
externalPath
in class ContentExposingResource
protected javax.jcr.Session session()
session
in class FedoraBaseResource
Copyright © 2013-2015 DuraSpace, Inc.. All Rights Reserved.