@Scope(value="request") @Path(value="/{path: .*}/fcr:transform") public class FedoraTransform 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, headers, nodeService, pidMinter, sessions, uriInfo, versionService
Constructor and Description |
---|
FedoraTransform()
Default entry point
|
FedoraTransform(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
|
Object |
evaluateLdpathProgram(String program)
Execute an LDpath program transform
|
Object |
evaluateTransform(javax.ws.rs.core.MediaType contentType,
InputStream requestBodyStream)
Get the LDPath output as a JSON stream appropriate for e.g.
|
protected String |
externalPath() |
protected javax.jcr.Session |
session() |
void |
setUpRepositoryConfiguration()
Register the LDPath configuration tree in JCR
|
addCacheControlHeaders, checkCacheControlHeaders, evaluateRequestPreconditions, getBinaryContent, getContent, getResourceTriples, getSimpleContentType, getTriples, getTriples, getUri, isRdfContentType, patchResourcewithSparql, replaceResourceBinaryWithStream, replaceResourceWithStream, resource
getBaseUrlProperty, getResourceFromPath, setUpJMSInfo, translator
toPath
@Inject protected javax.jcr.Session session
@PathParam(value="path") protected String externalPath
public FedoraTransform()
public FedoraTransform(String externalPath)
externalPath
- the external path@PostConstruct public void setUpRepositoryConfiguration() throws javax.jcr.RepositoryException, IOException
javax.jcr.RepositoryException
- if repository exception occurredIOException
- if IO exception occurredSecurityException
- if security exception occurred@GET @Path(value="{program}") @Produces(value="application/json") @Timed public Object evaluateLdpathProgram(@PathParam(value="program") String program) throws javax.jcr.RepositoryException
program
- the LDpath programjavax.jcr.RepositoryException
- if repository exception occurred@POST @Consumes(value={"application/rdf+ldpath","application/sparql-query"}) @Produces(value={"application/json","text/tab-separated-values","text/csv","text/sse","text/plain","application/sparql-results+json","application/sparql-results+xml","application/sparql-results+bio","text/turtle","text/rdf+n3","application/n-triples","application/rdf+xml"}) @Timed public Object evaluateTransform(@HeaderParam(value="Content-Type") javax.ws.rs.core.MediaType contentType, InputStream requestBodyStream)
contentType
- the content typerequestBodyStream
- the request body streamprotected javax.jcr.Session session()
session
in class FedoraBaseResource
protected String externalPath()
externalPath
in class ContentExposingResource
protected void addResourceHttpHeaders(FedoraResource resource)
ContentExposingResource
addResourceHttpHeaders
in class ContentExposingResource
resource
- the resourceCopyright © 2013–2015 DuraSpace, Inc.. All rights reserved.