Nepomuk-Core
#include <datamanagementmodel.h>
Inherits FilterModel.
Public Slots | |
void | clearCache () |
QUrl | nepomukGraph () |
TypeCache * | typeCache () |
Basic API | |
void | addProperty (const QList< QUrl > &resources, const QUrl &property, const QVariantList &values, const QString &app) |
void | setProperty (const QList< QUrl > &resources, const QUrl &property, const QVariantList &values, const QString &app) |
void | removeProperty (const QList< QUrl > &resources, const QUrl &property, const QVariantList &values, const QString &app) |
void | removeProperties (const QList< QUrl > &resources, const QList< QUrl > &properties, const QString &app) |
QUrl | createResource (const QList< QUrl > &types, const QString &label, const QString &description, const QString &app) |
void | removeResources (const QList< QUrl > &resources, Nepomuk2::RemovalFlags flags, const QString &app) |
Advanced API | |
void | removeDataByApplication (const QList< QUrl > &resources, RemovalFlags flags, const QString &app) |
void | removeDataByApplication (RemovalFlags flags, const QString &app) |
QHash< QUrl, QUrl > | storeResources (const SimpleResourceGraph &resources, const QString &app, Nepomuk2::StoreIdentificationMode identificationMode=Nepomuk2::IdentifyNew, Nepomuk2::StoreResourcesFlags flags=Nepomuk2::NoStoreResourcesFlags, const QHash< QUrl, QVariant > &additionalMetadata=(QHash< QUrl, QVariant >())) |
QHash< QUrl, QUrl > | storeResources (const SimpleResourceGraph &resources, const QString &app, bool discardable, Nepomuk2::StoreIdentificationMode identificationMode=Nepomuk2::IdentifyNew, Nepomuk2::StoreResourcesFlags flags=Nepomuk2::NoStoreResourcesFlags) |
void | mergeResources (const QList< QUrl > &resources, const QString &app) |
void | importResources (const QUrl &url, const QString &app, Soprano::RdfSerialization serialization, const QString &userSerialization=QString(), Nepomuk2::StoreIdentificationMode identificationMode=Nepomuk2::IdentifyNew, Nepomuk2::StoreResourcesFlags flags=Nepomuk2::NoStoreResourcesFlags, const QHash< QUrl, QVariant > &additionalMetadata=(QHash< QUrl, QVariant >())) |
SimpleResourceGraph | describeResources (const QList< QUrl > &resources, DescribeResourcesFlags flags=NoDescribeResourcesFlags, const QList< QUrl > &targetParties=QList< QUrl >()) |
QString | exportResources (const QList< QUrl > &resources, Soprano::RdfSerialization serialization, const QString &userSerialization=QString(), DescribeResourcesFlags flags=NoDescribeResourcesFlags, const QList< QUrl > &targetParties=QList< QUrl >()) |
Public Member Functions | |
DataManagementModel (ClassAndPropertyTree *tree, Soprano::Model *model, QObject *parent=0) | |
~DataManagementModel () | |
ResourceWatcherManager * | resourceWatcherManager () const |
Detailed Description
Definition at line 39 of file datamanagementmodel.h.
Constructor & Destructor Documentation
Nepomuk2::DataManagementModel::DataManagementModel | ( | Nepomuk2::ClassAndPropertyTree * | tree, |
Soprano::Model * | model, | ||
QObject * | parent = 0 |
||
) |
Definition at line 211 of file datamanagementmodel.cpp.
Nepomuk2::DataManagementModel::~DataManagementModel | ( | ) |
Definition at line 268 of file datamanagementmodel.cpp.
Member Function Documentation
|
slot |
Add property
with values
to each resource from resources
.
Existing values will not be touched. If a cardinality is breached an error will be thrown.
Definition at line 321 of file datamanagementmodel.cpp.
|
slot |
Clear the internal cache present in the model.
Definition at line 247 of file datamanagementmodel.cpp.
|
slot |
Create a new resource with several types
.
Definition at line 814 of file datamanagementmodel.cpp.
|
slot |
Describe a set of resources, i.e.
retrieve all their properties.
- Parameters
-
resources The resource URIs of the resources to describe. Non-existing resources are ignored. flags Optional flags to modify the data which is returned. targetParties This optional list can be used to specify the parties (nao:Party) which should receive the returned data. This will result in a filtering of the result according to configured permissions. Only data which is set as being public or readable by the specified parties is returned.
Definition at line 1711 of file datamanagementmodel.cpp.
|
slot |
Export a set of resources, i.e.
retrieve their properties.
- Parameters
-
resources The resource URIs of the resources to describe. Non-existing resources are ignored. serialization The RDF serialization used for the result. userSerialization If serialization
is Soprano::SerializationUser this value is used. See Soprano::Parser for details.flags Optional flags to modify the data which is returned. targetParties This optional list can be used to specify the parties (nao:Party) which should receive the returned data. This will result in a filtering of the result according to configured permissions. Only data which is set as being public or readable by the specified parties is returned.
- Returns
- A serialized representation of the requested resources.
- See also
- describeResources
Definition at line 1925 of file datamanagementmodel.cpp.
|
slot |
Import an RDF graph from a URL.
- Parameters
-
url The url from which the graph should be loaded. This does not have to be local. serialization The RDF serialization used for the file. If Soprano::SerializationUnknown a crude automatic detection based on file extension is used. userSerialization If serialization
is Soprano::SerializationUser this value is used. See Soprano::Parser for details.identificationMode This method can try hard to avoid duplicate resources by looking for already existing duplicates based on nrl:DefiningProperty. By default it only looks for duplicates of resources that do not have a resource URI (SimpleResource::uri()) defined. This behaviour can be changed with this parameter. flags Additional flags to change the behaviour of the method. additionalMetadata Additional metadata for the added resources. This can include such details as the creator of the data or details on the method of data recovery. One typical usecase is that the file indexer uses (rdf:type, nrl:DiscardableInstanceBase) to state that the provided information can be recreated at any time. Only built-in types such as int, string, or url are supported. app The calling application
Definition at line 1558 of file datamanagementmodel.cpp.
|
slot |
Merges all the resources into one.
Properties from the first resource in resources
take precedence over all other resources present in resources
Definition at line 1608 of file datamanagementmodel.cpp.
|
slot |
Definition at line 2608 of file datamanagementmodel.cpp.
|
slot |
Remove all information about resources from the database which have been created by a specific application.
- Parameters
-
resources The URIs of the resources to be removed. app The application for which data should be removed. force Force deletion of the resource and all sub-resources. If false sub-resources will be kept if they are still referenced by other resources.
Definition at line 948 of file datamanagementmodel.cpp.
|
slot |
Remove all information from the database which has been created by a specific application.
- Parameters
-
app The application for which data should be removed. force Force deletion of the resource and all sub-resources. If false sub-resources will be kept if they are still referenced by resources that have been created by other applications.
Definition at line 1143 of file datamanagementmodel.cpp.
|
slot |
Remove all statements involving any proerty from properties
from all resources in resources
.
Definition at line 713 of file datamanagementmodel.cpp.
|
slot |
Remove the property property
with values
from each resource in resources
.
Definition at line 617 of file datamanagementmodel.cpp.
|
slot |
Remove resources from the database.
- Parameters
-
resources The URIs of the resources to be removed. app The calling application. force Force deletion of the resource and all sub-resources. If false sub-resources will be kept if they are still referenced by other resources.
Definition at line 907 of file datamanagementmodel.cpp.
Nepomuk2::ResourceWatcherManager * Nepomuk2::DataManagementModel::resourceWatcherManager | ( | ) | const |
used by the unit tests
Definition at line 2598 of file datamanagementmodel.cpp.
|
slot |
Set, ie.
overwrite properties. Set property
with values
for each resource from resources
. Existing values will be replaced.
Definition at line 465 of file datamanagementmodel.cpp.
|
slot |
- Parameters
-
resources The resources to be merged. Blank nodes will be converted into new URIs (unless the corresponding resource already exists). identificationMode This method can try hard to avoid duplicate resources by looking for already existing duplicates based on nrl:DefiningProperty. By default it only looks for duplicates of resources that do not have a resource URI (SimpleResource::uri()) defined. This behaviour can be changed with this parameter. flags Additional flags to change the behaviour of the method. additionalMetadata Additional metadata for the added resources. This can include such details as the creator of the data or details on the method of data recovery. One typical usecase is that the file indexer uses (rdf:type, nrl:DiscardableInstanceBase) to state that the provided information can be recreated at any time. Only built-in types such as int, string, or url are supported.
- Note
- Due to performance concerns, currently only (rdf:type, nrl:DiscardableInstanceBase) is considered as additionalMetadata. The rest is ignored.
- Parameters
-
app The calling application
Definition at line 1285 of file datamanagementmodel.cpp.
|
slot |
- Parameters
-
resources The resources to be merged. Blank nodes will be converted into new URIs (unless the corresponding resource already exists). identificationMode This method can try hard to avoid duplicate resources by looking for already existing duplicates based on nrl:DefiningProperty. By default it only looks for duplicates of resources that do not have a resource URI (SimpleResource::uri()) defined. This behaviour can be changed with this parameter. flags Additional flags to change the behaviour of the method. discardable Indicates if the data being stored is discardable. This is typically used in the file indexer so that the rdf:type nrl:DiscardableInstanceBase is applied. app The calling application
|
slot |
Definition at line 2603 of file datamanagementmodel.cpp.
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.