Skip to content

Commit 21e0913

Browse files
committed
StackableSail
Signed-off-by: Jeen Broekstra <jeen.broekstra@gmail.com>
1 parent 7ddd005 commit 21e0913

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

doc/sail/index.adoc

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ Sail "1" *- "*" SailConnection
6666
6767
....
6868

69-
In diagram <<figure-sail-main>> we see an overview of the two main interfaces: `Sail`, and `SailConnection`. Although SAIL is not a JDBC implementation, its design is inspired by it.
70-
The `Sail` interface is the main access point for RDF storage. Roughly speaking, this is "the database". Each `Sail` object is composed of zero or more `SailConnection` objects. This is where all the actual database access functionality is concentrated. `SailConnection` provides methods to execute queries, retrieve and modify triples, and manage transactions.
69+
In diagram <<figure-sail-main>> we see an overview of the two main interfaces: `Sail`, and `SailConnection`. The `Sail` interface is the main access point for RDF storage. Roughly speaking, this is "the database". Each `Sail` object is composed of zero or more `SailConnection` objects. This is where all the actual database access functionality is concentrated. `SailConnection` provides methods to execute queries, retrieve and modify triples, and manage transactions.
7170

7271
=== AbstractSail and AbstractSailConnection
7372

@@ -235,16 +234,28 @@ More fine-grained event data is available at the Connection level. The `Notifyin
235234
RDF4J also provides base implementation classes for these two interfaces. As can be seen in diagram <<figure-notifying-sail>>, these classes - `AbstractNotifyingSail` and `AbstractNotifyingSailConnection` - are extensions of the AbstractSail(Connection) classes that add
236235
default implementations of the methods defined in the NotifyingSail(Connection) interfaces.
237236

238-
=== StackableSail
237+
=== Stacking SAILs
239238

240-
TODO
239+
.Stackable SAIL interface
240+
[[figure-stackable-sail]]
241+
[plantuml, diagram-stackable-sail, png]
242+
....
243+
interface Sail
244+
interface StackableSail {
245+
+ setBaseSail(Sail)
246+
+ getBaseSail()
247+
}
248+
249+
Sail <|-- StackableSail
250+
....
251+
252+
The SAIL API provides the `StackableSail` interface to allow SAIL implementations to "stack" on top of each other, providing a chain of responsility: each SAIL implementation in the stack implements a specific feature (reasoning, access control, data filtering, query expansion, etc. etc.). The last SAIL implementation in the stack is expected to _not_ implement `StackableSail`, and this Sail is responsible for the actual persistence of the data. RDF4J's `NativeStore` and `MemoryStore` are implementations of such a persistence SAIL, while the `ForwardChainingRDFSInferencer` (responsible for RDFS inferencing) and `LuceneSail` (responsible for full-text indexing) are examples of `StackableSail` implementations.
241253

242254
== Querying
243255

244256
The SAIL API has no knowledge of SPARQL queries. Instead, it operates on a query algebra, that is, an object representation of a (SPARQL) query as provided by the SPARQL query parser.
245257

246-
`SailConnection` has a single `evaluate()` method, which accepts a `TupleExpr` object. This is the object representation of the query as produced by the query parser.
247-
258+
`SailConnection` has a single `evaluate()` method, which accepts a `org.eclipse.rdf4j.queryalgebra.model.TupleExpr` object. This is the object representation of the query as produced by the query parser.
248259

249260
== Transactions
250261

0 commit comments

Comments
 (0)