[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/base/nepomuk-kde/scribo
From:       Sebastian Trueg <sebastian () trueg ! de>
Date:       2009-06-17 17:12:49
Message-ID: 1245258769.900568.17626.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 983144 by trueg:

* Added simple Scribo plugin which looks at all words in the text and tries to find \
                things in the local Nepomuk db.
* Added Entity::localResource. This is more a hack than a real solution.
* Install scriboshell


 M  +11 -1     lib/entity.cpp  
 M  +11 -1     lib/entity.h  
 M  +2 -0      lib/entity_p.h  
 M  +1 -0      plugins/CMakeLists.txt  
 A             plugins/pimo (directory)  
 A             plugins/pimo/CMakeLists.txt  
 A             plugins/pimo/pimotextmatchplugin.cpp   [License: LGPL (v2+)]
 A             plugins/pimo/pimotextmatchplugin.h   [License: LGPL (v2+)]
 A             plugins/pimo/scribo_pimotextmatchplugin.desktop  
 M  +1 -1      shell/CMakeLists.txt  


--- trunk/playground/base/nepomuk-kde/scribo/lib/entity.cpp #983143:983144
@@ -55,7 +55,10 @@
 }
 
 
-Scribo::Entity::Entity( const QString& label, const Nepomuk::Types::Class& type, \
const Soprano::Graph& rdf ) +Scribo::Entity::Entity( const QString& label,
+                        const Nepomuk::Types::Class& type,
+                        const Soprano::Graph& rdf,
+                        const Nepomuk::Resource& res )
     : TextMatch( new EntityPrivate() )
 {
     EntityPrivate* p = static_cast<EntityPrivate*>( d );
@@ -63,6 +66,7 @@
     p->m_name = label;
     p->m_rdf = rdf;
     p->m_type = type;
+    p->m_localResource = res;
 }
 
 
@@ -83,3 +87,9 @@
 {
     return static_cast<EntityPrivate*>( d )->m_type;
 }
+
+
+Nepomuk::Resource Scribo::Entity::localResource() const
+{
+    return static_cast<EntityPrivate*>( d )->m_localResource;
+}
--- trunk/playground/base/nepomuk-kde/scribo/lib/entity.h #983143:983144
@@ -25,6 +25,8 @@
 
 #include "scribo_export.h"
 
+#include <Nepomuk/Resource>
+
 namespace Nepomuk {
     namespace Types {
         class Class;
@@ -40,12 +42,20 @@
     public:
         Entity();
         Entity( const Entity& );
-        Entity( const QString& label, const Nepomuk::Types::Class& type, const \
Soprano::Graph& rdf ); +        Entity( const QString& label,
+                const Nepomuk::Types::Class& type,
+                const Soprano::Graph& rdf,
+                const Nepomuk::Resource& res = Nepomuk::Resource() );
         ~Entity();
 
         Entity& operator=( const Entity& );
 
         Nepomuk::Types::Class type() const;
+
+        /**
+         * An optional reference to a local resource.
+         */
+        Nepomuk::Resource localResource() const;
     };
 }
 
--- trunk/playground/base/nepomuk-kde/scribo/lib/entity_p.h #983143:983144
@@ -24,6 +24,7 @@
 #include "textmatch_p.h"
 
 #include <Nepomuk/Types/Class>
+#include <Nepomuk/Resource>
 
 
 namespace Scribo {
@@ -34,6 +35,7 @@
 
         QString m_name;
         mutable Nepomuk::Types::Class m_type;
+        Nepomuk::Resource m_localResource;
 
         bool isEntity() const { return true; }
 
--- trunk/playground/base/nepomuk-kde/scribo/plugins/CMakeLists.txt #983143:983144
@@ -1,3 +1,4 @@
 project(scriboplugins)
 
 add_subdirectory(opencalais)
+add_subdirectory(pimo)
--- trunk/playground/base/nepomuk-kde/scribo/shell/CMakeLists.txt #983143:983144
@@ -26,6 +26,6 @@
   ${KDE4_KUTILS_LIBS}
 )
 
-#install(TARGETS scriboshell DESTINATION ${BIN_INSTALL_DIR})
+install(TARGETS scriboshell DESTINATION ${BIN_INSTALL_DIR})
 #install(FILES scriboshell.desktop DESTINATION ${SERVICES_INSTALL_DIR}/ServiceMenus)
 #install(FILES scriboshell-app.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic