Package org.fcrepo.http.commons
Class AbstractResource
- java.lang.Object
-
- org.fcrepo.http.commons.AbstractResource
-
public class AbstractResource extends Object
Superclass for Fedora JAX-RS Resources, providing convenience fields and methods.- Author:
- ajs6f
-
-
Field Summary
Fields Modifier and Type Field Description protected org.fcrepo.kernel.api.services.functions.UniqueValueSupplierdefaultPidMinterprotected javax.ws.rs.core.HttpHeadersheadersFor getting user agentprotected Supplier<String>pidMinterA resource that can mint new Fedora PIDs.protected org.fcrepo.kernel.api.models.ResourceFactoryresourceFactoryprotected org.fcrepo.kernel.api.services.TimeMapServicetimeMapServiceThe timemap serviceprotected javax.ws.rs.core.UriInfouriInfoUseful for constructing URLsprotected org.fcrepo.kernel.api.services.VersionServiceversionServiceThe version service
-
Constructor Summary
Constructors Constructor Description AbstractResource()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringtoPath(org.fcrepo.kernel.api.identifiers.IdentifierConverter<org.apache.jena.rdf.model.Resource,org.fcrepo.kernel.api.models.FedoraResource> idTranslator, String originalPath)Convert a JAX-RS list of PathSegments to a JCR path
-
-
-
Field Detail
-
uriInfo
@Context protected javax.ws.rs.core.UriInfo uriInfo
Useful for constructing URLs
-
headers
@Context protected javax.ws.rs.core.HttpHeaders headers
For getting user agent
-
resourceFactory
@Inject protected org.fcrepo.kernel.api.models.ResourceFactory resourceFactory
-
versionService
@Inject protected org.fcrepo.kernel.api.services.VersionService versionService
The version service
-
timeMapService
@Inject protected org.fcrepo.kernel.api.services.TimeMapService timeMapService
The timemap service
-
pidMinter
@Inject @Optional protected Supplier<String> pidMinter
A resource that can mint new Fedora PIDs.
-
defaultPidMinter
protected org.fcrepo.kernel.api.services.functions.UniqueValueSupplier defaultPidMinter
-
-
Constructor Detail
-
AbstractResource
public AbstractResource()
-
-
Method Detail
-
toPath
public static String toPath(org.fcrepo.kernel.api.identifiers.IdentifierConverter<org.apache.jena.rdf.model.Resource,org.fcrepo.kernel.api.models.FedoraResource> idTranslator, String originalPath)
Convert a JAX-RS list of PathSegments to a JCR path- Parameters:
idTranslator- the id translatororiginalPath- the original path- Returns:
- String jcr path
-
-