public class DefaultIdentifierTranslator extends IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource>
IdentifierConverter
which translates JCR paths into
un-dereference-able Fedora subjects (by replacing JCR-specific names with
Fedora names). Should not be used except in "embedded" deployments in which
no publication of translated identifiers is expected!Modifier and Type | Field and Description |
---|---|
protected com.google.common.base.Converter<String,String> |
forward |
static String |
RESOURCE_NAMESPACE
Default namespace to use for node URIs
|
protected com.google.common.base.Converter<String,String> |
reverse |
Constructor and Description |
---|
DefaultIdentifierTranslator(javax.jcr.Session session)
Construct the graph with a placeholder context resource
|
Modifier and Type | Method and Description |
---|---|
String |
asString(com.hp.hpl.jena.rdf.model.Resource subject)
Convert the given resource into a plain string representation of the conversion to the resource
|
protected com.hp.hpl.jena.rdf.model.Resource |
doBackward(FedoraResource resource) |
protected FedoraResource |
doForward(com.hp.hpl.jena.rdf.model.Resource subject) |
boolean |
inDomain(com.hp.hpl.jena.rdf.model.Resource subject)
Check if the given resource is in the domain of this converter
|
com.hp.hpl.jena.rdf.model.Resource |
toDomain(String absPath)
Convert a plain string to a resource appropriate to this converter
|
public static final String RESOURCE_NAMESPACE
public DefaultIdentifierTranslator(javax.jcr.Session session)
session
- the sessionprotected FedoraResource doForward(com.hp.hpl.jena.rdf.model.Resource subject)
doForward
in class com.google.common.base.Converter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource>
protected com.hp.hpl.jena.rdf.model.Resource doBackward(FedoraResource resource)
doBackward
in class com.google.common.base.Converter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource>
public boolean inDomain(com.hp.hpl.jena.rdf.model.Resource subject)
IdentifierConverter
inDomain
in class IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource>
subject
- the given resourcepublic com.hp.hpl.jena.rdf.model.Resource toDomain(String absPath)
IdentifierConverter
toDomain
in class IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource>
absPath
- the plain string resourcepublic String asString(com.hp.hpl.jena.rdf.model.Resource subject)
IdentifierConverter
asString
in class IdentifierConverter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource>
subject
- the given resourceCopyright © 2013–2015 DuraSpace, Inc.. All rights reserved.