Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <mitkRdfStore.h>
Public Types | |
typedef std::map< std::string, std::list< RdfNode > > | ResultMap |
typedef std::map< std::string, RdfUri > | PrefixMap |
Public Member Functions | |
RdfStore () | |
~RdfStore () | |
void | SetBaseUri (RdfUri uri) |
RdfUri | GetBaseUri () const |
void | AddPrefix (std::string prefix, RdfUri uri) |
PrefixMap | GetPrefixes () const |
void | CleanUp () |
bool | Add (RdfTriple triple) |
bool | Remove (RdfTriple triple) |
bool | Contains (RdfTriple triple) |
ResultMap | Query (const std::string &query) const |
ResultMap | ExecuteTupleQuery (const std::string &query) const |
bool | ExecuteBooleanQuery (const std::string &query) const |
void | Save (std::string filename, std::string format="") |
void | Import (std::string url, std::string format="") |
Definition at line 33 of file mitkRdfStore.h.
typedef std::map<std::string, RdfUri> mitk::RdfStore::PrefixMap |
Definition at line 38 of file mitkRdfStore.h.
typedef std::map<std::string, std::list<RdfNode> > mitk::RdfStore::ResultMap |
Definition at line 37 of file mitkRdfStore.h.
mitk::RdfStore::RdfStore | ( | ) |
Construct a new triplestore.
Definition at line 540 of file mitkRdfStore.cpp.
mitk::RdfStore::~RdfStore | ( | ) |
Destruct a triplestore.
Definition at line 545 of file mitkRdfStore.cpp.
bool mitk::RdfStore::Add | ( | RdfTriple | triple | ) |
Add a new triple to the triplestore. Checks if the triplestore contains the triple.
triple | A triple. |
Definition at line 575 of file mitkRdfStore.cpp.
void mitk::RdfStore::AddPrefix | ( | std::string | prefix, |
RdfUri | uri | ||
) |
Add a new prefix which represents an URI as an abbreviation to the triplestore.
prefix | The short form of an URI. |
uri | The full form of an URI. |
Definition at line 560 of file mitkRdfStore.cpp.
void mitk::RdfStore::CleanUp | ( | ) |
Clean up the triplestore to the state of a new store.
Definition at line 570 of file mitkRdfStore.cpp.
bool mitk::RdfStore::Contains | ( | RdfTriple | triple | ) |
Checks if the triplestore contains the triple.
triple | A triple. |
Definition at line 585 of file mitkRdfStore.cpp.
bool mitk::RdfStore::ExecuteBooleanQuery | ( | const std::string & | query | ) | const |
Tests whether or not the specified query pattern has a solution.
query | The SPARQL query string in ASK form. |
mitk::Exception | This exception is thrown if one of the following errors occur: (1) failure on query object creation, (2) SPARQL syntax error, (3) trying to execute a non-boolean query, (4) error while retrieving execution result |
Definition at line 600 of file mitkRdfStore.cpp.
ResultMap mitk::RdfStore::ExecuteTupleQuery | ( | const std::string & | query | ) | const |
Queries over the triplestore with the given SPARQL query.
query | A std:string which stands for a SPARQL query text. |
Definition at line 595 of file mitkRdfStore.cpp.
RdfUri mitk::RdfStore::GetBaseUri | ( | ) | const |
Get the base URI of the triplestore.
Definition at line 555 of file mitkRdfStore.cpp.
PrefixMap mitk::RdfStore::GetPrefixes | ( | ) | const |
Get a Map with all prefixes of the triplestore.
Definition at line 565 of file mitkRdfStore.cpp.
void mitk::RdfStore::Import | ( | std::string | url, |
std::string | format = "" |
||
) |
Imports the state of the triplestore of an URL (URI).
filename | A full filepath to the lokal storage or http address as URL. A lokal file path has to look like "file:YOURPATH" ( Example: file:D:/home/readme.txt ). |
format | The current supported formats are: "turtle" (default), "ntriples", "nquads". |
Definition at line 610 of file mitkRdfStore.cpp.
ResultMap mitk::RdfStore::Query | ( | const std::string & | query | ) | const |
Queries over the triplestore with the given SPARQL query.
query | A std:string which stands for a SPARQL query text. |
Definition at line 590 of file mitkRdfStore.cpp.
bool mitk::RdfStore::Remove | ( | RdfTriple | triple | ) |
Remove a triple from the triplestore. Checks if the triplestore contains the triple.
triple | A triple. |
Definition at line 580 of file mitkRdfStore.cpp.
void mitk::RdfStore::Save | ( | std::string | filename, |
std::string | format = "" |
||
) |
Saves the current state of the triplestore in a file. The currently supported formats are: "ntriples", "turtle"(default), "nquads".
filename | A full filepath to the lokal storage. |
format | One of the supported formats. Default: "turtle". |
Definition at line 605 of file mitkRdfStore.cpp.
void mitk::RdfStore::SetBaseUri | ( | RdfUri | uri | ) |
Set the base URI of the triplestore.
uri | An URI which is the base for the triplestore and for new nodes. |
Definition at line 550 of file mitkRdfStore.cpp.