<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://techbase.kde.org/skins/common/feed.css?0.2"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://techbase.kde.org/index.php?title=Projects/Nepomuk/GraphConcepts/en&amp;feed=atom&amp;action=history</id>
		<title>Projects/Nepomuk/GraphConcepts/en - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://techbase.kde.org/index.php?title=Projects/Nepomuk/GraphConcepts/en&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Projects/Nepomuk/GraphConcepts/en&amp;action=history"/>
		<updated>2013-06-19T17:11:47Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Projects/Nepomuk/GraphConcepts/en&amp;diff=77245&amp;oldid=prev</id>
		<title>FuzzyBot: Updating to match new version of source page</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Projects/Nepomuk/GraphConcepts/en&amp;diff=77245&amp;oldid=prev"/>
				<updated>2012-12-13T16:30:02Z</updated>
		
		<summary type="html">&lt;p&gt;Updating to match new version of source page&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The Semantic Web - with quadruples ==&lt;br /&gt;
&lt;br /&gt;
'''Nepomuk''' is based on the Semantic Web, and even though the Semantic Web is largely advertised as a triple store, Nepomuk is NOT a triple store. We in fact store quadruples -&amp;gt; &amp;lt;tt&amp;gt;Subject - Predicate - Object - Graph&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;Graph&amp;lt;/tt&amp;gt; part of these quadruples is always automatically managed by Nepomuk. Clients rarely (if ever) need to care about the graph.&lt;br /&gt;
&lt;br /&gt;
However, if you still want to know why they are present. Read on.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;graph&amp;lt;/tt&amp;gt; is also called the context of the statement. It is used to store some information about each triple&lt;br /&gt;
&lt;br /&gt;
== Graph Naming ==&lt;br /&gt;
&lt;br /&gt;
Every graph in '''Nepomuk''' is given a unique uri which is of the form &amp;lt;tt&amp;gt;nepomuk:/ctx/uuid&amp;lt;/tt&amp;gt;. The &amp;lt;tt&amp;gt;ctx&amp;lt;/tt&amp;gt; over here is an abbreviation for context.&lt;br /&gt;
&lt;br /&gt;
== Graph Creation ==&lt;br /&gt;
&lt;br /&gt;
The first obvious question is - When are graphs created? Is everything just added into one big graph?&lt;br /&gt;
&lt;br /&gt;
'''Nepomuk''' works by creating new graphs for each atomic operation. These operations are the ones defined by the [http://api.kde.org/4.x-api/kdelibs-apidocs/nepomuk-core/html/datamanagement_8h.html DataManagement functions] -&lt;br /&gt;
&lt;br /&gt;
* [http://api.kde.org/4.x-api/kdelibs-apidocs/nepomuk-core/html/group__nepomuk__datamanagement.html#gafb8a64e1fb9e8339ff87be1b7a370a57 addProperty]&lt;br /&gt;
* [http://api.kde.org/4.x-api/kdelibs-apidocs/nepomuk-core/html/group__nepomuk__datamanagement.html#gaa86c603d624d55703b0e41bbec77d2ec setProperty]&lt;br /&gt;
* [http://api.kde.org/4.x-api/kdelibs-apidocs/nepomuk-core/html/group__nepomuk__datamanagement.html#gad731308a74b75a1a2bb20b1676eda2ed createResource]&lt;br /&gt;
* [http://api.kde.org/4.x-api/kdelibs-apidocs/nepomuk-core/html/group__nepomuk__datamanagement.html#gac094511c6157fb1f96f3a3344d48128d storeResources]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each time any of these operations is called and new data is being pushed, a new graph with the current date time is created.&lt;br /&gt;
&lt;br /&gt;
== Graph contents ==&lt;br /&gt;
&lt;br /&gt;
Graphs in '''Nepomuk''' store the following information -&lt;br /&gt;
&lt;br /&gt;
* Graph Type&lt;br /&gt;
* Creation Date&lt;br /&gt;
* Modification Date&lt;br /&gt;
* Graph Maintainer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example -&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;nepomuk:/ctx/c4d93812-7d8c-4c8f-b8a7-e1d4dbc5fed5&amp;gt;&lt;br /&gt;
        rdf:type                nrl:InstanceBase&lt;br /&gt;
        nao:created             2011-07-30T11:34:19.587Z&lt;br /&gt;
        nao:modified            2011-07-30T11:34:19.587Z&lt;br /&gt;
        nao:maintainedBy        nepomuk:/res/e2eb2efb-14ee-4038-ac24-698f916289b0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;nao:created&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;nao:lastModified&amp;lt;/tt&amp;gt; properties are identical to those used in resources. Except for the fact that graphs are generally never modified. They are only created or destroyed.&lt;br /&gt;
&lt;br /&gt;
=== Graph Type ===&lt;br /&gt;
&lt;br /&gt;
Each graph has a type which depends on the type of data it holds. The 3 most commonly used types are -&lt;br /&gt;
* &amp;lt;tt&amp;gt;nrl:Ontology&amp;lt;/tt&amp;gt; - Used to hold ontology data.&lt;br /&gt;
* &amp;lt;tt&amp;gt;nrl:InstanceBase&amp;lt;/tt&amp;gt; - Used for normal data&lt;br /&gt;
* &amp;lt;tt&amp;gt;nrl:DiscardableInstanceBase&amp;lt;/tt&amp;gt; - Used for data which can be reproduced and should not be backed up. This type is generally reserved for data created during indexing of files.&lt;br /&gt;
&lt;br /&gt;
=== Agents ===&lt;br /&gt;
&lt;br /&gt;
Each graph contains a property called &amp;lt;tt&amp;gt;nao:maintainedBy&amp;lt;/tt&amp;gt; which specifies which application created that data -&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;nepomuk:/ctx/c4d93812-7d8c-4c8f-b8a7-e1d4dbc5fed5&amp;gt;&lt;br /&gt;
        rdf:type                nrl:DiscardableInstanceBase&lt;br /&gt;
        nao:created             2011-07-30T11:34:19.587Z&lt;br /&gt;
        nao:modified            2011-07-30T11:34:19.587Z&lt;br /&gt;
        nao:maintainedBy        nepomuk:/res/e2eb2efb-14ee-4038-ac24-698f916289b0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nepomuk:/res/e2eb2efb-14ee-4038-ac24-698f916289b0&amp;gt;&lt;br /&gt;
        rdf:type                nao:Agent&lt;br /&gt;
        rdf:type                rdfs:Resource&lt;br /&gt;
        nao:identifier          nepomukindexer&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each application is represented as a &amp;lt;tt&amp;gt;nao:Agent&amp;lt;/tt&amp;gt; with the application name specified as the nao:identifier. This name is automatically determined via &amp;lt;tt&amp;gt;KComponentData&amp;lt;/tt&amp;gt; and can be spoofed. Security was not one of our concerns.&lt;br /&gt;
&lt;br /&gt;
Each triple may be maintained by a number of different applications. This information is valuable for the advanced DataManagement functions such as [http://api.kde.org/4.x-api/kdelibs-apidocs/nepomuk-core/html/group__nepomuk__datamanagement.html#ga0fbf22be4b581afd0b5bcd1f203e934f &amp;lt;tt&amp;gt;removeDataByApplication&amp;lt;/tt&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>FuzzyBot</name></author>	</entry>

	</feed>