6 #include "knowrob/storage/ReifiedTriple.h"
7 #include "knowrob/storage/reification.h"
8 #include "knowrob/semweb/rdf.h"
9 #include "knowrob/semweb/Property.h"
10 #include "knowrob/semweb/Perspective.h"
16 auto property = vocabulary->defineProperty(triple.
predicate());
18 auto relationType =
property->reification();
23 const auto &name =
name_->stringForm();
25 auto g = triple.
graph();
28 uint32_t triple_count = 3;
33 if (triple.
begin()) triple_count += 1;
34 if (triple.
end()) triple_count += 1;
83 reified->setSubject(subject);
84 reified->setPredicate(property->stringForm());
86 reified->setGraph(g.value());
92 return triple.
subject().compare(
100 return hasNonEgoPerspective ||
static bool isEgoPerspective(std::string_view iri)
knowrob::IRIAtomPtr name_
static bool isPartOfReification(const Triple &triple)
ReifiedTriple(const Triple &triple, const VocabularyPtr &vocabulary, const IRIAtomPtr &reifiedName=nullptr)
Triple * create(std::string_view subject, const AtomPtr &property, const std::optional< std::string_view > &g)
std::vector< TriplePtr > reified_
std::string generatedString_
static bool isReifiable(const Triple &triple)
virtual std::string_view valueAsString() const =0
virtual std::optional< std::string_view > perspective() const =0
virtual void setDoubleValue(double v)=0
virtual std::optional< std::string_view > graph() const =0
virtual std::string_view subject() const =0
bool isSubjectBlank() const
virtual std::string_view predicate() const =0
std::string createStringValue() const
virtual void setObjectIRI(std::string_view object)=0
virtual void setObjectBlank(std::string_view str)=0
bool isOccasional() const
bool isObjectBlank() const
virtual void setBooleanValue(bool v)=0
void setXSDValue(std::string_view v, XSDType type)
static std::string_view iri_name(std::string_view iri)
static IRIAtomPtr unique_iri(std::string_view ns, std::string_view name)
const IRIAtomPtr hasSubject
const IRIAtomPtr isUncertain
const IRIAtomPtr hasConfidence
const AtomPtr individualPrefix
const IRIAtomPtr isOccasional
const IRIAtomPtr hasEndTime
const IRIAtomPtr hasLiteral
const IRIAtomPtr hasBeginTime
const IRIAtomPtr hasPerspective
const IRIAtomPtr hasObject
std::shared_ptr< Atom > AtomPtr
std::shared_ptr< IRIAtom > IRIAtomPtr
TripleTemplate< std::string_view > TripleView
std::shared_ptr< Vocabulary > VocabularyPtr