graph method

RdfGraph? graph(
  1. RdfGraphName name
)

Retrieve a named graph by its IRI identifier

Looks up a named graph in this dataset using its IRI name. Returns null if no graph with the specified name exists.

Parameters:

  • name The IRI identifier of the graph to retrieve

Returns: The RDF graph associated with the name, or null if not found.

Example:

final graphName = IriTerm('http://example.org/people');
final graph = dataset.graph(graphName);
if (graph != null) {
  print('Found graph with ${graph.size} triples');
} else {
  print('Graph not found');
}

Implementation

RdfGraph? graph(RdfGraphName name) => _namedGraphs[name];