IterableAdapter

eu.ostrzyciel.jelly.core.IterableAdapter
See theIterableAdapter companion object
trait IterableAdapter[+TNode, +TTriple, +TQuad, -TGraph, -TDataset]

Generic trait for making converters from graph- and dataset-like structures to scala.collection.immutable.Iterable of triples and quads.

These converters can be used to feed the streaming encoders in the stream module.

Warning: the converters assume that the underlying structures are static! If they change during iteration, the results are undefined.

Type parameters

TDataset

dataset type

TGraph

graph type

TNode

node type

TQuad

quad type

TTriple

triple type

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Extensions

Extensions

extension (dataset: TDataset)
def asGraphs: Iterable[(TNode, Iterable[TTriple])]

Converts the dataset to an iterable of (node, Iterable[Triple]) pairs. This is useful for GRAPHS Jelly streams.

Converts the dataset to an iterable of (node, Iterable[Triple]) pairs. This is useful for GRAPHS Jelly streams.

Attributes

Returns

iterable of (node, Iterable[Triple]) pairs

def asQuads: Iterable[TQuad]

Converts the dataset to an iterable of quads.

Converts the dataset to an iterable of quads.

Attributes

Returns

iterable of quads

extension (graph: TGraph)
def asTriples: Iterable[TTriple]

Converts the graph to an iterable of triples.

Converts the graph to an iterable of triples.

Attributes

Returns

iterable of triples

extension (m: TGraph | TDataset)

Returns the namespace declarations for the dataset.

Returns the namespace declarations for the dataset.

Implementing this is optional. If you don't need to declare namespaces, you can return an empty iterable.

Attributes

Returns

namespace declarations