fromTriples static method
Creates an RDF graph from a list of triples (factory constructor)
This is a convenience factory method equivalent to the default constructor.
Parameters:
triplesThe collection of triples to include in the graph.enableIndexingWhether to enable lazy indexing for query optimization. When enabled, an internal index is created lazily on first query to improve performance. The index is only built when needed, so enabling this option has no immediate memory cost. Defaults to true.
Example:
final graph = RdfGraph.fromTriples(myTriples);
final unindexedGraph = RdfGraph.fromTriples(myTriples, enableIndexing: false);
Implementation
static RdfGraph fromTriples(Iterable<Triple> triples,
{bool enableIndexing = true}) =>
RdfGraph(triples: triples, enableIndexing: enableIndexing);