public class BNodeContextFactory extends Object implements BigdataValueFactory
UUID, which is how we ensure that blank nodes generated for different
sources are understood as distinct blank nodes by the database (this is
required).
Note: All BigdataValue instances are in fact created by the delegate
instances created by this class and by the delegate will appear to have been
created by the same factory. This is intentional - it makes the instances
reusable by the base factory.
Note: nextID() is NOT thread-safe, but different documents that are
being passed concurrently will have a distinct instance of this factory and
processing a single document is generally single-threaded.
| Constructor and Description |
|---|
BNodeContextFactory(BigdataValueFactory valueFactory) |
| Modifier and Type | Method and Description |
|---|---|
BigdataBNode |
asValue(org.openrdf.model.BNode v)
Strongly typed for
BNodes. |
BigdataLiteral |
asValue(org.openrdf.model.Literal v)
Strongly typed for
Literals. |
BigdataResource |
asValue(org.openrdf.model.Resource v)
Strongly typed for
Resources. |
BigdataURI |
asValue(org.openrdf.model.URI v)
Strongly typed for
URIs. |
BigdataValue |
asValue(org.openrdf.model.Value v)
Converts a
Value into a BigdataValue. |
BigdataBNode |
createBNode() |
BigdataBNode |
createBNode(BigdataStatement stmt) |
BigdataBNode |
createBNode(String id) |
BigdataLiteral |
createLiteral(boolean arg0) |
BigdataLiteral |
createLiteral(byte arg0) |
BigdataLiteral |
createLiteral(byte arg0,
boolean unsigned) |
BigdataLiteral |
createLiteral(Date arg0) |
BigdataLiteral |
createLiteral(double arg0) |
BigdataLiteral |
createLiteral(float arg0) |
BigdataLiteral |
createLiteral(int arg0) |
BigdataLiteral |
createLiteral(int arg0,
boolean unsigned) |
BigdataLiteral |
createLiteral(long arg0) |
BigdataLiteral |
createLiteral(long arg0,
boolean unsigned) |
BigdataLiteral |
createLiteral(short arg0) |
BigdataLiteral |
createLiteral(short arg0,
boolean unsigned) |
BigdataLiteral |
createLiteral(String label) |
BigdataLiteral |
createLiteral(String label,
String language) |
BigdataLiteral |
createLiteral(String label,
org.openrdf.model.URI datatype) |
BigdataLiteral |
createLiteral(String label,
org.openrdf.model.URI datatype,
String language) |
BigdataLiteral |
createLiteral(XMLGregorianCalendar arg0) |
BigdataStatement |
createStatement(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o)
Create a statement whose
StatementEnum is NOT specified. |
BigdataStatement |
createStatement(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.Resource c)
Create a statement whose
StatementEnum is NOT specified. |
BigdataStatement |
createStatement(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.Resource c,
StatementEnum type)
Create a statement (core impl).
|
BigdataStatement |
createStatement(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.Resource c,
StatementEnum type,
boolean userFlag)
Create a statement (core impl).
|
BigdataURI |
createURI(String uriString) |
BigdataURI |
createURI(String namespace,
String localName) |
BigdataLiteral |
createXSDDateTime(long timestamp) |
String |
getNamespace()
The namespace of the KB instance associated with the value factory.
|
BigdataValueSerializer<BigdataValue> |
getValueSerializer()
An object that can efficiently (de-)serialize
Values using this
ValueFactory. |
BigdataValueFactory |
newBNodeContext()
Recursive contexts are not available (should not be necessary, right?)
|
protected String |
nextID()
A globally unique blank node identifier (ID) created with prefix shared
by all blank nodes whose identifers are generated by this class.
|
void |
remove()
Remove instance of valueFactory from static cache
|
public BNodeContextFactory(BigdataValueFactory valueFactory)
public String getNamespace()
BigdataValueFactorygetNamespace in interface BigdataValueFactorypublic void remove()
BigdataValueFactoryremove in interface BigdataValueFactoryprotected String nextID()
public BigdataBNode createBNode()
createBNode in interface BigdataValueFactorycreateBNode in interface org.openrdf.model.ValueFactorypublic BigdataValue asValue(org.openrdf.model.Value v)
BigdataValueFactoryValue into a BigdataValue. If the value is
already a BigdataValue and it was allocated by this
BigdataValueFactoryImpl then it is returned unchanged. Otherwise a
new BigdataValue will be creating using the same data as the
given value and the term identifier on the new BigdataValue will
be initialized to IRawTripleStore#NULL.
All BigdataValues created by a BigdataValueFactoryImpl
internally store a transient reference to the BigdataValueFactoryImpl.
This reference is used to decide if a BigdataValue MIGHT have
been created by a different lexicon (term identifiers generated by
different lexicons CAN NOT be used interchangeably). This has the effect
of protecting against incorrect use of the term identifier with a
database backed by a different lexicon while allowing reuse of the
BigdataValues when possible.
asValue in interface BigdataValueFactoryv - The value.BigdataValue with the same data. If the value is
null then null is returned.public BigdataBNode createBNode(String id)
createBNode in interface BigdataValueFactorycreateBNode in interface org.openrdf.model.ValueFactorypublic BigdataBNode createBNode(BigdataStatement stmt)
createBNode in interface BigdataValueFactorypublic BigdataLiteral createLiteral(boolean arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface org.openrdf.model.ValueFactorypublic BigdataLiteral createLiteral(byte arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface org.openrdf.model.ValueFactorypublic BigdataLiteral createLiteral(double arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface org.openrdf.model.ValueFactorypublic BigdataLiteral createLiteral(float arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface org.openrdf.model.ValueFactorypublic BigdataLiteral createLiteral(int arg0, boolean unsigned)
createLiteral in interface BigdataValueFactorypublic BigdataLiteral createLiteral(long arg0, boolean unsigned)
createLiteral in interface BigdataValueFactorypublic BigdataLiteral createLiteral(short arg0, boolean unsigned)
createLiteral in interface BigdataValueFactorypublic BigdataLiteral createLiteral(byte arg0, boolean unsigned)
createLiteral in interface BigdataValueFactorypublic BigdataLiteral createLiteral(int arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface org.openrdf.model.ValueFactorypublic BigdataLiteral createLiteral(long arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface org.openrdf.model.ValueFactorypublic BigdataLiteral createLiteral(short arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface org.openrdf.model.ValueFactorypublic BigdataLiteral createLiteral(String label, String language)
createLiteral in interface BigdataValueFactorycreateLiteral in interface org.openrdf.model.ValueFactorypublic BigdataLiteral createLiteral(String label, org.openrdf.model.URI datatype)
createLiteral in interface BigdataValueFactorycreateLiteral in interface org.openrdf.model.ValueFactorypublic BigdataLiteral createLiteral(String label, org.openrdf.model.URI datatype, String language)
createLiteral in interface BigdataValueFactorypublic BigdataLiteral createLiteral(String label)
createLiteral in interface BigdataValueFactorycreateLiteral in interface org.openrdf.model.ValueFactorypublic BigdataLiteral createLiteral(XMLGregorianCalendar arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface org.openrdf.model.ValueFactorypublic BigdataLiteral createLiteral(Date arg0)
createLiteral in interface BigdataValueFactorycreateLiteral in interface org.openrdf.model.ValueFactorypublic BigdataStatement createStatement(org.openrdf.model.Resource s, org.openrdf.model.URI p, org.openrdf.model.Value o)
BigdataValueFactoryStatementEnum is NOT specified.createStatement in interface BigdataValueFactorycreateStatement in interface org.openrdf.model.ValueFactorypublic BigdataStatement createStatement(org.openrdf.model.Resource s, org.openrdf.model.URI p, org.openrdf.model.Value o, org.openrdf.model.Resource c)
BigdataValueFactoryStatementEnum is NOT specified.createStatement in interface BigdataValueFactorycreateStatement in interface org.openrdf.model.ValueFactorypublic BigdataStatement createStatement(org.openrdf.model.Resource s, org.openrdf.model.URI p, org.openrdf.model.Value o, org.openrdf.model.Resource c, StatementEnum type)
BigdataValueFactoryBigdataValueFactory using
BigdataValueFactory.asValue(Value).createStatement in interface BigdataValueFactorys - The subject.p - The predicate.o - The object.c - The context (optional). Note: When non-null
and statement identifiers are enabled, then this will be a
blank node whose term identifier is the statement identifier.type - The statement type (optional).public BigdataStatement createStatement(org.openrdf.model.Resource s, org.openrdf.model.URI p, org.openrdf.model.Value o, org.openrdf.model.Resource c, StatementEnum type, boolean userFlag)
BigdataValueFactoryBigdataValueFactory using
BigdataValueFactory.asValue(Value).createStatement in interface BigdataValueFactorys - The subject.p - The predicate.o - The object.c - The context (optional). Note: When non-null
and statement identifiers are enabled, then this will be a
blank node whose term identifier is the statement identifier.type - The statement type (optional).userFlag - The user flagpublic BigdataURI createURI(String namespace, String localName)
createURI in interface BigdataValueFactorycreateURI in interface org.openrdf.model.ValueFactorypublic BigdataURI createURI(String uriString)
createURI in interface BigdataValueFactorycreateURI in interface org.openrdf.model.ValueFactorypublic BigdataValueSerializer<BigdataValue> getValueSerializer()
BigdataValueFactoryValues using this
ValueFactory. When the values are de-serialized they will have a
reference to this BigdataValueFactoryImpl. That reference can be
used to identify when two BigdataValues MIGHT be from different
lexicons.getValueSerializer in interface BigdataValueFactorypublic BigdataValueFactory newBNodeContext()
newBNodeContext in interface BigdataValueFactoryBNodeContextFactorypublic BigdataResource asValue(org.openrdf.model.Resource v)
BigdataValueFactoryResources.asValue in interface BigdataValueFactorypublic BigdataURI asValue(org.openrdf.model.URI v)
BigdataValueFactoryURIs.asValue in interface BigdataValueFactorypublic BigdataLiteral asValue(org.openrdf.model.Literal v)
BigdataValueFactoryLiterals.asValue in interface BigdataValueFactorypublic BigdataBNode asValue(org.openrdf.model.BNode v)
BigdataValueFactoryBNodes.asValue in interface BigdataValueFactorypublic BigdataLiteral createXSDDateTime(long timestamp)
createXSDDateTime in interface BigdataValueFactoryCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.