Struct BlankNode

Inheritance Relationships

Base Type

Struct Documentation

struct BlankNode : public rdf4cpp::Node

Public Functions

BlankNode() noexcept

Constructs the null-bnode

explicit BlankNode(storage::identifier::NodeBackendHandle handle) noexcept
explicit BlankNode(std::string_view identifier, storage::DynNodeStoragePtr node_storage = storage::default_node_storage)

Constructs a bnode from an identifier

BlankNode to_node_storage(storage::DynNodeStoragePtr node_storage) const
BlankNode try_get_in_node_storage(storage::DynNodeStoragePtr node_storage) const noexcept
CowString identifier() const noexcept

Get the string identifier of this. For BlankNode _:abc the identifier is abc.

Returns:

string identifier

FetchOrSerializeResult fetch_or_serialize_identifier(std::string_view &out, writer::BufWriterParts writer) const noexcept

bool serialize(writer::BufWriterParts writer) const noexcept

See Node::serialize

std::strong_ordering order(BlankNode const &other) const noexcept
bool order_eq(BlankNode const &other) const noexcept
bool order_ne(BlankNode const &other) const noexcept
bool eq(BlankNode const &other) const noexcept
bool ne(BlankNode const &other) const noexcept
explicit operator std::string() const noexcept
bool is_literal() const noexcept = delete
bool is_variable() const noexcept = delete
bool is_blank_node() const noexcept = delete
bool is_iri() const noexcept = delete

Public Static Functions

static BlankNode make_null() noexcept

Constructs the null-bnode

static BlankNode make(std::string_view identifier, storage::DynNodeStoragePtr node_storage = storage::default_node_storage)

Constructs a bnode from an identifier

static BlankNode make_unchecked(std::string_view identifier, storage::DynNodeStoragePtr node_storage = storage::default_node_storage)

Constructs a bnode from an identifier

static BlankNode find(std::string_view identifier, storage::DynNodeStoragePtr node_storage = storage::default_node_storage) noexcept

searches for a bnode in the specified node storage and returns it. returns a null bnode, if not found.

Parameters:
  • iri

  • node_storage

Returns:

static void validate(std::string_view identifier)

Validates the given blank node identifier

Parameters:

identifier – identifier to validate

Throws:

ParsingError – if the blank node identifier is not valid

Friends

friend struct Node
friend std::ostream &operator<<(std::ostream &os, BlankNode const &node)