isDefaultGraph property

bool get isDefaultGraph

Whether this quad belongs to the default graph

Returns true if this quad's graph name is null, indicating it belongs to the default graph. According to RDF 1.1 Dataset specification, every dataset has exactly one default graph that has no name.

Returns: true if this quad is in the default graph, false if it's in a named graph.

Example:

final defaultQuad = Quad(alice, foaf.name, aliceName);
final namedQuad = Quad(bob, foaf.age, bobAge, peopleGraph);

assert(defaultQuad.isDefaultGraph == true);
assert(namedQuad.isDefaultGraph == false);

Implementation

bool get isDefaultGraph => graphName == null;