knowrob
2.1.0
A Knowledge Base System for Cognition-enabled Robots
|
#include <Property.h>
Classes | |
struct | PropertyComparator |
Public Member Functions | |
Property (std::string_view iri) | |
Property (const IRIAtomPtr &iri) | |
void | addDirectParent (const std::shared_ptr< Property > &directParent, std::optional< std::string_view > graph) |
void | removeDirectParent (const std::shared_ptr< Property > &directParent, std::optional< std::string_view > graph) |
const auto & | directParents () const |
void | setInverse (const std::shared_ptr< Property > &inverse) |
const auto & | inverse () const |
bool | hasFlag (PropertyFlag flag) const |
void | setFlag (PropertyFlag flag) |
bool | isDatatypeProperty () const |
bool | isAnnotationProperty () const |
bool | isObjectProperty () const |
bool | isTransitiveProperty () const |
bool | isReflexiveProperty () const |
bool | isSymmetricProperty () const |
bool | isSubPropertyOf (const std::shared_ptr< Property > &parent, bool includeSelf=true) |
void | forallParents (const PropertyVisitor &visitor, bool includeSelf=true, bool skipDuplicates=true) |
void | forallChildren (const PropertyTupleVisitor &visitor, bool skipDuplicates=true) |
auto | reification () const |
void | detach () |
Property (std::string_view iri) | |
Property (const IRIAtomPtr &iri) | |
void | addDirectParent (const std::shared_ptr< Property > &directParent, std::optional< std::string_view > graph) |
void | removeDirectParent (const std::shared_ptr< Property > &directParent, std::optional< std::string_view > graph) |
const auto & | directParents () const |
void | setInverse (const std::shared_ptr< Property > &inverse) |
const auto & | inverse () const |
bool | hasFlag (PropertyFlag flag) const |
void | setFlag (PropertyFlag flag) |
bool | isDatatypeProperty () const |
bool | isAnnotationProperty () const |
bool | isObjectProperty () const |
bool | isTransitiveProperty () const |
bool | isReflexiveProperty () const |
bool | isSymmetricProperty () const |
bool | isSubPropertyOf (const std::shared_ptr< Property > &parent, bool includeSelf=true) |
void | forallParents (const PropertyVisitor &visitor, bool includeSelf=true, bool skipDuplicates=true) |
void | forallChildren (const PropertyTupleVisitor &visitor, bool skipDuplicates=true) |
auto | reification () const |
void | detach () |
Public Member Functions inherited from knowrob::semweb::Resource | |
Resource (std::string_view iri) | |
Resource (const IRIAtomPtr &iri) | |
auto | iri () const |
auto | iriAtom () const |
std::string_view | name () const |
std::string_view | ns (bool includeDelimiter=false) const |
Resource (std::string_view iri) | |
Resource (const IRIAtomPtr &iri) | |
auto | iri () const |
auto | iriAtom () const |
std::string_view | name () const |
std::string_view | ns (bool includeDelimiter=false) const |
Static Public Member Functions | |
static knowrob::IRIAtomPtr | reifiedIRI (std::string_view iri) |
static knowrob::IRIAtomPtr | unReifiedIRI (std::string_view iri) |
static knowrob::IRIAtomPtr | reifiedIRI (std::string_view iri) |
static knowrob::IRIAtomPtr | unReifiedIRI (std::string_view iri) |
Static Public Member Functions inherited from knowrob::semweb::Resource | |
static IRIAtomPtr | unique_iri (std::string_view ns, std::string_view name) |
static IRIAtomPtr | unique_iri (std::string_view type_iri) |
static std::string_view | iri_name (std::string_view iri) |
static std::string_view | iri_ns (std::string_view iri, bool includeDelimiter=false) |
static AtomPtr | graph_atom (std::optional< std::string_view > graph) |
static IRIAtomPtr | unique_iri (std::string_view ns, std::string_view name) |
static IRIAtomPtr | unique_iri (std::string_view type_iri) |
static std::string_view | iri_name (std::string_view iri) |
static std::string_view | iri_ns (std::string_view iri, bool includeDelimiter=false) |
static AtomPtr | graph_atom (std::optional< std::string_view > graph) |
Protected Attributes | |
std::shared_ptr< Property > | inverse_ |
std::map< std::shared_ptr< Property >, std::set< AtomPtr, AtomComparator >, PropertyComparator > | directParents_ |
std::set< std::shared_ptr< Property >, PropertyComparator > | directChildren_ |
std::shared_ptr< Class > | reification_ |
int | flags_ |
Protected Attributes inherited from knowrob::semweb::Resource | |
knowrob::AtomPtr | iri_ |
A property used in knowledge graphs.
Definition at line 40 of file Property.h.
|
explicit |
Definition at line 15 of file Property.cpp.
|
explicit |
Definition at line 18 of file Property.cpp.
|
explicit |
|
explicit |
void Property::addDirectParent | ( | const std::shared_ptr< Property > & | directParent, |
std::optional< std::string_view > | graph | ||
) |
directParent | a direct super property. |
graph | the graph where the relation is defined. |
Definition at line 63 of file Property.cpp.
void knowrob::semweb::Property::addDirectParent | ( | const std::shared_ptr< Property > & | directParent, |
std::optional< std::string_view > | graph | ||
) |
directParent | a direct super property. |
graph | the graph where the relation is defined. |
void Property::detach | ( | ) |
Detach this property from its children and parents.
Definition at line 187 of file Property.cpp.
void knowrob::semweb::Property::detach | ( | ) |
Detach this property from its children and parents.
|
inline |
|
inline |
void Property::forallChildren | ( | const PropertyTupleVisitor & | visitor, |
bool | skipDuplicates = true |
||
) |
visitor | a function that is called for each child in the class hierarchy. |
skipDuplicates | if true, the method calls the visitor only once for each class. |
Definition at line 136 of file Property.cpp.
void knowrob::semweb::Property::forallChildren | ( | const PropertyTupleVisitor & | visitor, |
bool | skipDuplicates = true |
||
) |
visitor | a function that is called for each child in the class hierarchy. |
skipDuplicates | if true, the method calls the visitor only once for each class. |
void Property::forallParents | ( | const PropertyVisitor & | visitor, |
bool | includeSelf = true , |
||
bool | skipDuplicates = true |
||
) |
Visit all parents of this property.
visitor | a function that is called for each parent. |
includeSelf | true if the property itself should be included. |
skipDuplicates | true if duplicates should be skipped. |
Definition at line 110 of file Property.cpp.
void knowrob::semweb::Property::forallParents | ( | const PropertyVisitor & | visitor, |
bool | includeSelf = true , |
||
bool | skipDuplicates = true |
||
) |
Visit all parents of this property.
visitor | a function that is called for each parent. |
includeSelf | true if the property itself should be included. |
skipDuplicates | true if duplicates should be skipped. |
bool Property::hasFlag | ( | PropertyFlag | flag | ) | const |
flag | a property flag. |
Definition at line 102 of file Property.cpp.
bool knowrob::semweb::Property::hasFlag | ( | PropertyFlag | flag | ) | const |
flag | a property flag. |
|
inline |
Definition at line 72 of file Property.h.
|
inline |
Definition at line 72 of file Property.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
bool Property::isSubPropertyOf | ( | const std::shared_ptr< Property > & | parent, |
bool | includeSelf = true |
||
) |
parent | a super property. |
includeSelf | if true, the method returns true if this property is the same |
Definition at line 161 of file Property.cpp.
bool knowrob::semweb::Property::isSubPropertyOf | ( | const std::shared_ptr< Property > & | parent, |
bool | includeSelf = true |
||
) |
parent | a super property. |
includeSelf | if true, the method returns true if this property is the same |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
Map an IRI of a property to the IRI of the concept that reifies the property.
iri | an IRI of a property. |
Definition at line 26 of file Property.cpp.
|
static |
Map an IRI of a property to the IRI of the concept that reifies the property.
iri | an IRI of a property. |
void Property::removeDirectParent | ( | const std::shared_ptr< Property > & | directParent, |
std::optional< std::string_view > | graph | ||
) |
directParent | a direct super property. |
graph | the graph where the relation is defined. |
Definition at line 78 of file Property.cpp.
void knowrob::semweb::Property::removeDirectParent | ( | const std::shared_ptr< Property > & | directParent, |
std::optional< std::string_view > | graph | ||
) |
directParent | a direct super property. |
graph | the graph where the relation is defined. |
void Property::setFlag | ( | PropertyFlag | flag | ) |
Define a flag of this property.
flag | a property flag. |
Definition at line 106 of file Property.cpp.
void knowrob::semweb::Property::setFlag | ( | PropertyFlag | flag | ) |
Define a flag of this property.
flag | a property flag. |
void Property::setInverse | ( | const std::shared_ptr< Property > & | inverse | ) |
Define the inverse property of this property.
inverse | a property. |
Definition at line 98 of file Property.cpp.
void knowrob::semweb::Property::setInverse | ( | const std::shared_ptr< Property > & | inverse | ) |
Define the inverse property of this property.
inverse | a property. |
|
static |
Map an IRI of a reification concept to the IRI of the property.
iri | an IRI of a reification concept. |
Definition at line 43 of file Property.cpp.
|
static |
Map an IRI of a reification concept to the IRI of the property.
iri | an IRI of a reification concept. |
|
protected |
Definition at line 170 of file Property.h.
|
protected |
Definition at line 169 of file Property.h.
|
protected |
Definition at line 172 of file Property.h.
|
protected |
Definition at line 166 of file Property.h.
|
protected |
Definition at line 171 of file Property.h.