Nepomuk-Core
#include <syncresourceidentifier.h>
Public Member Functions | |
ResourceIdentifier (Soprano::Model *model) | |
virtual | ~ResourceIdentifier () |
void | addSyncResource (const SyncResource &res) |
bool | identify (const KUrl &uri) |
void | identify (const KUrl::List &uriList) |
void | identifyAll () |
virtual bool | isIdentifyingProperty (const QUrl &uri)=0 |
QHash< QUrl, QUrl > | mappings () const |
ResourceHash | resourceHash () const |
SyncResource | simpleResource (const KUrl &uri) |
Protected Member Functions | |
virtual KUrl | duplicateMatch (const KUrl &uri, const QSet< KUrl > &matchedUris) |
void | manualIdentification (const KUrl &oldUri, const KUrl &newUri) |
virtual bool | runIdentification (const KUrl &uri) |
Protected Attributes | |
QSet< KUrl > | m_beingIdentified |
QHash< QUrl, QUrl > | m_hash |
Soprano::Model * | m_model |
QSet< KUrl > | m_notIdentified |
ResourceHash | m_resourceHash |
Detailed Description
This class is used to identify already existing resources from a set of properties and objects.
It identifies the resources on the basis of the identifying statements provided.
Definition at line 56 of file syncresourceidentifier.h.
Constructor & Destructor Documentation
Nepomuk2::Sync::ResourceIdentifier::ResourceIdentifier | ( | Soprano::Model * | model | ) |
Definition at line 51 of file syncresourceidentifier.cpp.
|
virtual |
Definition at line 56 of file syncresourceidentifier.cpp.
Member Function Documentation
void Nepomuk2::Sync::ResourceIdentifier::addSyncResource | ( | const SyncResource & | res | ) |
Definition at line 62 of file syncresourceidentifier.cpp.
|
protectedvirtual |
Called during identification if there is more than one match for one resource.
The default behavior is to return an empty uri, which depicts identification failure
Reimplemented in Nepomuk2::ResourceIdentifier.
Definition at line 299 of file syncresourceidentifier.cpp.
bool Nepomuk2::Sync::ResourceIdentifier::identify | ( | const KUrl & | uri | ) |
Definition at line 86 of file syncresourceidentifier.cpp.
void Nepomuk2::Sync::ResourceIdentifier::identify | ( | const KUrl::List & | uriList | ) |
Identifies all the resources present in the uriList
.
Definition at line 106 of file syncresourceidentifier.cpp.
void Nepomuk2::Sync::ResourceIdentifier::identifyAll | ( | ) |
Definition at line 80 of file syncresourceidentifier.cpp.
|
pure virtual |
|
protected |
Sets oldUri -> newUri in the mappings.
This is useful when runIdentification has been reimplemented.
Definition at line 308 of file syncresourceidentifier.cpp.
QHash< QUrl, QUrl > Nepomuk2::Sync::ResourceIdentifier::mappings | ( | ) | const |
Returns mappings of the identified uri.
Definition at line 279 of file syncresourceidentifier.cpp.
Nepomuk2::Sync::ResourceHash Nepomuk2::Sync::ResourceIdentifier::resourceHash | ( | ) | const |
Definition at line 294 of file syncresourceidentifier.cpp.
|
protectedvirtual |
This function returns true if identification was successful, and false if it was not.
If you need to customize the identification process, you will need to overload this function.
Reimplemented in Nepomuk2::ResourceIdentifier.
Definition at line 113 of file syncresourceidentifier.cpp.
Nepomuk2::Sync::SyncResource Nepomuk2::Sync::ResourceIdentifier::simpleResource | ( | const KUrl & | uri | ) |
Definition at line 284 of file syncresourceidentifier.cpp.
Member Data Documentation
|
protected |
This contains all the urls that are being identified, at any moment.
It is used to avoid infinite recursion while generating the sparql query.
Definition at line 131 of file syncresourceidentifier.h.
|
protected |
The main identification hash which maps external ResourceUris with the internal ones.
Definition at line 119 of file syncresourceidentifier.h.
|
protected |
Definition at line 113 of file syncresourceidentifier.h.
|
protected |
Definition at line 121 of file syncresourceidentifier.h.
|
protected |
Used to store all the identification statements.
Definition at line 124 of file syncresourceidentifier.h.
The documentation for this class was generated from the following files:
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.