You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Andy Seaborne <an...@apache.org> on 2012/11/22 19:24:09 UTC
PURR -- Sketch draft
** Basic concepts
The most basic RDF concepts.
Node
IRIs
Literal(lexical form, datatype node, lang tag) No "value"
BlankNode
and add in
Var (a named variable), NodeGraph (graph literals)
NodeSymbol (a keyword e.g. ANY for a wildcard)
Adding these generalized-RDF node types both recognizes possible futures
and mean RDF datastructures can be used inside subsystems.
NodeFactory
createIRI, createBNode, createLiteral etc etc.
e.g. A SPARQL query pattern is a graph of triples with variables.
** triples and quads
Triple - three Nodes (this is more generalised than RDF but they arise
in query and in inference; literals-as-subject, bnode-predicates etc)
Generalized triples, for example, turn up in inference and in SPARQL
query. Enforcement-by-type can be done in a presentation API. Here, as
a uniform layer, we need to address the uses that arise in RDF systems.
Quad - four nodes.
** Producer/consumer
SinkTriple
send(Triple)
SinkQuad
send(Quad)
** Sets of ...
Graph
add(Triple)
delete(Triple)
find(S?,P?,O?) -> Iterator<Triple> using a wildcard node for a slot.
X? is concrete node or wild card. Not a named variable.
Not sure about a "removeAll" which would cover the case of "clear()";
Dataset
This is harder -- there are two views of datasets
A default graph and some named graphs
A set of triples and a set of quads.
but a basic approach is a set of quads, where the G slot can indicate
default graph (another NodeSymbol)
add(Quad)
delete(Quad)
find(G,S,P,O)
getGraph(G) -- a view.