Store, index, and search RDF triples.
More...
#include <map_triple.hpp>
Classes |
struct | Clear |
class | Erase |
class | Insert |
struct | result |
class | result_b |
Public Types |
typedef main_store::const_iterator | const_iterator |
typedef main_store::const_iterator | iterator |
Public Member Functions |
std::size_t | size () const |
bool | empty () const |
const_iterator | begin () const |
const_iterator | end () const |
void | clear () |
void | erase (Triple const &t) |
| erase one triple
|
void | insert (const Node_id subj, const Node_id pred, const Node_id obj, const Doc_id doc) |
| Insert a new triple.
|
template<class Subj , class Pred , class Obj , class Doc > |
result< Subj, Pred, Obj, Doc >
::type | find (const Subj subj, const Pred pred, const Obj obj, const Doc doc) const |
| Search triples by subject, predicate, object, or document IDs.
|
Detailed Description
template<bool Index_subj, bool Index_pred, bool Index_obj, bool Index_doc>
class owlcpp::Map_triple< Index_subj, Index_pred, Index_obj, Index_doc >
Store, index, and search RDF triples.
Member Function Documentation
template<bool Index_subj, bool Index_pred, bool Index_obj, bool Index_doc>
erase one triple
- Parameters
-
t | triple stored in triple map |
- Exceptions
-
Rdf_err | exception if triple is not found |
template<bool Index_subj, bool Index_pred, bool Index_obj, bool Index_doc>
template<class Subj , class Pred , class Obj , class Doc >
result<Subj,Pred,Obj,Doc>::type owlcpp::Map_triple< Index_subj, Index_pred, Index_obj, Index_doc >::find |
( |
const Subj |
subj, |
|
|
const Pred |
pred, |
|
|
const Obj |
obj, |
|
|
const Doc |
doc |
|
) |
| const |
|
inline |
Search triples by subject, predicate, object, or document IDs.
Polymorphically search stored triples to find ones that match specified node IDs for subject, predicate, or object nodes or document ID. An instance of any matches all values for the corresponding triple element. If none of the nodes are specified, i.e., find(any(), any(), any(), any())
, the search returns a range of all stored triples, [begin(), end()).
- Parameters
-
subj | predicate for first element of triple (subject node), e.g., Node_id, any |
pred | predicate for second element of triple (predicate node), e.g., Node_id, any |
obj | predicate for third element of triple (object node), e.g., Node_id, any |
doc | predicate for fourth element of triple (document ID), e.g., Doc_id, any |
- Returns
- iterator range of triples matching the query.
The type of the range can be obtained from
template<class Subj, class Pred, class Obj, class Doc> class result;
or from
template<bool Subj, bool Pred, bool Obj, bool Doc> class result_b;
For example,
Triple_map<>::result_b<1,0,0,1>::type range = triple_map.find(subj, any(), any(), doc);
template<bool Index_subj, bool Index_pred, bool Index_obj, bool Index_doc>
std::size_t owlcpp::Map_triple< Index_subj, Index_pred, Index_obj, Index_doc >::size |
( |
| ) |
const |
|
inline |
- Returns
- number of stored triples
The documentation for this class was generated from the following file: