public class RdbmsValueFactory extends ValueFactoryBase
RdbmsValue
s behaviour similar to the default
Value
implementation with the addition that they also include an
internal id and a version associated with that id. The internal ids should
not be accessed directly, but rather either through this class or the
corresponding manager class.Constructor and Description |
---|
RdbmsValueFactory() |
Modifier and Type | Method and Description |
---|---|
RdbmsLiteral |
asRdbmsLiteral(Literal literal) |
RdbmsResource[] |
asRdbmsResource(Resource... contexts) |
RdbmsResource |
asRdbmsResource(Resource node) |
RdbmsStatement |
asRdbmsStatement(Statement stmt) |
RdbmsURI |
asRdbmsURI(URI uri) |
RdbmsValue |
asRdbmsValue(Value value) |
RdbmsBNode |
createBNode(String nodeID)
Creates a new blank node with the given node identifier.
|
RdbmsLiteral |
createLiteral(String label)
Creates a new literal with the supplied label.
|
RdbmsLiteral |
createLiteral(String label,
String language)
Creates a new literal with the supplied label and language attribute.
|
RdbmsLiteral |
createLiteral(String label,
URI datatype)
Creates a new literal with the supplied label and datatype.
|
RdbmsStatement |
createStatement(Resource subject,
URI predicate,
Value object)
Creates a new statement with the supplied subject, predicate and object.
|
RdbmsStatement |
createStatement(Resource subject,
URI predicate,
Value object,
Resource context)
Creates a new statement with the supplied subject, predicate and object
and associated context.
|
RdbmsURI |
createURI(String uri)
Creates a new URI from the supplied string-representation.
|
RdbmsURI |
createURI(String namespace,
String localName)
Creates a new URI from the supplied namespace and local name.
|
void |
flush() |
Lock |
getIdReadLock() |
Lock |
getIdWriteLock() |
Number |
getInternalId(Value r) |
Number |
getPredicateId(RdbmsURI predicate) |
RdbmsLiteral |
getRdbmsLiteral(Number num,
String label,
String language,
String datatype) |
RdbmsResource |
getRdbmsResource(Number num,
String stringValue) |
void |
setBNodeManager(BNodeManager bnodes) |
void |
setDelegate(ValueFactory vf) |
void |
setIdSequence(IdSequence ids) |
void |
setLiteralManager(LiteralManager literals) |
void |
setPredicateManager(PredicateManager predicates) |
void |
setURIManager(UriManager uris) |
Lock |
tryIdWriteLock() |
createBNode, createFPLiteral, createIntegerLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createNumericLiteral, initBNodeParams
@Deprecated public static final String NIL_LABEL
public void setIdSequence(IdSequence ids)
public void setBNodeManager(BNodeManager bnodes)
public void setURIManager(UriManager uris)
public void setLiteralManager(LiteralManager literals)
public void setPredicateManager(PredicateManager predicates)
public void setDelegate(ValueFactory vf)
public void flush() throws RdbmsException
RdbmsException
public RdbmsBNode createBNode(String nodeID)
ValueFactory
nodeID
- The blank node identifier.public RdbmsLiteral createLiteral(String label)
ValueFactory
label
- The literal's label.public RdbmsLiteral createLiteral(String label, String language)
ValueFactory
label
- The literal's label.language
- The literal's language attribute, or null if the literal
doesn't have a language.public RdbmsLiteral createLiteral(String label, URI datatype)
ValueFactory
label
- The literal's label.datatype
- The literal's datatype, or null if the literal doesn't
have a datatype.public RdbmsStatement createStatement(Resource subject, URI predicate, Value object)
ValueFactory
subject
- The statement's subject.predicate
- The statement's predicate.object
- The statement's object.public RdbmsStatement createStatement(Resource subject, URI predicate, Value object, Resource context)
ValueFactory
subject
- The statement's subject.predicate
- The statement's predicate.object
- The statement's object.context
- The statement's context.public RdbmsURI createURI(String uri)
ValueFactory
uri
- A string-representation of a URI.public RdbmsURI createURI(String namespace, String localName)
ValueFactory
createURI(namespace+localName)
, but allows the ValueFactory to reuse
supplied namespace and local name strings whenever possible. Note that the
values returned by URI.getNamespace()
and
URI.getLocalName()
are not necessarily the same as the values that
are supplied to this method.namespace
- The URI's namespace.localName
- The URI's local name.public RdbmsResource getRdbmsResource(Number num, String stringValue)
public RdbmsLiteral getRdbmsLiteral(Number num, String label, String language, String datatype)
public RdbmsResource asRdbmsResource(Resource node)
public RdbmsValue asRdbmsValue(Value value)
public RdbmsLiteral asRdbmsLiteral(Literal literal)
public RdbmsResource[] asRdbmsResource(Resource... contexts)
public RdbmsStatement asRdbmsStatement(Statement stmt)
public Number getInternalId(Value r) throws RdbmsException
RdbmsException
public Number getPredicateId(RdbmsURI predicate) throws RdbmsException
RdbmsException
public Lock getIdReadLock() throws InterruptedException
InterruptedException
public Lock tryIdWriteLock()
public Lock getIdWriteLock() throws InterruptedException
InterruptedException
Copyright © 2001–2016 Aduna. All rights reserved.