Nepomuk-Core
Go to the documentation of this file.
23 #include <Soprano/Model>
24 #include <Soprano/Node>
25 #include <Soprano/QueryResultIterator>
27 #include <Soprano/Vocabulary/RDFS>
29 using namespace Nepomuk2;
30 using namespace Soprano::Vocabulary;
36 m_cache.setMaxCost( 20 );
46 QMutexLocker locker( &m_mutex );
48 QList<QUrl>* obj = m_cache.object( uri );
53 obj =
new QList<QUrl>;
56 QString query = QString::fromLatin1(
"select ?t where { %1 a ?t . }")
57 .arg( Soprano::Node::resourceToN3( uri ) );
58 Soprano::QueryResultIterator it = m_model->executeQuery( query, Soprano::Query::QueryLanguageSparql );
60 obj->append( it[0].uri() );
64 obj->append( RDFS::Resource() );
66 m_cache.insert( uri, obj );
73 QMutexLocker locker( &m_mutex );
TypeCache(Soprano::Model *model)
QList< QUrl > types(const QUrl &uri)
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:09 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.