knowrob
2.1.0
A Knowledge Base System for Cognition-enabled Robots
|
#include <DataSource.h>
Public Member Functions | |
DataSource (URI uri, std::string_view format, DataSourceType dataSourceType) | |
const auto & | uri () const |
const auto & | path () const |
const auto & | format () const |
DataSourceType | dataSourceType () const |
auto | name () const |
auto | version () const |
DataSource (URI uri, std::string_view format, DataSourceType dataSourceType) | |
const auto & | uri () const |
const auto & | path () const |
const auto & | format () const |
DataSourceType | dataSourceType () const |
auto | name () const |
auto | version () const |
Static Public Member Functions | |
static std::string | getNameFromURI (const std::string &uriString) |
static std::string | getVersionFromURI (const std::string &uriString) |
static bool | isVersionString (const std::string &versionString) |
static std::shared_ptr< DataSource > | create (const VocabularyPtr &vocabulary, const boost::property_tree::ptree &config) |
static std::string | getNameFromURI (const std::string &uriString) |
static std::string | getVersionFromURI (const std::string &uriString) |
static bool | isVersionString (const std::string &versionString) |
static std::shared_ptr< DataSource > | create (const VocabularyPtr &vocabulary, const boost::property_tree::ptree &config) |
Protected Attributes | |
DataSourceType | dataSourceType_ |
std::string | format_ |
URI | uri_ |
A data source is a source of data that can be loaded into a subsystem of the knowledge base. This can be a file, a database, a web service, etc.
Definition at line 26 of file DataSource.h.
DataSource::DataSource | ( | URI | uri, |
std::string_view | format, | ||
DataSourceType | dataSourceType | ||
) |
Create a data source.
uri | URI of the data source. |
format | string identifier of the data format. |
dataSourceType | the type of the data source. |
Definition at line 30 of file DataSource.cpp.
knowrob::DataSource::DataSource | ( | URI | uri, |
std::string_view | format, | ||
DataSourceType | dataSourceType | ||
) |
Create a data source.
uri | URI of the data source. |
format | string identifier of the data format. |
dataSourceType | the type of the data source. |
|
static |
Create a data source from a configuration.
vocabulary | the vocabulary of the knowledge base. |
config | a property tree used to configure this. |
Definition at line 105 of file DataSource.cpp.
|
static |
Create a data source from a configuration.
vocabulary | the vocabulary of the knowledge base. |
config | a property tree used to configure this. |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Ontologies are loaded into named sub-graphs of the knowledge graph. The name is generated from the URI in case of loading RDF files.
uriString | A URI pointing to a RDF ontology. |
Definition at line 36 of file DataSource.cpp.
|
static |
|
static |
Extract a version string from an ontology URI. In case the URI points to a local file, the modification time of the file is used as version. For other URIs it is attempted to extract version information from the URI string, if this fails, then the current day is used as a version string.
uriString | A URI pointing to a RDF ontology. |
Definition at line 48 of file DataSource.cpp.
|
static |
Extract a version string from an ontology URI. In case the URI points to a local file, the modification time of the file is used as version. For other URIs it is attempted to extract version information from the URI string, if this fails, then the current day is used as a version string.
uriString | A URI pointing to a RDF ontology. |
|
static |
versionString | a string |
Definition at line 79 of file DataSource.cpp.
|
static |
versionString | a string |
|
inline |
Definition at line 59 of file DataSource.h.
|
inline |
|
inline |
|
inline |
Definition at line 44 of file DataSource.h.
|
inline |
|
inline |
|
inline |
Definition at line 64 of file DataSource.h.
|
inline |
|
protected |
Definition at line 101 of file DataSource.h.
|
protected |
Definition at line 102 of file DataSource.h.
|
protected |
Definition at line 103 of file DataSource.h.