public class ValueConverter extends com.google.common.base.Converter<javax.jcr.Value,com.hp.hpl.jena.rdf.model.RDFNode>
Modifier and Type | Class and Description |
---|---|
protected static class |
ValueConverter.RdfLiteralJcrValueBuilder |
Constructor and Description |
---|
ValueConverter(javax.jcr.Session session,
com.google.common.base.Converter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> graphSubjects)
Convert values between JCR values and RDF objects with the given session and subjects
|
Modifier and Type | Method and Description |
---|---|
protected javax.jcr.Value |
doBackward(com.hp.hpl.jena.rdf.model.RDFNode resource) |
protected com.hp.hpl.jena.rdf.model.RDFNode |
doForward(javax.jcr.Value value) |
static javax.jcr.Node |
nodeForValue(javax.jcr.Session session,
javax.jcr.Value v)
Get the node that a property value refers to.
|
public ValueConverter(javax.jcr.Session session, com.google.common.base.Converter<com.hp.hpl.jena.rdf.model.Resource,FedoraResource> graphSubjects)
session
- the sessiongraphSubjects
- the graph subjectsprotected com.hp.hpl.jena.rdf.model.RDFNode doForward(javax.jcr.Value value)
doForward
in class com.google.common.base.Converter<javax.jcr.Value,com.hp.hpl.jena.rdf.model.RDFNode>
protected javax.jcr.Value doBackward(com.hp.hpl.jena.rdf.model.RDFNode resource)
doBackward
in class com.google.common.base.Converter<javax.jcr.Value,com.hp.hpl.jena.rdf.model.RDFNode>
public static javax.jcr.Node nodeForValue(javax.jcr.Session session, javax.jcr.Value v) throws javax.jcr.RepositoryException
session
- Session to use to load the node.v
- Value that refers to a node.javax.jcr.RepositoryException
- When there is an error accessing the node.RepositoryRuntimeException
- When the value type is not PATH, REFERENCE or WEAKREFERENCE.Copyright © 2013–2015 DuraSpace, Inc.. All rights reserved.