public class HttpResourceConverter extends IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource>
Modifier and Type | Field and Description |
---|---|
protected com.google.common.base.Converter<String,String> |
forward |
protected com.google.common.base.Converter<String,String> |
reverse |
protected List<com.google.common.base.Converter<String,String>> |
translationChain |
Constructor and Description |
---|
HttpResourceConverter(HttpSession session,
javax.ws.rs.core.UriBuilder uriBuilder)
Create a new identifier converter within the given session with the given URI template
|
Modifier and Type | Method and Description |
---|---|
String |
asString(org.apache.jena.rdf.model.Resource resource)
Convert the given resource into a plain string representation of the conversion to the resource
|
static String |
convertToExternalPath(String path)
Converts internal path segments to their external formats.
|
protected org.apache.jena.rdf.model.Resource |
doBackward(FedoraResource resource) |
protected FedoraResource |
doForward(org.apache.jena.rdf.model.Resource resource) |
protected org.springframework.context.ApplicationContext |
getApplicationContext() |
protected List<com.google.common.base.Converter<String,String>> |
getTranslationChain() |
boolean |
inDomain(org.apache.jena.rdf.model.Resource resource)
Check if the given resource is in the domain of this converter
|
protected void |
resetTranslationChain() |
org.apache.jena.rdf.model.Resource |
toDomain(String path)
Convert a plain string to a resource appropriate to this converter
|
andThen, apply, convert, convertAll, equals, from, identity, reverse
protected List<com.google.common.base.Converter<String,String>> translationChain
public HttpResourceConverter(HttpSession session, javax.ws.rs.core.UriBuilder uriBuilder)
session
- the sessionuriBuilder
- the uri builderprotected FedoraResource doForward(org.apache.jena.rdf.model.Resource resource)
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 resource)
IdentifierConverter
inDomain
in class IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource>
resource
- the given resourcepublic org.apache.jena.rdf.model.Resource toDomain(String path)
IdentifierConverter
toDomain
in class IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource>
path
- the plain string resourcepublic String asString(org.apache.jena.rdf.model.Resource resource)
IdentifierConverter
asString
in class IdentifierConverter<org.apache.jena.rdf.model.Resource,FedoraResource>
resource
- the given resourcepublic static String convertToExternalPath(String path)
path
- the internal pathprotected void resetTranslationChain()
protected List<com.google.common.base.Converter<String,String>> getTranslationChain()
protected org.springframework.context.ApplicationContext getApplicationContext()
Copyright © 2013–2019 DuraSpace, Inc.. All rights reserved.