public interface IStatementBuffer<F extends org.openrdf.model.Statement> extends IBuffer<F>
Statement
s into an
AbstractTripleStore
.Modifier and Type | Method and Description |
---|---|
void |
add(F stmt)
Add a statement to the buffer.
|
void |
add(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o)
Add an "explicit" statement to the buffer with a "null" context.
|
void |
add(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.Resource c)
Add an "explicit" statement to the buffer.
|
void |
add(org.openrdf.model.Resource s,
org.openrdf.model.URI p,
org.openrdf.model.Value o,
org.openrdf.model.Resource c,
StatementEnum type)
Add a statement to the buffer.
|
AbstractTripleStore |
getDatabase()
The database that will be used to resolve terms.
|
AbstractTripleStore |
getStatementStore()
The optional store into which statements will be inserted when non-
null . |
void |
setBNodeMap(Map<String,BigdataBNode> bnodes)
Set the canonicalizing map for blank nodes based on their ID.
|
AbstractTripleStore getStatementStore()
null
.AbstractTripleStore getDatabase()
getStatementStore()
is null
, statements will be
written into this store as well.void add(F stmt)
add
in interface IBuffer<F extends org.openrdf.model.Statement>
stmt
- The statement. If stmt implements
BigdataStatement
then the StatementEnum
will
be used (this makes it possible to load axioms into the
database as axioms) but the term identifiers on the stmt's
values will be ignored.void add(org.openrdf.model.Resource s, org.openrdf.model.URI p, org.openrdf.model.Value o)
s
- The subject.p
- The predicate.o
- The object.void add(org.openrdf.model.Resource s, org.openrdf.model.URI p, org.openrdf.model.Value o, org.openrdf.model.Resource c)
s
- The subject.p
- The predicate.o
- The object.c
- The context (optional).void add(org.openrdf.model.Resource s, org.openrdf.model.URI p, org.openrdf.model.Value o, org.openrdf.model.Resource c, StatementEnum type)
Note: The context parameter (c) is NOT used. The database at this time is either a triple store or a triple store with statement identifiers, and in neither case is the context used.
s
- The subject.p
- The predicate.o
- The object.c
- The context (optional).type
- The statement type (optional).void setBNodeMap(Map<String,BigdataBNode> bnodes)
IStatementBuffer
instances. For example, the BigdataSail
does this so that the
same bnode map is used throughout the life of a SailConnection
.
While RIO provides blank node correlation within a given source, it does
NOT provide blank node correlation across sources. You need to use this
method to do that.
Note: It is reasonable to expect that the bnodes map is used by
concurrent threads. For this reason, the map SHOULD be thread-safe. This
can be accomplished either using Collections.synchronizedMap(Map)
or a ConcurrentHashMap
. However, implementations MUST still be
synchronized on the map reference across operations which conditionally
insert into the map in order to make that update atomic and thread-safe.
Otherwise a race condition exists for the conditional insert and
different threads could get incoherent answers.
bnodes
- The blank nodes map.IllegalArgumentException
- if the argument is null
.IllegalStateException
- if the map has already been allocated.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.