owlcpp
v0.3.3~
C++ library for working with OWL ontologies
|
#include <map_doc_crtpb.hpp>
Public Types | |
typedef map_doc_type::iri_range | doc_iri_range |
typedef map_doc_type::version_range | doc_version_range |
Public Member Functions | |
doc_type const & | operator[] (const Doc_id did) const |
doc_type const & | at (const Doc_id did) const |
doc_type const * | find (const Doc_id did) const |
std::pair< Doc_id, bool > | insert_doc (const Node_id iri_id, std::string const &path="", const Node_id vers_id=terms::empty_::id()) |
Add document info: location, ontologyIRI, and versionIRI. | |
std::pair< Doc_id, bool > | insert_doc (std::string const &iri, std::string const &path="", std::string const &vers="") |
doc_iri_range | find_doc_iri (std::string const &iri) const |
doc_version_range | find_doc_version (std::string const &version) const |
Enable interaction between a map of ontology documents and
a map of IRI nodes. Base for CRTP (Curiously Recurring Template Pattern).
|
inline |
Add document info: location, ontologyIRI, and versionIRI.
iri_id | ontologyIRI |
path | document location |
vers_id | versionIRI |
Err | if an entry with the same non-empty path and different iri or version is already present. |
Duplicate document info entries are not allowed.
If document info with same path, iri, and version already present, new info is not inserted and the ID of the existing document is returned.
Since documents with same ontologyIRI and versionIRI may be found at different paths, multiple entries with different path and same iri or version can be added.
Sometimes, document path is not known. Therefore multiple entries with empty path and different iri or version are allowed.