public class PrefixingIdentifierTranslator extends IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource>
IdentifierConverter
which translates JCR paths into Fedora subjects with
a configurable resource namespace (e.g., a baseURL). When a REST API context is available for
constructing URIs, org.fcrepo.http.commons.api.rdf.HttpResourceConverter should be used instead.Constructor and Description |
---|
PrefixingIdentifierTranslator(javax.jcr.Session session,
String resourceNamespace)
Construct the graph with the provided resource namespace, which will translate JCR paths into
URIs prefixed with that namespace.
|
Modifier and Type | Method and Description |
---|---|
String |
asString(org.apache.jena.rdf.model.Resource subject)
Convert the given resource into a plain string representation of the conversion to the resource
|
protected org.apache.jena.rdf.model.Resource |
doBackward(FedoraResource resource) |
protected FedoraResource |
doForward(org.apache.jena.rdf.model.Resource subject) |
boolean |
inDomain(org.apache.jena.rdf.model.Resource subject)
Check if the given resource is in the domain of this converter
|
org.apache.jena.rdf.model.Resource |
toDomain(String absPath)
Convert a plain string to a resource appropriate to this converter
|
andThen, apply, convert, convertAll, equals, from, identity, reverse
public PrefixingIdentifierTranslator(javax.jcr.Session session, String resourceNamespace)
session
- Session to lookup nodesresourceNamespace
- Resource namespace (i.e., base URL)protected FedoraResource doForward(org.apache.jena.rdf.model.Resource subject)
doForward
in class com.google.common.base.Converter<org.apache.jena.rdf.model.Resource,FedoraResource>
protected org.apache.jena.rdf.model.Resource doBackward(FedoraResource resource)
doBackward
in class com.google.common.base.Converter<org.apache.jena.rdf.model.Resource,FedoraResource>
public boolean inDomain(org.apache.jena.rdf.model.Resource subject)
IdentifierConverter
inDomain
in class IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource>
subject
- the given resourcepublic org.apache.jena.rdf.model.Resource toDomain(String absPath)
IdentifierConverter
toDomain
in class IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource>
absPath
- the plain string resourcepublic String asString(org.apache.jena.rdf.model.Resource subject)
IdentifierConverter
asString
in class IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource>
subject
- the given resourceCopyright © 2013–2019 DuraSpace, Inc.. All rights reserved.