Struct Quad

Inheritance Relationships

Base Type

Struct Documentation

struct Quad : public rdf4cpp::query::QuadPattern

A Quad is an RDF statement which has an additional graph name. Quads are typically used to identify a statement in a named Graph of a RDF Dataset. The Graph name can also be the default Graph.

Public Functions

Quad() noexcept = default

Initializes the Quad entries with null Nodes

Quad(Node subject, Node predicate, Node object) noexcept

The constructed Quad has the default Graph as graph name. The Quad is not validated.

Parameters:
Quad(Node graph, Node subject, Node predicate, Node object) noexcept

Construct a Quad. The Quad is not validated.

Parameters:
bool valid() const noexcept
Statement const &without_graph() const noexcept
Quad to_node_storage(storage::DynNodeStoragePtr node_storage) const
Quad try_get_in_node_storage(storage::DynNodeStoragePtr node_storage) const noexcept
bool serialize_ntriples(writer::BufWriterParts writer) const noexcept
bool serialize_nquads(writer::BufWriterParts writer) const noexcept
bool serialize_turtle(writer::SerializationState &state, writer::BufWriterParts writer) const noexcept
bool serialize_trig(writer::SerializationState &state, writer::BufWriterParts writer) const noexcept

Public Static Functions

static std::optional<Quad> create_validated(Node graph, Node subject, Node predicate, Node object) noexcept

The constructed Quad is validated. The optional result is only present, if it is valid.

Parameters:
Returns:

A Quad if valid otherwise std::optional is empty

static std::optional<Quad> create_validated(Node subject, Node predicate, Node object) noexcept

The constructed Quad has the default Graph as graph name and is validated. The optional result is only present, if it is valid.

Parameters:
Returns:

A Quad if valid otherwise std::optional is empty