Struct ClosedNamespace

Inheritance Relationships

Base Type

Derived Types

Struct Documentation

struct ClosedNamespace : public rdf4cpp::Namespace

A ClosedNamespace can not be extended to more IRIs after construction.

Subclassed by rdf4cpp::namespaces::BFLC, rdf4cpp::namespaces::FOAF, rdf4cpp::namespaces::MADSRDF, rdf4cpp::namespaces::OWL, rdf4cpp::namespaces::PREMIS3, rdf4cpp::namespaces::RDF, rdf4cpp::namespaces::RDFS

Public Functions

template<typename Suffixes> inline requires std::convertible_to< std::ranges::range_value_t< Suffixes >, std::string_view > ClosedNamespace (std::string_view namespace_iri, Suffixes all_suffixes, storage::DynNodeStoragePtr node_storage)

Constructs the ClosedNamespace with the fixed set of possible suffixes.

Template Parameters:

Suffixes – Some range that has values convertible to std::string.

Parameters:
  • namespace_iri – namespace IRI string. This will be used as prefix. IRI must not be encapsulated in <..>.

  • all_suffixes – A range with all possible suffixes for this ClosedNamespace.

  • node_storage – where the IRIs will live

virtual IRI operator+(std::string_view suffix) const override

Create an IRI with the suffix added to the ClosedNamespace.

Parameters:

suffix – suffix that is appended

Throws:

std::runtime_exception – if a suffix is available within the namespace

Returns:

the constructed IRI

virtual void clear() const override

Clear has no effect on a ClosedNamespace.