owlcpp
v0.3.3~
C++ library for working with OWL ontologies
|
Store document metadata. More...
#include <map_doc.hpp>
Classes | |
struct | Doc_meta_wrap |
struct | Err |
Public Types | |
typedef Member_iterator < map_t::const_iterator, const Doc_id,&Doc_meta_wrap::id_ > | const_iterator |
typedef const_iterator | iterator |
typedef Member_iterator < path_index_t::const_iterator, const Doc_id,&Doc_meta_wrap::id_ > | path_iterator |
typedef boost::iterator_range < path_iterator > | path_range |
typedef Member_iterator < iri_index_t::const_iterator, const Doc_id,&Doc_meta_wrap::id_ > | iri_iterator |
typedef boost::iterator_range < iri_iterator > | iri_range |
typedef Member_iterator < version_index_t::const_iterator, const Doc_id,&Doc_meta_wrap::id_ > | version_iterator |
typedef boost::iterator_range < version_iterator > | version_range |
Public Member Functions | |
std::size_t | size () const |
const_iterator | begin () const |
const_iterator | end () const |
Doc_meta const & | operator[] (const Doc_id did) const |
Doc_meta const & | at (const Doc_id did) const |
Doc_meta const * | find (const Doc_id did) const |
iri_range | find_iri (const Node_id iri_id) const |
version_range | find_version (const Node_id version_id) const |
path_range | find_path (std::string const &path) const |
std::pair< Doc_id, bool > | insert (const Node_id iri, std::string const &path="", const Node_id vers=terms::empty_::id()) |
Add document info: location, ontologyIRI, and versionIRI. | |
void | clear () |
Store document metadata.
|
inline |
iri_id | node ID of document's ontologyIRI |
|
inline |
version_id | node ID of document's versionIRI |
|
inline |
Add document info: location, ontologyIRI, and versionIRI.
iri | ontologyIRI |
path | document location |
vers | 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.