6 #ifndef KNOWROB_FRAMED_TRIPLE_PATTERN_H
7 #define KNOWROB_FRAMED_TRIPLE_PATTERN_H
9 #include "knowrob/formulas/Predicate.h"
10 #include "knowrob/semweb/Triple.h"
11 #include "knowrob/semweb/TripleContainer.h"
12 #include "knowrob/formulas/FirstOrderLiteral.h"
13 #include "knowrob/queries/QueryContext.h"
14 #include "knowrob/terms/groundable.h"
15 #include "knowrob/terms/Numeric.h"
16 #include "knowrob/terms/IRIAtom.h"
17 #include "knowrob/terms/Blank.h"
43 class TriplePattern :
public FirstOrderLiteral {
229 std::vector<VariablePtr>
getVariables(
bool includeObjectVar =
true)
const;
265 static std::shared_ptr<Atom>
getGraphTerm(
const std::string_view &graphName);
308 std::vector<TriplePtr *>
data_;
static std::shared_ptr< const Bindings > emptyBindings()
const auto & predicate() const
std::function< TriplePtr *()> MutableGenerator
std::function< const TriplePtr *()> ConstGenerator
ConstGenerator cgenerator() const override
TriplePatternContainer()=default
std::vector< TriplePatternPtr > statements_
MutableGenerator generator() override
TriplePatternContainer(const TriplePatternContainer &other)=delete
~TriplePatternContainer()
void push_back(const TriplePatternPtr &q)
std::vector< TriplePtr * > data_
void setObjectTerm(const TermPtr &objectTerm)
auto objectOperator() const
groundable< Double > beginTerm_
void getTripleFrame(GraphSelector &frame) const
static std::shared_ptr< Predicate > getRDFPredicate(const Triple &data)
void setEndTerm(const groundable< Double > &endTerm)
void setTripleFrame(const GraphSelector &frame)
groundable< Double > endTerm_
VariablePtr objectVariable_
bool instantiateInto(Triple &triple, const std::shared_ptr< const Bindings > &bindings=Bindings::emptyBindings()) const
void setGraphTerm(const groundable< Atom > &graphTerm)
static std::shared_ptr< Atom > getGraphTerm(const std::string_view &graphName)
void setIsOptional(bool isOptional)
void setObjectVariable(const VariablePtr &objectVariable)
auto & propertyTerm() const
void setConfidenceTerm(const groundable< Double > &confidenceTerm)
void setIsOccasionalTerm(const groundable< Numeric > &isOccasional)
void setBeginTerm(const groundable< Double > &beginTerm)
void setPerspectiveTerm(const groundable< Atom > &perspectiveTerm)
TriplePattern(const Triple &triple, bool isNegated=false)
void setSubjectTerm(const TermPtr &subjectTerm)
uint32_t numVariables() const override
void setObjectOperator(FilterType objectOperator)
groundable< Atom > graphTerm_
auto & subjectTerm() const
auto & objectVariable() const
void setGraphName(const std::string_view &graphName)
void setIsUncertainTerm(const groundable< Numeric > &isUncertain)
std::vector< VariablePtr > getVariables(bool includeObjectVar=true) const
static std::shared_ptr< Predicate > getRDFPredicate(const PredicatePtr &predicate)
auto & isOccasionalTerm() const
FilterType objectOperator_
auto & isUncertainTerm() const
TriplePattern(const TermPtr &s, const TermPtr &p, const TermPtr &o, bool isNegated=false)
static std::shared_ptr< Atom > getGraphTerm(const std::string_view &graphName)
groundable< Numeric > isOccasional_
auto & objectTerm() const
groundable< Numeric > isUncertain_
bool filter(const Triple &triple) const
static std::shared_ptr< Predicate > getRDFPredicate(const TermPtr &s, const TermPtr &p, const TermPtr &o)
groundable< Atom > perspectiveTerm_
groundable< Double > confidenceTerm_
auto & perspectiveTerm() const
TriplePattern(const PredicatePtr &predicate, bool isNegated=false)
auto & confidenceTerm() const
const IRIAtomPtr isUncertain
const IRIAtomPtr isOccasional
std::shared_ptr< TriplePattern > TriplePatternPtr
std::shared_ptr< Term > TermPtr
FilterType inverseFilterType(FilterType op)
std::shared_ptr< Predicate > PredicatePtr
std::shared_ptr< Variable > VariablePtr
FirstOrderLiteralPtr applyBindings(const FirstOrderLiteralPtr &lit, const Bindings &bindings)