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.| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.base.Converter<String,String> |
forward |
protected com.google.common.base.Converter<String,String> |
reverse |
| 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
|
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)
IdentifierConverterinDomain in class IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource>subject - the given resourcepublic org.apache.jena.rdf.model.Resource toDomain(String absPath)
IdentifierConvertertoDomain in class IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource>absPath - the plain string resourcepublic String asString(org.apache.jena.rdf.model.Resource subject)
IdentifierConverterasString in class IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource>subject - the given resourceCopyright © 2013–2017 DuraSpace, Inc.. All rights reserved.