Struct Dataset

Nested Relationships

Nested Types

Struct Documentation

struct Dataset

Public Types

using value_type = Quad
using sentinel = std::default_sentinel_t
using reference = Quad const&
using const_reference = reference
using pointer = Quad const*
using const_pointer = pointer
using size_type = size_t
using difference_type = ptrdiff_t
using const_iterator = iterator

Public Functions

explicit Dataset(storage::DynNodeStoragePtr node_storage = storage::default_node_storage)
void add(Quad const &quad)
bool contains(Quad const &quad) const noexcept
size_t size() const noexcept
size_t size(IRI const &graph_name) const noexcept
Graph *find_graph(Node const &graph)
Graph *find_graph()
Graph const *find_graph(Node const &graph) const
Graph const *find_graph() const
Graph &graph(Node const &graph)
Graph &graph()
iterator begin() const noexcept
sentinel end() const noexcept
solution_sequence match(query::QuadPattern const &quad_pattern) const noexcept
bool serialize_trig(writer::BufWriterParts writer) const noexcept

Serialize this dataset as TriG. This function will internally create a SerializationState and call begin and flush on it when appropriate.

Parameters:

writer – writer parts

Returns:

true if serialization was successful, false if a call to W::flush was not able to make room

Dataset anonymize(util::Anonymizer &anonymizer) const

Anonymize the dataset by removing all information except for the dataset structure itself.

See rdf4cpp::util::Anonymizer for details

Public Members

template<typename ErrF = decltype([](parser::ParsingError) noexcept {})> void load_rdf_data(std::istream &rdf_file, parser::ParsingFlags flags=parser::ParsingFlags::none(), parser::ParsingState *state=nullptr, ErrF &&errf={}) requires std bool serialize_trig (writer::SerializationState &state, writer::BufWriterParts writer) const noexcept

Serialize this dataset as N-Quads.

Param writer:

writer parts

Param state:

serialization state

Param writer:

writer parts

Return:

true if serialization was successful, false if a call to flush was not able to make room Serialize this dataset as TriG. This function does not call begin or flush on the given state, it just serialized the contents of this Dataset using it.

Return:

true if serialization was successful, false if a call to W::flush was not able to make room

Friends

friend std::ostream &operator<<(std::ostream &os, Dataset const &self)
struct iterator

Public Types

using iterator_category = std::input_iterator_tag
using value_type = Quad
using difference_type = ptrdiff_t
using pointer = value_type const*
using reference = value_type const&

Public Functions

iterator(Dataset const *parent, typename storage_type::const_iterator gbeg, typename storage_type::const_iterator gend) noexcept
iterator &operator++() noexcept
void operator++(int) noexcept
reference operator*() const noexcept
pointer operator->() const noexcept

Friends

friend bool operator==(iterator const &self, sentinel) noexcept
friend bool operator==(sentinel, iterator const &self) noexcept
struct solution_iterator

Public Types

using iterator_category = std::input_iterator_tag
using value_type = query::Solution
using difference_type = ptrdiff_t
using pointer = value_type const*
using reference = value_type const&

Public Functions

solution_iterator(Dataset const *parent, query::QuadPattern const &pat, typename storage_type::const_iterator beg, typename storage_type::const_iterator end) noexcept
solution_iterator &operator++() noexcept
void operator++(int) noexcept
reference operator*() const noexcept
pointer operator->() const noexcept

Friends

friend bool operator==(solution_iterator const &self, sentinel) noexcept
friend bool operator==(sentinel, solution_iterator const &self) noexcept
struct solution_sequence

Public Types

using value_type = query::Solution
using size_type = size_t
using difference_type = ptrdiff_t
using reference = value_type const&
using const_reference = reference
using pointer = value_type const*
using const_pointer = pointer
using iterator = solution_iterator
using const_iterator = solution_iterator
using sentinel = std::default_sentinel_t

Public Functions

inline explicit solution_sequence(iterator beg) noexcept
inline iterator begin() const noexcept

Public Static Functions

static inline sentinel end() noexcept