|
knowrob
2.1.0
A Knowledge Base System for Cognition-enabled Robots
|
#include <Vocabulary.h>
Public Member Functions | |
| Vocabulary () | |
| ~Vocabulary () | |
| void | addResourceType (const std::string_view &resource_iri, const std::string_view &type_iri) |
| bool | isDefinedClass (const std::string_view &iri) |
| semweb::ClassPtr | getDefinedClass (const std::string_view &iri) const |
| std::vector< semweb::ClassPtr > | getDefinedClassesWithPrefix (const std::string_view &prefix) const |
| std::vector< std::string_view > | getDefinedClassNamesWithPrefix (const std::string_view &prefix) const |
| semweb::ClassPtr | defineClass (const std::string_view &iri) |
| void | addSubClassOf (const std::string_view &subClass, const std::string_view &superClass, std::optional< std::string_view > graph) |
| bool | isSubClassOf (const std::string_view &subClass, const std::string_view &superClass) |
| bool | isDefinedProperty (const std::string_view &iri) |
| bool | isDefinedReification (const std::string_view &iri) |
| semweb::PropertyPtr | getDefinedProperty (const std::string_view &iri) const |
| semweb::PropertyPtr | getDefinedReification (const std::string_view &iri) const |
| std::vector< semweb::PropertyPtr > | getDefinedPropertiesWithPrefix (const std::string_view &prefix) const |
| std::vector< std::string_view > | getDefinedPropertyNamesWithPrefix (const std::string_view &prefix) const |
| semweb::PropertyPtr | defineProperty (const std::string_view &iri) |
| semweb::PropertyPtr | defineProperty (const IRIAtomPtr &iri) |
| void | addSubPropertyOf (const std::string_view &subProperty, const std::string_view &superProperty, std::optional< std::string_view > graph) |
| void | setInverseOf (const std::string_view &a, const std::string_view &b) |
| void | setPropertyFlag (const std::string_view &iri, semweb::PropertyFlag flag) |
| void | setPropertyFlag (const IRIAtomPtr &iri, semweb::PropertyFlag flag) |
| bool | isAnnotationProperty (const std::string_view &iri) |
| bool | isObjectProperty (const std::string_view &iri) |
| bool | isDatatypeProperty (const std::string_view &iri) |
| void | setFrequency (const std::string_view &iri, uint64_t frequency) |
| void | increaseFrequency (const std::string_view &iri) |
| uint64_t | frequency (const std::string_view &iri) const |
| const std::shared_ptr< ImportHierarchy > & | importHierarchy () const |
| template<typename T > | |
| std::shared_ptr< T > | define (const std::string_view &iri) |
| Vocabulary () | |
| ~Vocabulary () | |
| void | addResourceType (const std::string_view &resource_iri, const std::string_view &type_iri) |
| bool | isDefinedClass (const std::string_view &iri) |
| semweb::ClassPtr | getDefinedClass (const std::string_view &iri) const |
| std::vector< semweb::ClassPtr > | getDefinedClassesWithPrefix (const std::string_view &prefix) const |
| std::vector< std::string_view > | getDefinedClassNamesWithPrefix (const std::string_view &prefix) const |
| semweb::ClassPtr | defineClass (const std::string_view &iri) |
| void | addSubClassOf (const std::string_view &subClass, const std::string_view &superClass, std::optional< std::string_view > graph) |
| bool | isSubClassOf (const std::string_view &subClass, const std::string_view &superClass) |
| bool | isDefinedProperty (const std::string_view &iri) |
| bool | isDefinedReification (const std::string_view &iri) |
| semweb::PropertyPtr | getDefinedProperty (const std::string_view &iri) const |
| semweb::PropertyPtr | getDefinedReification (const std::string_view &iri) const |
| std::vector< semweb::PropertyPtr > | getDefinedPropertiesWithPrefix (const std::string_view &prefix) const |
| std::vector< std::string_view > | getDefinedPropertyNamesWithPrefix (const std::string_view &prefix) const |
| semweb::PropertyPtr | defineProperty (const std::string_view &iri) |
| semweb::PropertyPtr | defineProperty (const IRIAtomPtr &iri) |
| void | addSubPropertyOf (const std::string_view &subProperty, const std::string_view &superProperty, std::optional< std::string_view > graph) |
| void | setInverseOf (const std::string_view &a, const std::string_view &b) |
| void | setPropertyFlag (const std::string_view &iri, semweb::PropertyFlag flag) |
| void | setPropertyFlag (const IRIAtomPtr &iri, semweb::PropertyFlag flag) |
| bool | isAnnotationProperty (const std::string_view &iri) |
| bool | isObjectProperty (const std::string_view &iri) |
| bool | isDatatypeProperty (const std::string_view &iri) |
| void | setFrequency (const std::string_view &iri, uint64_t frequency) |
| void | increaseFrequency (const std::string_view &iri) |
| uint64_t | frequency (const std::string_view &iri) const |
| const std::shared_ptr< ImportHierarchy > & | importHierarchy () const |
| template<typename T > | |
| std::shared_ptr< T > | define (const std::string_view &iri) |
Static Public Member Functions | |
| static bool | isTaxonomicProperty (const std::string_view &iri) |
| static bool | isTaxonomicProperty (const std::string_view &iri) |
Protected Member Functions | |
| semweb::PropertyPtr | defineProperty_ (const std::shared_ptr< semweb::Property > &p) |
| semweb::PropertyPtr | defineProperty_ (const std::shared_ptr< semweb::Property > &p) |
Protected Attributes | |
| std::map< std::string_view, semweb::ClassPtr, std::less<> > | definedClasses_ |
| std::map< std::string_view, semweb::PropertyPtr, std::less<> > | definedProperties_ |
| std::map< std::string_view, semweb::PropertyPtr, std::less<> > | definedReifications_ |
| std::map< std::string_view, uint64_t > | frequency_ |
| std::shared_ptr< ImportHierarchy > | importHierarchy_ |
The vocabulary of a knowledge graph. It contains the definitions of classes and properties.
Definition at line 22 of file Vocabulary.h.
| Vocabulary::Vocabulary | ( | ) |
Definition at line 18 of file Vocabulary.cpp.
| Vocabulary::~Vocabulary | ( | ) |
Definition at line 31 of file Vocabulary.cpp.
| knowrob::Vocabulary::Vocabulary | ( | ) |
| knowrob::Vocabulary::~Vocabulary | ( | ) |
| void Vocabulary::addResourceType | ( | const std::string_view & | resource_iri, |
| const std::string_view & | type_iri | ||
| ) |
Adds a new type assertion.
| resource_iri | a resource |
| type_iri | the type of the resource |
Definition at line 240 of file Vocabulary.cpp.
| void knowrob::Vocabulary::addResourceType | ( | const std::string_view & | resource_iri, |
| const std::string_view & | type_iri | ||
| ) |
Adds a new type assertion.
| resource_iri | a resource |
| type_iri | the type of the resource |
| void Vocabulary::addSubClassOf | ( | const std::string_view & | subClass, |
| const std::string_view & | superClass, | ||
| std::optional< std::string_view > | graph | ||
| ) |
Adds subclass-of relation between two classes, and defines them if they are not yet defined.
| subClass | a IRI |
| superClass | a IRI |
| graph | the graph where the relation is defined. |
Definition at line 83 of file Vocabulary.cpp.
| void knowrob::Vocabulary::addSubClassOf | ( | const std::string_view & | subClass, |
| const std::string_view & | superClass, | ||
| std::optional< std::string_view > | graph | ||
| ) |
Adds subclass-of relation between two classes, and defines them if they are not yet defined.
| subClass | a IRI |
| superClass | a IRI |
| graph | the graph where the relation is defined. |
| void Vocabulary::addSubPropertyOf | ( | const std::string_view & | subProperty, |
| const std::string_view & | superProperty, | ||
| std::optional< std::string_view > | graph | ||
| ) |
Adds subproperty-of relation between two properties, and defines them if they are not yet defined.
| subProperty | a IRI |
| superProperty | a IRI |
| graph | the graph where the relation is defined. |
Definition at line 174 of file Vocabulary.cpp.
| void knowrob::Vocabulary::addSubPropertyOf | ( | const std::string_view & | subProperty, |
| const std::string_view & | superProperty, | ||
| std::optional< std::string_view > | graph | ||
| ) |
Adds subproperty-of relation between two properties, and defines them if they are not yet defined.
| subProperty | a IRI |
| superProperty | a IRI |
| graph | the graph where the relation is defined. |
| std::shared_ptr<T> knowrob::Vocabulary::define | ( | const std::string_view & | iri | ) |
Define a new class if it has not been defined before.
| T | the resource type (either Class or Property) |
| iri | a IRI |
| std::shared_ptr<T> knowrob::Vocabulary::define | ( | const std::string_view & | iri | ) |
Define a new class if it has not been defined before.
| T | the resource type (either Class or Property) |
| iri | a IRI |
| ClassPtr Vocabulary::defineClass | ( | const std::string_view & | iri | ) |
Define a new class if it has not been defined before.
| iri | a IRI |
Definition at line 72 of file Vocabulary.cpp.
| semweb::ClassPtr knowrob::Vocabulary::defineClass | ( | const std::string_view & | iri | ) |
Define a new class if it has not been defined before.
| iri | a IRI |
| PropertyPtr Vocabulary::defineProperty | ( | const IRIAtomPtr & | iri | ) |
Define a new property if it has not been defined before.
| iri | a IRI |
Definition at line 145 of file Vocabulary.cpp.
| semweb::PropertyPtr knowrob::Vocabulary::defineProperty | ( | const IRIAtomPtr & | iri | ) |
Define a new property if it has not been defined before.
| iri | a IRI |
| PropertyPtr Vocabulary::defineProperty | ( | const std::string_view & | iri | ) |
Define a new property if it has not been defined before.
| iri | a IRI |
Definition at line 136 of file Vocabulary.cpp.
| semweb::PropertyPtr knowrob::Vocabulary::defineProperty | ( | const std::string_view & | iri | ) |
Define a new property if it has not been defined before.
| iri | a IRI |
|
protected |
|
protected |
| uint64_t Vocabulary::frequency | ( | const std::string_view & | iri | ) | const |
Returns the frequency of a resource reflecting how often it appears in the knowledge corpus.
| iri | a IRI |
Definition at line 234 of file Vocabulary.cpp.
| uint64_t knowrob::Vocabulary::frequency | ( | const std::string_view & | iri | ) | const |
Returns the frequency of a resource reflecting how often it appears in the knowledge corpus.
| iri | a IRI |
| ClassPtr Vocabulary::getDefinedClass | ( | const std::string_view & | iri | ) | const |
| iri | a IRI |
Definition at line 45 of file Vocabulary.cpp.
| semweb::ClassPtr knowrob::Vocabulary::getDefinedClass | ( | const std::string_view & | iri | ) | const |
| iri | a IRI |
| std::vector< ClassPtr > Vocabulary::getDefinedClassesWithPrefix | ( | const std::string_view & | prefix | ) | const |
| prefix | a IRI prefix |
Definition at line 54 of file Vocabulary.cpp.
| std::vector<semweb::ClassPtr> knowrob::Vocabulary::getDefinedClassesWithPrefix | ( | const std::string_view & | prefix | ) | const |
| prefix | a IRI prefix |
| std::vector< std::string_view > Vocabulary::getDefinedClassNamesWithPrefix | ( | const std::string_view & | prefix | ) | const |
| prefix | a IRI prefix |
Definition at line 63 of file Vocabulary.cpp.
| std::vector<std::string_view> knowrob::Vocabulary::getDefinedClassNamesWithPrefix | ( | const std::string_view & | prefix | ) | const |
| prefix | a IRI prefix |
| std::vector< PropertyPtr > Vocabulary::getDefinedPropertiesWithPrefix | ( | const std::string_view & | prefix | ) | const |
| prefix | a IRI prefix |
Definition at line 118 of file Vocabulary.cpp.
| std::vector<semweb::PropertyPtr> knowrob::Vocabulary::getDefinedPropertiesWithPrefix | ( | const std::string_view & | prefix | ) | const |
| prefix | a IRI prefix |
| PropertyPtr Vocabulary::getDefinedProperty | ( | const std::string_view & | iri | ) | const |
| iri | a IRI |
Definition at line 100 of file Vocabulary.cpp.
| semweb::PropertyPtr knowrob::Vocabulary::getDefinedProperty | ( | const std::string_view & | iri | ) | const |
| iri | a IRI |
| std::vector< std::string_view > Vocabulary::getDefinedPropertyNamesWithPrefix | ( | const std::string_view & | prefix | ) | const |
| prefix | a IRI prefix |
Definition at line 127 of file Vocabulary.cpp.
| std::vector<std::string_view> knowrob::Vocabulary::getDefinedPropertyNamesWithPrefix | ( | const std::string_view & | prefix | ) | const |
| prefix | a IRI prefix |
| PropertyPtr Vocabulary::getDefinedReification | ( | const std::string_view & | iri | ) | const |
| iri | a IRI |
Definition at line 109 of file Vocabulary.cpp.
| semweb::PropertyPtr knowrob::Vocabulary::getDefinedReification | ( | const std::string_view & | iri | ) | const |
| iri | a IRI |
|
inline |
|
inline |
| void Vocabulary::increaseFrequency | ( | const std::string_view & | iri | ) |
Increase the frequency of a resource by one reflecting that it appears one more time in the knowledge corpus.
| iri | a IRI |
Definition at line 225 of file Vocabulary.cpp.
| void knowrob::Vocabulary::increaseFrequency | ( | const std::string_view & | iri | ) |
Increase the frequency of a resource by one reflecting that it appears one more time in the knowledge corpus.
| iri | a IRI |
| bool Vocabulary::isAnnotationProperty | ( | const std::string_view & | iri | ) |
| iri | a IRI |
Definition at line 186 of file Vocabulary.cpp.
| bool knowrob::Vocabulary::isAnnotationProperty | ( | const std::string_view & | iri | ) |
| iri | a IRI |
| bool Vocabulary::isDatatypeProperty | ( | const std::string_view & | iri | ) |
| iri | a IRI |
Definition at line 196 of file Vocabulary.cpp.
| bool knowrob::Vocabulary::isDatatypeProperty | ( | const std::string_view & | iri | ) |
| iri | a IRI |
| bool Vocabulary::isDefinedClass | ( | const std::string_view & | iri | ) |
| iri | a IRI |
Definition at line 41 of file Vocabulary.cpp.
| bool knowrob::Vocabulary::isDefinedClass | ( | const std::string_view & | iri | ) |
| iri | a IRI |
| bool Vocabulary::isDefinedProperty | ( | const std::string_view & | iri | ) |
| iri | a IRI |
Definition at line 92 of file Vocabulary.cpp.
| bool knowrob::Vocabulary::isDefinedProperty | ( | const std::string_view & | iri | ) |
| iri | a IRI |
| bool Vocabulary::isDefinedReification | ( | const std::string_view & | iri | ) |
| iri | a IRI |
Definition at line 96 of file Vocabulary.cpp.
| bool knowrob::Vocabulary::isDefinedReification | ( | const std::string_view & | iri | ) |
| iri | a IRI |
| bool Vocabulary::isObjectProperty | ( | const std::string_view & | iri | ) |
| iri | a IRI |
Definition at line 191 of file Vocabulary.cpp.
| bool knowrob::Vocabulary::isObjectProperty | ( | const std::string_view & | iri | ) |
| iri | a IRI |
| bool Vocabulary::isSubClassOf | ( | const std::string_view & | subClass, |
| const std::string_view & | superClass | ||
| ) |
| subClass | a IRI |
| superClass | a IRI |
Definition at line 88 of file Vocabulary.cpp.
| bool knowrob::Vocabulary::isSubClassOf | ( | const std::string_view & | subClass, |
| const std::string_view & | superClass | ||
| ) |
| subClass | a IRI |
| superClass | a IRI |
|
static |
| iri | a IRI |
Definition at line 201 of file Vocabulary.cpp.
|
static |
| iri | a IRI |
| void Vocabulary::setFrequency | ( | const std::string_view & | iri, |
| uint64_t | frequency | ||
| ) |
Set the frequency of a resource reflecting how often it appears in the knowledge corpus.
| iri | a IRI |
| frequency | a frequency |
Definition at line 207 of file Vocabulary.cpp.
| void knowrob::Vocabulary::setFrequency | ( | const std::string_view & | iri, |
| uint64_t | frequency | ||
| ) |
Set the frequency of a resource reflecting how often it appears in the knowledge corpus.
| iri | a IRI |
| frequency | a frequency |
| void Vocabulary::setInverseOf | ( | const std::string_view & | a, |
| const std::string_view & | b | ||
| ) |
Define inverseOf relation between properties.
| a | a property IRI |
| b | a property IRI |
Definition at line 179 of file Vocabulary.cpp.
| void knowrob::Vocabulary::setInverseOf | ( | const std::string_view & | a, |
| const std::string_view & | b | ||
| ) |
Define inverseOf relation between properties.
| a | a property IRI |
| b | a property IRI |
| void Vocabulary::setPropertyFlag | ( | const IRIAtomPtr & | iri, |
| semweb::PropertyFlag | flag | ||
| ) |
| iri | a property IRI |
| flag | a property flag |
Definition at line 170 of file Vocabulary.cpp.
| void knowrob::Vocabulary::setPropertyFlag | ( | const IRIAtomPtr & | iri, |
| semweb::PropertyFlag | flag | ||
| ) |
| iri | a property IRI |
| flag | a property flag |
| void Vocabulary::setPropertyFlag | ( | const std::string_view & | iri, |
| semweb::PropertyFlag | flag | ||
| ) |
| iri | a property IRI |
| flag | a property flag |
Definition at line 166 of file Vocabulary.cpp.
| void knowrob::Vocabulary::setPropertyFlag | ( | const std::string_view & | iri, |
| semweb::PropertyFlag | flag | ||
| ) |
| iri | a property IRI |
| flag | a property flag |
|
protected |
Definition at line 224 of file Vocabulary.h.
|
protected |
Definition at line 225 of file Vocabulary.h.
|
protected |
Definition at line 226 of file Vocabulary.h.
|
protected |
Definition at line 227 of file Vocabulary.h.
|
protected |
Definition at line 228 of file Vocabulary.h.