4#include <knowCore/IOFormat.h>
5#include <knowCore/Logging.h>
6#include <knowRDF/BlankNode.h>
7#include <knowRDF/Object.h>
8#include <knowRDF/Subject.h>
9#include <knowRDF/Triple.h>
18 return _triple1.predicate() == _triple2.predicate()
19 and (_triple1.subject() == _triple2.subject() or (_triple1.subject().type() == knowRDF::Subject::Type::BlankNode and _triple2.subject().type() == knowRDF::Subject::Type::BlankNode ) )
20 and (_triple1.object() == _triple2.object() or (_triple1.object().type() == knowRDF::Object::Type::BlankNode and _triple2.object().type() == knowRDF::Object::Type::BlankNode ) );
25 if(_triples1.size() != _triples2.size())
27 KNOWCORE_LOG_ERROR(
"Different number of triples: {} != {}", _triples1.size(), _triples2.size());
31 QVector<bool> matched(_triples2.size(),
false);
35 bool found_one =
false;
36 for(
int j = 0; j < _triples2.size(); ++j)
38 if(not matched[j] and compare_triple(triple, _triples2[j]))
46 KNOWCORE_LOG_ERROR(
"No match found for triple: {}", triple);
47 qWarning().nospace() << IOFormat::blue <<
"Possible reference triples were" << IOFormat::reset;
48 for(
int j = 0; j < _triples2.size(); ++j)
50 qWarning().nospace() << IOFormat::bold << j <<
"th: " << _triples2[j] << IOFormat::reset;
52 qWarning().nospace() << IOFormat::red <<
"Tested triples were" << IOFormat::reset;
53 for(
int j = 0; j < _triples1.size(); ++j)
55 qWarning().nospace() << IOFormat::bold << j <<
"th: " << _triples1[j] << IOFormat::reset;