Nepomuk-Core
resource.cpp
Go to the documentation of this file.
506 return ( property( Soprano::Vocabulary::NAO::description() ).toStringList() << QString() ).first();
541 return convertResourceList<Tag>( property( Soprano::Vocabulary::NAO::hasTag() ).toResourceList() );
602 return ( property( Soprano::Vocabulary::NAO::prefLabel() ).toStringList() << QString() ).first();
614 return ( property( Soprano::Vocabulary::NAO::numericRating() ).toUnsignedIntList() << 0 ).first();
625 QList<Resource> symbolResources = property( Soprano::Vocabulary::NAO::hasSymbol() ).toResourceList();
646 Soprano::QueryResultIterator it = model->executeQuery( query, Soprano::Query::QueryLanguageSparql );
679 QList<Soprano::Node> list = model->listStatements( Soprano::Node(), NAO::isRelated(), uri() ).iterateSubjects().allNodes();
743 Nepomuk2::Resource Nepomuk2::Resource::fromResourceUri( const KUrl& uri, const Nepomuk2::Types::Class& type )
void setProperty(const QUrl &uri, const Variant &value)
Set a property of the resource.
Definition: resource.cpp:285
bool hasType(const QUrl &typeUri) const
Check if the resource is of a certain type.
Definition: resource.cpp:218
Resource & operator=(const Resource &other)
Makes this instance of Resource a copy of other.
Definition: resource.cpp:141
KJob * addProperty(const QList< QUrl > &resources, const QUrl &property, const QVariantList &values, const KComponentData &component=KGlobal::mainComponent())
Add one or more property values to one or more resources.
Definition: datamanagement.cpp:36
void addIdentifier(const QString &value)
Add a value to property 'identifier'.
Definition: resource.cpp:528
QString genericDescription() const
Tries very hard to find a suitable human-readable description of the resource.
Definition: resource.cpp:396
bool hasProperty(const QUrl &uri) const
Check if property identified by uri is defined for this resource.
Definition: resource.cpp:240
Definition: resource.h:45
Definition: resource.h:47
QString genericIcon() const
Tries very hard to find an icon suitable for this resource.
Definition: resource.cpp:409
QList< Variant > toVariantList() const
Convert a Variant to a list of Variants.
Definition: variant.cpp:1173
void increaseUsageCount()
Increase the usage count of this resource and also update the last used date to the current date and ...
Definition: resource.cpp:693
The Nepomuk Variant extends over QVariant by introducing direct support for Resource embedding...
Definition: variant.h:65
void setIsRelateds(const QList< Resource > &value)
Set property 'isRelated'.
Definition: resource.cpp:583
QHash< QUrl, Variant > properties() const
Definition: resource.cpp:230
Variant property(const QUrl &uri) const
Retrieve the value of property uri.
Definition: resource.cpp:264
void setWatchEnabled(bool status)
Enables automatic updates of the internal cache using a ResourceWatcher.
Definition: resource.cpp:725
File toFile() const
Convert this resource into a File resource to have access to the convinience methods provided by the ...
Definition: resource.cpp:720
A property is a resource of type rdf:Property which relates a domain with a range.
Definition: libnepomukcore/types/property.h:52
static ResourceManager * instance()
Definition: resourcemanager.cpp:270
static Resource fromResourceUri(const KUrl &uri, const Nepomuk2::Types::Class &type=Nepomuk2::Types::Class())
Allows to quickly load a resource from its resource URI without any additional checks.
Definition: resource.cpp:743
QString genericLabel() const
Tries very hard to find a suitable human-readable label for this resource.
Definition: resource.cpp:341
bool operator==(const Resource &) const
Operator to compare two Resource objects.
Definition: resource.cpp:459
void addIsRelated(const Resource &value)
Add a value to property 'isRelated'.
Definition: resource.cpp:589
The ResourceManager is the central Nepomuk configuration point.
Definition: resourcemanager.h:55
void removeProperty(const QUrl &uri)
Remove property uri from this resource object.
Definition: resource.cpp:294
bool operator!=(const Resource &) const
Operator to compare two Resource objects.
Definition: resource.cpp:483
KJob * setProperty(const QList< QUrl > &resources, const QUrl &property, const QVariantList &values, const KComponentData &component=KGlobal::mainComponent())
Set the values of a property for one or more resources.
Definition: datamanagement.cpp:48
void setIdentifiers(const QStringList &value)
Set property 'identifier'.
Definition: resource.cpp:522
QString toString() const
The toString() method is a little more powerful than other toXXX methods since it actually converts a...
Definition: variant.cpp:827
void setTypes(const QList< QUrl > &types)
Set the types of the resource.
Definition: resource.cpp:200
Soprano::Model * mainModel()
Retrieve the main data storage model.
Definition: resourcemanager.cpp:363
QList< Resource > isRelatedOf() const
Get all resources that have this resource set as property 'isRelated'.
Definition: resource.cpp:676
void addProperty(const QUrl &uri, const Variant &value)
Add a property value to the existing values.
Definition: resource.cpp:276
Definition: resourcedata.h:42
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.