7#include <knowRDF/BlankNode.h>
8#include <knowRDF/Object.h>
9#include <knowRDF/Subject.h>
10#include <knowRDF/Triple.h>
20 return _triple1.predicate() == _triple2.predicate()
21 and (_triple1.subject() == _triple2.subject()
22 or (_triple1.subject().type() == knowRDF::Subject::Type::BlankNode
23 and _triple2.subject().type() == knowRDF::Subject::Type::BlankNode))
24 and (_triple1.object() == _triple2.object()
25 or (_triple1.object().type() == knowRDF::Object::Type::BlankNode
26 and _triple2.object().type() == knowRDF::Object::Type::BlankNode));
31 if(_triples1.size() != _triples2.size())
33 clog_error(
"Different number of triples: {} != {}", _triples1.size(), _triples2.size());
37 QVector<bool> matched(_triples2.size(),
false);
41 bool found_one =
false;
42 for(
int j = 0; j < _triples2.size(); ++j)
44 if(not matched[j] and compare_triple(triple, _triples2[j]))
52 clog_error(
"No match found for triple: {}", triple);
53 clog_print<clog_print_flag::blue>(
"Possible reference triples were");
54 for(
int j = 0; j < _triples2.size(); ++j)
56 clog_print<clog_print_flag::bold>(
"{}th: {}", j, _triples2[j]);
58 clog_print<clog_print_flag::red>(
"Tested triples were");
59 for(
int j = 0; j < _triples1.size(); ++j)
61 clog_print<clog_print_flag::bold>(
"{}th: {}", j, _triples1[j]);