• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

Nepomuk-Core

  • Nepomuk2
  • Sync
  • ResourceIdentifier
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Nepomuk2::Sync::ResourceIdentifier Class Referenceabstract

#include <syncresourceidentifier.h>

Inheritance diagram for Nepomuk2::Sync::ResourceIdentifier:
Inheritance graph
[legend]

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.

Author
Vishesh Handa handa.nosp@m..vis.nosp@m.h@gma.nosp@m.il.c.nosp@m.om

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.

Nepomuk2::Sync::ResourceIdentifier::~ResourceIdentifier ( )
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.

KUrl Nepomuk2::Sync::ResourceIdentifier::duplicateMatch ( const KUrl &  uri,
const QSet< KUrl > &  matchedUris 
)
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.

virtual bool Nepomuk2::Sync::ResourceIdentifier::isIdentifyingProperty ( const QUrl &  uri)
pure virtual
void Nepomuk2::Sync::ResourceIdentifier::manualIdentification ( const KUrl &  oldUri,
const KUrl &  newUri 
)
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.

bool Nepomuk2::Sync::ResourceIdentifier::runIdentification ( const KUrl &  uri)
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

QSet<KUrl> Nepomuk2::Sync::ResourceIdentifier::m_beingIdentified
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.

QHash<QUrl, QUrl> Nepomuk2::Sync::ResourceIdentifier::m_hash
protected

The main identification hash which maps external ResourceUris with the internal ones.

Definition at line 119 of file syncresourceidentifier.h.

Soprano::Model* Nepomuk2::Sync::ResourceIdentifier::m_model
protected

Definition at line 113 of file syncresourceidentifier.h.

QSet<KUrl> Nepomuk2::Sync::ResourceIdentifier::m_notIdentified
protected

Definition at line 121 of file syncresourceidentifier.h.

ResourceHash Nepomuk2::Sync::ResourceIdentifier::m_resourceHash
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:
  • syncresourceidentifier.h
  • syncresourceidentifier.cpp
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.

Nepomuk-Core

Skip menu "Nepomuk-Core"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal