owlcpp  v0.3.3~
C++ library for working with OWL ontologies
 All Classes Namespaces Files Functions Macros Pages
Classes | Public Types | Public Member Functions | List of all members
owlcpp::Map_doc Class Reference

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 ()

Detailed Description

Store document metadata.

Member Function Documentation

iri_range owlcpp::Map_doc::find_iri ( const Node_id  iri_id) const
inline
Parameters
iri_idnode ID of document's ontologyIRI
Returns
iterator range for documents with id ontologyIRIs
version_range owlcpp::Map_doc::find_version ( const Node_id  version_id) const
inline
Parameters
version_idnode ID of document's versionIRI
Returns
iterator range for documents with id versionIRIs
std::pair<Doc_id,bool> owlcpp::Map_doc::insert ( const Node_id  iri,
std::string const &  path = "",
const Node_id  vers = terms::empty_::id() 
)
inline

Add document info: location, ontologyIRI, and versionIRI.

Parameters
iriontologyIRI
pathdocument location
versversionIRI
Returns
document ID and whether new document info was actually added
Exceptions
Errif 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.


The documentation for this class was generated from the following file: