Merge lp:~manishsinha/zeitgeist-sharp/fix-651341 into lp:~zeitgeist-sharp/zeitgeist-sharp/trunk

Status: Merged
Merged at revision: 34
Proposed branch: lp:~manishsinha/zeitgeist-sharp/fix-651341
Merge into: lp:~zeitgeist-sharp/zeitgeist-sharp/trunk
Diff against target: 1824 lines (+397/-364)
7 files modified
Zeitgeist/Datamodel/Event.cs (+7/-9)
Zeitgeist/Datamodel/Interpretation.cs (+266/-266)
Zeitgeist/Datamodel/Manifestation.cs (+83/-83)
Zeitgeist/Datamodel/NameUri.cs (+34/-0)
Zeitgeist/Datamodel/Subject.cs (+2/-2)
Zeitgeist/Zeitgeist.csproj (+1/-0)
Zeitgeist/ZsUtils.cs (+4/-4)
To merge this branch: bzr merge lp:~manishsinha/zeitgeist-sharp/fix-651341
Reviewer Review Type Date Requested Status
Mirco Bauer design, naming, api Approve
Seif Lotfy Pending
Review via email: mp+37337@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Mirco Bauer (meebey) wrote :

Besides the unnice naming of NameUri which is not really descriptive this change looks good to me. The corresponding type in the python API seems to be called Symbol which can hold more fields (like Parent).

review: Approve (design, naming, api)
Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

Well, the upcoming change would be to add the Parent Property.

BTW any other descriptive name instead of NameUri?

Revision history for this message
Mirco Bauer (meebey) wrote :

> Well, the upcoming change would be to add the Parent Property.
>
> BTW any other descriptive name instead of NameUri?

I can't came up with a better one, except copying the type name from the Python API: Symbol

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote :

Well, will get that done.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Zeitgeist/Datamodel/Event.cs'
2--- Zeitgeist/Datamodel/Event.cs 2010-10-01 16:40:29 +0000
3+++ Zeitgeist/Datamodel/Event.cs 2010-10-02 05:56:43 +0000
4@@ -53,7 +53,7 @@
5 /// <summary>
6 /// The Interpretation of the event
7 /// </summary>
8- public KeyValuePair<string, string> Interpretation
9+ public NameUri Interpretation
10 {
11 get;set;
12 }
13@@ -61,7 +61,7 @@
14 /// <summary>
15 /// The Manifestation of the event
16 /// </summary>
17- public KeyValuePair<string, string> Manifestation
18+ public NameUri Manifestation
19 {
20 get;set;
21 }
22@@ -81,9 +81,7 @@
23 {
24 get;set;
25 }
26-
27-
28-
29+
30 /// <summary>
31 /// Get the RawEvent for this Event
32 /// </summary>
33@@ -196,8 +194,8 @@
34
35 metaDataList[(int)EventMetadataPosition.Timestamp] = ZsUtils.ToTimestamp(ev.Timestamp).ToString();
36 metaDataList[(int)EventMetadataPosition.Actor] = ev.Actor;
37- metaDataList[(int)EventMetadataPosition.Interpretation] = ev.Interpretation.Value;
38- metaDataList[(int)EventMetadataPosition.Manifestation] = ev.Manifestation.Value;
39+ metaDataList[(int)EventMetadataPosition.Interpretation] = ev.Interpretation.Uri;
40+ metaDataList[(int)EventMetadataPosition.Manifestation] = ev.Manifestation.Uri;
41
42 raw.metadata = metaDataList.ToArray();
43
44@@ -221,8 +219,8 @@
45 subCont[(int)EventSubjectPosition.Mimetype] = sub.MimeType;
46 subCont[(int)EventSubjectPosition.Text] = sub.Text;
47 subCont[(int)EventSubjectPosition.Storage] = sub.Storage;
48- subCont[(int)EventSubjectPosition.Interpretation] = sub.Interpretation.Value;
49- subCont[(int)EventSubjectPosition.Manifestation] = sub.Manifestation.Value;
50+ subCont[(int)EventSubjectPosition.Interpretation] = sub.Interpretation.Uri;
51+ subCont[(int)EventSubjectPosition.Manifestation] = sub.Manifestation.Uri;
52
53 subList.Add(subCont.ToArray());
54
55
56=== modified file 'Zeitgeist/Datamodel/Interpretation.cs'
57--- Zeitgeist/Datamodel/Interpretation.cs 2010-09-18 11:42:53 +0000
58+++ Zeitgeist/Datamodel/Interpretation.cs 2010-10-02 05:56:43 +0000
59@@ -34,7 +34,7 @@
60 /// <remarks>
61 /// http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Alarm
62 /// </remarks>
63- public KeyValuePair<string, string> Alarm
64+ public NameUri Alarm
65 {
66 get
67 {
68@@ -48,7 +48,7 @@
69 /// <remarks>
70 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Bookmark
71 /// </remarks>
72- public KeyValuePair<string, string> Bookmark
73+ public NameUri Bookmark
74 {
75 get
76 {
77@@ -62,7 +62,7 @@
78 /// <remarks>
79 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#BookmarkFolder
80 /// </remarks>
81- public KeyValuePair<string, string> BookmarkFolder
82+ public NameUri BookmarkFolder
83 {
84 get
85 {
86@@ -76,7 +76,7 @@
87 /// <remarks>
88 /// http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Calendar
89 /// </remarks>
90- public KeyValuePair<string, string> Calendar
91+ public NameUri Calendar
92 {
93 get
94 {
95@@ -118,7 +118,7 @@
96 /// <remarks>
97 /// http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Event
98 /// </remarks>
99- public KeyValuePair<string, string> Event
100+ public NameUri Event
101 {
102 get
103 {
104@@ -146,7 +146,7 @@
105 /// <remarks>
106 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Executable
107 /// </remarks>
108- public KeyValuePair<string, string> Executable
109+ public NameUri Executable
110 {
111 get
112 {
113@@ -160,7 +160,7 @@
114 /// <remarks>
115 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Font
116 /// </remarks>
117- public KeyValuePair<string, string> Font
118+ public NameUri Font
119 {
120 get
121 {
122@@ -174,7 +174,7 @@
123 /// <remarks>
124 /// http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Freebusy
125 /// </remarks>
126- public KeyValuePair<string, string> Freebusy
127+ public NameUri Freebusy
128 {
129 get
130 {
131@@ -188,7 +188,7 @@
132 /// <remarks>
133 /// http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Journal
134 /// </remarks>
135- public KeyValuePair<string, string> Journal
136+ public NameUri Journal
137 {
138 get
139 {
140@@ -202,7 +202,7 @@
141 /// <remarks>
142 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Mailbox
143 /// </remarks>
144- public KeyValuePair<string, string> Mailbox
145+ public NameUri Mailbox
146 {
147 get
148 {
149@@ -258,7 +258,7 @@
150 /// <remarks>
151 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#MimeEntity
152 /// </remarks>
153- public KeyValuePair<string, string> MimeEntity
154+ public NameUri MimeEntity
155 {
156 get
157 {
158@@ -286,7 +286,7 @@
159 /// <remarks>
160 /// http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Timezone
161 /// </remarks>
162- public KeyValuePair<string, string> Timezone
163+ public NameUri Timezone
164 {
165 get
166 {
167@@ -300,7 +300,7 @@
168 /// <remarks>
169 /// http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Todo
170 /// </remarks>
171- public KeyValuePair<string, string> Todo
172+ public NameUri Todo
173 {
174 get
175 {
176@@ -314,7 +314,7 @@
177 /// <remarks>
178 /// http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#TVSeries
179 /// </remarks>
180- public KeyValuePair<string, string> TVSeries
181+ public NameUri TVSeries
182 {
183 get
184 {
185@@ -328,7 +328,7 @@
186 /// <remarks>
187 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Website
188 /// </remarks>
189- public KeyValuePair<string, string> Website
190+ public NameUri Website
191 {
192 get
193 {
194@@ -345,117 +345,117 @@
195 /// <returns>
196 /// The parsed value of Interpretation <see cref="KeyValuePair<System.String, System.String>"/>
197 /// </returns>
198- public KeyValuePair<string, string> Search(string interpretation)
199+ public NameUri Search(string interpretation)
200 {
201- if(string.Equals(_alarm.Value, interpretation))
202+ if(string.Equals(_alarm.Uri, interpretation))
203 return _alarm;
204
205- if(string.Equals(_bookmark.Value, interpretation))
206+ if(string.Equals(_bookmark.Uri, interpretation))
207 return _bookmark;
208
209- if(string.Equals(_bookmark_folder.Value, interpretation))
210+ if(string.Equals(_bookmark_folder.Uri, interpretation))
211 return _bookmark_folder;
212
213- if(string.Equals(_calendar.Value, interpretation))
214+ if(string.Equals(_calendar.Uri, interpretation))
215 return _calendar;
216
217- if(string.Equals(_event.Value, interpretation))
218+ if(string.Equals(_event.Uri, interpretation))
219 return _event;
220
221- if(string.Equals(_executable.Value, interpretation))
222+ if(string.Equals(_executable.Uri, interpretation))
223 return _executable;
224
225- if(string.Equals(_font.Value, interpretation))
226+ if(string.Equals(_font.Uri, interpretation))
227 return _font;
228
229- if(string.Equals(_free_busy.Value, interpretation))
230+ if(string.Equals(_free_busy.Uri, interpretation))
231 return _free_busy;
232
233- if(string.Equals(_journal.Value, interpretation))
234+ if(string.Equals(_journal.Uri, interpretation))
235 return _journal;
236
237- if(string.Equals(_mail_box.Value, interpretation))
238+ if(string.Equals(_mail_box.Uri, interpretation))
239 return _mail_box;
240
241- if(string.Equals(_mime_entity.Value, interpretation))
242+ if(string.Equals(_mime_entity.Uri, interpretation))
243 return _mime_entity;
244
245- if(string.Equals(_timezone.Value, interpretation))
246+ if(string.Equals(_timezone.Uri, interpretation))
247 return _timezone;
248
249- if(string.Equals(_todo.Value, interpretation))
250+ if(string.Equals(_todo.Uri, interpretation))
251 return _todo;
252
253- if(string.Equals(_tvseries.Value, interpretation))
254+ if(string.Equals(_tvseries.Uri, interpretation))
255 return _tvseries;
256
257- if(string.Equals(_website.Value, interpretation))
258+ if(string.Equals(_website.Uri, interpretation))
259 return _website;
260
261- KeyValuePair<string, string> datacont = _data_container.Search(interpretation);
262- if(datacont.Key != null)
263+ NameUri datacont = _data_container.Search(interpretation);
264+ if(datacont.Name != null)
265 return datacont;
266
267- KeyValuePair<string, string> doc = _document.Search(interpretation);
268- if(doc.Key != null)
269+ NameUri doc = _document.Search(interpretation);
270+ if(doc.Name != null)
271 return doc;
272
273- KeyValuePair<string, string> evnt_int = _event_interpretation.Search(interpretation);
274- if(evnt_int.Key != null)
275+ NameUri evnt_int = _event_interpretation.Search(interpretation);
276+ if(evnt_int.Name != null)
277 return evnt_int;
278
279- KeyValuePair<string, string> media = _media.Search(interpretation);
280- if(media.Key != null)
281+ NameUri media = _media.Search(interpretation);
282+ if(media.Name != null)
283 return media;
284
285- KeyValuePair<string, string> media_lst = _media_list.Search(interpretation);
286- if(media_lst.Key != null)
287+ NameUri media_lst = _media_list.Search(interpretation);
288+ if(media_lst.Name != null)
289 return media_lst;
290
291- KeyValuePair<string, string> msg = _message.Search(interpretation);
292- if(msg.Key != null)
293+ NameUri msg = _message.Search(interpretation);
294+ if(msg.Name != null)
295 return msg;
296
297- KeyValuePair<string, string> sw = _software.Search(interpretation);
298- if(sw.Key != null)
299+ NameUri sw = _software.Search(interpretation);
300+ if(sw.Name != null)
301 return sw;
302
303- return new KeyValuePair<string, string>();
304+ return new NameUri();
305 }
306
307 #region Private Fields
308
309 private static Interpretation _singleton_obj = new Interpretation();
310
311- private KeyValuePair<string, string> _alarm = new KeyValuePair<string, string>("Alarm", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Alarm");
312-
313- private KeyValuePair<string, string> _bookmark = new KeyValuePair<string, string>("Bookmark", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Bookmark");
314-
315- private KeyValuePair<string, string> _bookmark_folder = new KeyValuePair<string, string>("BookmarkFolder", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#BookmarkFolder");
316-
317- private KeyValuePair<string, string> _calendar = new KeyValuePair<string, string>("Calendar", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Calendar");
318-
319- private KeyValuePair<string, string> _event = new KeyValuePair<string, string>("Event", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Event");
320-
321- private KeyValuePair<string, string> _executable = new KeyValuePair<string, string>("Executable", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Executable");
322-
323- private KeyValuePair<string, string> _font = new KeyValuePair<string, string>("Font", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Font");
324-
325- private KeyValuePair<string, string> _free_busy = new KeyValuePair<string, string>("Freebusy", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Freebusy");
326-
327- private KeyValuePair<string, string> _journal = new KeyValuePair<string, string>("Journal", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Journal");
328-
329- private KeyValuePair<string, string> _mail_box = new KeyValuePair<string, string>("Mailbox", "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Mailbox");
330-
331- private KeyValuePair<string, string> _mime_entity = new KeyValuePair<string, string>("MimeEntity", "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#MimeEntity");
332-
333- private KeyValuePair<string, string> _timezone = new KeyValuePair<string, string>("Timezone", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Timezone");
334-
335- private KeyValuePair<string, string> _todo = new KeyValuePair<string, string>("Todo", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Todo");
336-
337- private KeyValuePair<string, string> _tvseries = new KeyValuePair<string, string>("TVSeries", "http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#TVSeries");
338-
339- private KeyValuePair<string, string> _website = new KeyValuePair<string, string>("Website", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Website");
340+ private NameUri _alarm = new NameUri("Alarm", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Alarm");
341+
342+ private NameUri _bookmark = new NameUri("Bookmark", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Bookmark");
343+
344+ private NameUri _bookmark_folder = new NameUri("BookmarkFolder", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#BookmarkFolder");
345+
346+ private NameUri _calendar = new NameUri("Calendar", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Calendar");
347+
348+ private NameUri _event = new NameUri("Event", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Event");
349+
350+ private NameUri _executable = new NameUri("Executable", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Executable");
351+
352+ private NameUri _font = new NameUri("Font", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Font");
353+
354+ private NameUri _free_busy = new NameUri("Freebusy", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Freebusy");
355+
356+ private NameUri _journal = new NameUri("Journal", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Journal");
357+
358+ private NameUri _mail_box = new NameUri("Mailbox", "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Mailbox");
359+
360+ private NameUri _mime_entity = new NameUri("MimeEntity", "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#MimeEntity");
361+
362+ private NameUri _timezone = new NameUri("Timezone", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Timezone");
363+
364+ private NameUri _todo = new NameUri("Todo", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Todo");
365+
366+ private NameUri _tvseries = new NameUri("TVSeries", "http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#TVSeries");
367+
368+ private NameUri _website = new NameUri("Website", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Website");
369
370 private DataContainerType _data_container = new DataContainerType();
371
372@@ -484,7 +484,7 @@
373 /// <remarks>
374 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#DataContainer
375 /// </remarks>
376- public KeyValuePair<string, string> DataContainer
377+ public NameUri DataContainer
378 {
379 get
380 {
381@@ -498,7 +498,7 @@
382 /// <remarks>
383 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Archive
384 /// </remarks>
385- public KeyValuePair<string, string> Archive
386+ public NameUri Archive
387 {
388 get
389 {
390@@ -526,7 +526,7 @@
391 /// <remarks>
392 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Folder
393 /// </remarks>
394- public KeyValuePair<string, string> Folder
395+ public NameUri Folder
396 {
397 get
398 {
399@@ -540,7 +540,7 @@
400 /// <remarks>
401 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Trash
402 /// </remarks>
403- public KeyValuePair<string, string> Trash
404+ public NameUri Trash
405 {
406 get
407 {
408@@ -548,36 +548,36 @@
409 }
410 }
411
412- public KeyValuePair<string, string> Search(string interpretation)
413+ public NameUri Search(string interpretation)
414 {
415- if(string.Equals(_datacontainer.Value, interpretation))
416+ if(string.Equals(_datacontainer.Uri, interpretation))
417 return _datacontainer;
418
419- if(string.Equals(_archive.Value, interpretation))
420+ if(string.Equals(_archive.Uri, interpretation))
421 return _archive;
422
423- if(string.Equals(_folder.Value, interpretation))
424+ if(string.Equals(_folder.Uri, interpretation))
425 return _folder;
426
427- if(string.Equals(_trash.Value, interpretation))
428+ if(string.Equals(_trash.Uri, interpretation))
429 return _trash;
430
431- KeyValuePair<string, string> fs = _filesystem.Search(interpretation);
432- if(fs.Key != null)
433+ NameUri fs = _filesystem.Search(interpretation);
434+ if(fs.Name != null)
435 return fs;
436
437- return new KeyValuePair<string, string>();
438+ return new NameUri();
439 }
440
441 #region Private Fields
442
443- private KeyValuePair<string, string> _datacontainer = new KeyValuePair<string, string>("DataContainer", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#DataContainer");
444-
445- private KeyValuePair<string, string> _archive = new KeyValuePair<string, string>("Archive", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Archive");
446-
447- private KeyValuePair<string, string> _folder = new KeyValuePair<string, string>("Folder", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Folder");
448-
449- private KeyValuePair<string, string> _trash = new KeyValuePair<string, string>("Trash", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Trash");
450+ private NameUri _datacontainer = new NameUri("DataContainer", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#DataContainer");
451+
452+ private NameUri _archive = new NameUri("Archive", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Archive");
453+
454+ private NameUri _folder = new NameUri("Folder", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Folder");
455+
456+ private NameUri _trash = new NameUri("Trash", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Trash");
457
458 private FileSystemType _filesystem = new FileSystemType();
459
460@@ -592,7 +592,7 @@
461 /// <remarks>
462 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Filesystem
463 /// </remarks>
464- public KeyValuePair<string, string> Filesystem
465+ public NameUri Filesystem
466 {
467 get
468 {
469@@ -606,7 +606,7 @@
470 /// <remarks>
471 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Trash
472 /// </remarks>
473- public KeyValuePair<string, string> FilesystemImage
474+ public NameUri FilesystemImage
475 {
476 get
477 {
478@@ -614,22 +614,22 @@
479 }
480 }
481
482- public KeyValuePair<string, string> Search(string interpretation)
483+ public NameUri Search(string interpretation)
484 {
485- if(string.Equals(_file_system_image.Value, interpretation))
486+ if(string.Equals(_file_system_image.Uri, interpretation))
487 return _file_system_image;
488
489- if(string.Equals(_file_system.Value, interpretation))
490+ if(string.Equals(_file_system.Uri, interpretation))
491 return _file_system;
492
493- return new KeyValuePair<string, string>();
494+ return new NameUri();
495 }
496
497 #region Private Fields
498
499- private static KeyValuePair<string, string> _file_system_image = new KeyValuePair<string, string>("FilesystemImage", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FilesystemImage");
500+ private static NameUri _file_system_image = new NameUri("FilesystemImage", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FilesystemImage");
501
502- private static KeyValuePair<string, string> _file_system = new KeyValuePair<string, string>("Filesystem", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Filesystem");
503+ private static NameUri _file_system = new NameUri("Filesystem", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Filesystem");
504
505 #endregion
506 }
507@@ -646,7 +646,7 @@
508 /// <remarks>
509 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Document
510 /// </remarks>
511- public KeyValuePair<string, string> Document
512+ public NameUri Document
513 {
514 get
515 {
516@@ -660,7 +660,7 @@
517 /// <remarks>
518 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#MindMap
519 /// </remarks>
520- public KeyValuePair<string, string> MindMap
521+ public NameUri MindMap
522 {
523 get
524 {
525@@ -674,7 +674,7 @@
526 /// <remarks>
527 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Presentation
528 /// </remarks>
529- public KeyValuePair<string, string> Presentation
530+ public NameUri Presentation
531 {
532 get
533 {
534@@ -688,7 +688,7 @@
535 /// <remarks>
536 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Spreadsheet
537 /// </remarks>
538- public KeyValuePair<string, string> Spreadsheet
539+ public NameUri Spreadsheet
540 {
541 get
542 {
543@@ -710,36 +710,36 @@
544 }
545 }
546
547- public KeyValuePair<string, string> Search(string interpretation)
548+ public NameUri Search(string interpretation)
549 {
550- if(string.Equals(_document.Value, interpretation))
551+ if(string.Equals(_document.Uri, interpretation))
552 return _document;
553
554- if(string.Equals(_mind_map.Value, interpretation))
555+ if(string.Equals(_mind_map.Uri, interpretation))
556 return _mind_map;
557
558- if(string.Equals(_presentation.Value, interpretation))
559+ if(string.Equals(_presentation.Uri, interpretation))
560 return _presentation;
561
562- if(string.Equals(_spreadsheet.Value, interpretation))
563+ if(string.Equals(_spreadsheet.Uri, interpretation))
564 return _spreadsheet;
565
566- KeyValuePair<string, string> textdoc = _text_document.Search(interpretation);
567- if(textdoc.Key != null)
568+ NameUri textdoc = _text_document.Search(interpretation);
569+ if(textdoc.Name != null)
570 return textdoc;
571
572- return new KeyValuePair<string, string>();
573+ return new NameUri();
574 }
575
576 #region Private Fields
577
578- private KeyValuePair<string, string> _document = new KeyValuePair<string, string>("Document", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Document");
579-
580- private KeyValuePair<string, string> _mind_map = new KeyValuePair<string, string>("MindMap", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#MindMap");
581-
582- private KeyValuePair<string, string> _presentation = new KeyValuePair<string, string>("Presentation", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Presentation");
583-
584- private KeyValuePair<string, string> _spreadsheet = new KeyValuePair<string, string>("Spreadsheet", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Spreadsheet");
585+ private NameUri _document = new NameUri("Document", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Document");
586+
587+ private NameUri _mind_map = new NameUri("MindMap", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#MindMap");
588+
589+ private NameUri _presentation = new NameUri("Presentation", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Presentation");
590+
591+ private NameUri _spreadsheet = new NameUri("Spreadsheet", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Spreadsheet");
592
593 private TextDocumentType _text_document = new TextDocumentType();
594
595@@ -754,7 +754,7 @@
596 /// <remarks>
597 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#PaginatedTextDocument
598 /// </remarks>
599- public KeyValuePair<string, string> PaginatedTextDocument
600+ public NameUri PaginatedTextDocument
601 {
602 get
603 {
604@@ -777,21 +777,21 @@
605 }
606 }
607
608- public KeyValuePair<string, string> Search(string interpretation)
609+ public NameUri Search(string interpretation)
610 {
611- if(string.Equals(_paginated_text_document.Value, interpretation))
612+ if(string.Equals(_paginated_text_document.Uri, interpretation))
613 return _paginated_text_document;
614
615- KeyValuePair<string, string> plaintext = _plain_text_document.Search(interpretation);
616- if(plaintext.Key != null)
617+ NameUri plaintext = _plain_text_document.Search(interpretation);
618+ if(plaintext.Name != null)
619 return plaintext;
620
621- return new KeyValuePair<string, string>();
622+ return new NameUri();
623 }
624
625 #region Private Fields
626
627- private KeyValuePair<string, string> _paginated_text_document = new KeyValuePair<string, string>("Spreadsheet", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Spreadsheet");
628+ private NameUri _paginated_text_document = new NameUri("Spreadsheet", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Spreadsheet");
629
630 private PlainTextDocumentType _plain_text_document = new PlainTextDocumentType();
631
632@@ -806,7 +806,7 @@
633 /// <remarks>
634 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#PlainTextDocument
635 /// </remarks>
636- public KeyValuePair<string, string> PlainTextDocument
637+ public NameUri PlainTextDocument
638 {
639 get
640 {
641@@ -820,7 +820,7 @@
642 /// <remarks>
643 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#HtmlDocument
644 /// </remarks>
645- public KeyValuePair<string, string> HtmlDocument
646+ public NameUri HtmlDocument
647 {
648 get
649 {
650@@ -834,7 +834,7 @@
651 /// <remarks>
652 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#SourceCode
653 /// </remarks>
654- public KeyValuePair<string, string> SourceCode
655+ public NameUri SourceCode
656 {
657 get
658 {
659@@ -842,27 +842,27 @@
660 }
661 }
662
663- public KeyValuePair<string, string> Search(string interpretation)
664+ public NameUri Search(string interpretation)
665 {
666- if(string.Equals(_plain_text_document.Value, interpretation))
667+ if(string.Equals(_plain_text_document.Uri, interpretation))
668 return _plain_text_document;
669
670- if(string.Equals(_html_document.Value, interpretation))
671+ if(string.Equals(_html_document.Uri, interpretation))
672 return _html_document;
673
674- if(string.Equals(_source_code.Value, interpretation))
675+ if(string.Equals(_source_code.Uri, interpretation))
676 return _source_code;
677
678- return new KeyValuePair<string, string>();
679+ return new NameUri();
680 }
681
682 #region Private Fields
683
684- private KeyValuePair<string, string> _plain_text_document = new KeyValuePair<string, string>("PlainTextDocument", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#PlainTextDocument");
685-
686- private KeyValuePair<string, string> _html_document = new KeyValuePair<string, string>("HtmlDocument", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#HtmlDocument");
687-
688- private KeyValuePair<string, string> _source_code = new KeyValuePair<string, string>("SourceCode", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#SourceCode");
689+ private NameUri _plain_text_document = new NameUri("PlainTextDocument", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#PlainTextDocument");
690+
691+ private NameUri _html_document = new NameUri("HtmlDocument", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#HtmlDocument");
692+
693+ private NameUri _source_code = new NameUri("SourceCode", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#SourceCode");
694
695 #endregion
696 }
697@@ -879,7 +879,7 @@
698 /// <remarks>
699 /// http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#EventInterpretation
700 /// </remarks>
701- public KeyValuePair<string, string> EventInterpretation
702+ public NameUri EventInterpretation
703 {
704 get
705 {
706@@ -893,7 +893,7 @@
707 /// <remarks>
708 /// http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#AccessEvent
709 /// </remarks>
710- public KeyValuePair<string, string> AccessEvent
711+ public NameUri AccessEvent
712 {
713 get
714 {
715@@ -907,7 +907,7 @@
716 /// <remarks>
717 /// http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#CreateEvent
718 /// </remarks>
719- public KeyValuePair<string, string> CreateEvent
720+ public NameUri CreateEvent
721 {
722 get
723 {
724@@ -921,7 +921,7 @@
725 /// <remarks>
726 /// http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#DeleteEvent
727 /// </remarks>
728- public KeyValuePair<string, string> DeleteEvent
729+ public NameUri DeleteEvent
730 {
731 get
732 {
733@@ -935,7 +935,7 @@
734 /// <remarks>
735 /// http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#LeaveEvent
736 /// </remarks>
737- public KeyValuePair<string, string> LeaveEvent
738+ public NameUri LeaveEvent
739 {
740 get
741 {
742@@ -949,7 +949,7 @@
743 /// <remarks>
744 /// http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#ModifyEvent
745 /// </remarks>
746- public KeyValuePair<string, string> ModifyEvent
747+ public NameUri ModifyEvent
748 {
749 get
750 {
751@@ -963,7 +963,7 @@
752 /// <remarks>
753 /// http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#ReceiveEvent
754 /// </remarks>
755- public KeyValuePair<string, string> ReceiveEvent
756+ public NameUri ReceiveEvent
757 {
758 get
759 {
760@@ -977,7 +977,7 @@
761 /// <remarks>
762 /// http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#SendEvent
763 /// </remarks>
764- public KeyValuePair<string, string> SendEvent
765+ public NameUri SendEvent
766 {
767 get
768 {
769@@ -985,53 +985,53 @@
770 }
771 }
772
773- public KeyValuePair<string, string> Search(string interpretation)
774+ public NameUri Search(string interpretation)
775 {
776- if(string.Equals(_event_interpretation.Value, interpretation))
777+ if(string.Equals(_event_interpretation.Uri, interpretation))
778 return _event_interpretation;
779
780- if(string.Equals(_access_event.Value, interpretation))
781+ if(string.Equals(_access_event.Uri, interpretation))
782 return _access_event;
783
784- if(string.Equals(_create_event.Value, interpretation))
785+ if(string.Equals(_create_event.Uri, interpretation))
786 return _create_event;
787
788- if(string.Equals(_delete_event.Value, interpretation))
789+ if(string.Equals(_delete_event.Uri, interpretation))
790 return _delete_event;
791
792- if(string.Equals(_leave_event.Value, interpretation))
793+ if(string.Equals(_leave_event.Uri, interpretation))
794 return _leave_event;
795
796- if(string.Equals(_modify_event.Value, interpretation))
797+ if(string.Equals(_modify_event.Uri, interpretation))
798 return _modify_event;
799
800- if(string.Equals(_receive_event.Value, interpretation))
801+ if(string.Equals(_receive_event.Uri, interpretation))
802 return _receive_event;
803
804- if(string.Equals(_send_event.Value, interpretation))
805+ if(string.Equals(_send_event.Uri, interpretation))
806 return _send_event;
807
808
809- return new KeyValuePair<string, string>();
810+ return new NameUri();
811 }
812
813 #region Private Fields
814
815- private KeyValuePair<string, string> _event_interpretation = new KeyValuePair<string, string>("EventInterpretation", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#EventInterpretation");
816-
817- private KeyValuePair<string, string> _access_event = new KeyValuePair<string, string>("AccessEvent", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#AccessEvent");
818-
819- private KeyValuePair<string, string> _create_event = new KeyValuePair<string, string>("CreateEvent", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#CreateEvent");
820-
821- private KeyValuePair<string, string> _delete_event = new KeyValuePair<string, string>("DeleteEvent", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#DeleteEvent");
822-
823- private KeyValuePair<string, string> _leave_event = new KeyValuePair<string, string>("LeaveEvent", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#LeaveEvent");
824-
825- private KeyValuePair<string, string> _modify_event = new KeyValuePair<string, string>("ModifyEvent", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#ModifyEvent");
826-
827- private KeyValuePair<string, string> _receive_event = new KeyValuePair<string, string>("ReceiveEvent", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#ReceiveEvent");
828-
829- private KeyValuePair<string, string> _send_event = new KeyValuePair<string, string>("SendEvent", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#SendEvent");
830+ private NameUri _event_interpretation = new NameUri("EventInterpretation", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#EventInterpretation");
831+
832+ private NameUri _access_event = new NameUri("AccessEvent", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#AccessEvent");
833+
834+ private NameUri _create_event = new NameUri("CreateEvent", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#CreateEvent");
835+
836+ private NameUri _delete_event = new NameUri("DeleteEvent", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#DeleteEvent");
837+
838+ private NameUri _leave_event = new NameUri("LeaveEvent", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#LeaveEvent");
839+
840+ private NameUri _modify_event = new NameUri("ModifyEvent", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#ModifyEvent");
841+
842+ private NameUri _receive_event = new NameUri("ReceiveEvent", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#ReceiveEvent");
843+
844+ private NameUri _send_event = new NameUri("SendEvent", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#SendEvent");
845
846 #endregion
847 }
848@@ -1048,7 +1048,7 @@
849 /// <remarks>
850 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Media
851 /// </remarks>
852- public KeyValuePair<string, string> Media
853+ public NameUri Media
854 {
855 get
856 {
857@@ -1062,7 +1062,7 @@
858 /// <remarks>
859 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Audio
860 /// </remarks>
861- public KeyValuePair<string, string> Audio
862+ public NameUri Audio
863 {
864 get
865 {
866@@ -1076,7 +1076,7 @@
867 /// <remarks>
868 /// http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#MusicPiece
869 /// </remarks>
870- public KeyValuePair<string, string> MusicPiece
871+ public NameUri MusicPiece
872 {
873 get
874 {
875@@ -1098,31 +1098,31 @@
876 }
877 }
878
879- public KeyValuePair<string, string> Search(string interpretation)
880+ public NameUri Search(string interpretation)
881 {
882- if(string.Equals(_media.Value, interpretation))
883+ if(string.Equals(_media.Uri, interpretation))
884 return _media;
885
886- if(string.Equals(_audio.Value, interpretation))
887+ if(string.Equals(_audio.Uri, interpretation))
888 return _audio;
889
890- if(string.Equals(_music_piece.Value, interpretation))
891+ if(string.Equals(_music_piece.Uri, interpretation))
892 return _music_piece;
893
894- KeyValuePair<string, string> visual = _visual_type.Search(interpretation);
895- if(visual.Key != null)
896+ NameUri visual = _visual_type.Search(interpretation);
897+ if(visual.Name != null)
898 return visual;
899
900- return new KeyValuePair<string, string>();
901+ return new NameUri();
902 }
903
904 #region Private Fields
905
906- private KeyValuePair<string, string> _media = new KeyValuePair<string, string>("Media", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Media");
907-
908- private KeyValuePair<string, string> _audio = new KeyValuePair<string, string>("Audio", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Audio");
909-
910- private KeyValuePair<string, string> _music_piece = new KeyValuePair<string, string>("MusicPiece", "http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#MusicPiece");
911+ private NameUri _media = new NameUri("Media", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Media");
912+
913+ private NameUri _audio = new NameUri("Audio", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Audio");
914+
915+ private NameUri _music_piece = new NameUri("MusicPiece", "http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#MusicPiece");
916
917 private VisualType _visual_type = new VisualType();
918
919@@ -1137,7 +1137,7 @@
920 /// <remarks>
921 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Visual
922 /// </remarks>
923- public KeyValuePair<string, string> Visual
924+ public NameUri Visual
925 {
926 get
927 {
928@@ -1173,25 +1173,25 @@
929 }
930 }
931
932- public KeyValuePair<string, string> Search(string interpretation)
933+ public NameUri Search(string interpretation)
934 {
935- if(string.Equals(_visual.Value, interpretation))
936+ if(string.Equals(_visual.Uri, interpretation))
937 return _visual;
938
939- KeyValuePair<string, string> image = _image.Search(interpretation);
940- if(image.Key != null)
941+ NameUri image = _image.Search(interpretation);
942+ if(image.Name != null)
943 return image;
944
945- KeyValuePair<string, string> video = _video.Search(interpretation);
946- if(video.Key != null)
947+ NameUri video = _video.Search(interpretation);
948+ if(video.Name != null)
949 return video;
950
951- return new KeyValuePair<string, string>();
952+ return new NameUri();
953 }
954
955 #region Private Fields
956
957- private KeyValuePair<string, string> _visual = new KeyValuePair<string, string>("Visual", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Visual");
958+ private NameUri _visual = new NameUri("Visual", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Visual");
959
960 private ImageType _image = new ImageType();
961
962@@ -1208,7 +1208,7 @@
963 /// <remarks>
964 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Image
965 /// </remarks>
966- public KeyValuePair<string, string> Image
967+ public NameUri Image
968 {
969 get
970 {
971@@ -1222,7 +1222,7 @@
972 /// <remarks>
973 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Icon
974 /// </remarks>
975- public KeyValuePair<string, string> Icon
976+ public NameUri Icon
977 {
978 get
979 {
980@@ -1250,7 +1250,7 @@
981 /// <remarks>
982 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#VectorImage
983 /// </remarks>
984- public KeyValuePair<string, string> VectorImage
985+ public NameUri VectorImage
986 {
987 get
988 {
989@@ -1258,33 +1258,33 @@
990 }
991 }
992
993- public KeyValuePair<string, string> Search(string interpretation)
994+ public NameUri Search(string interpretation)
995 {
996- if(string.Equals(_image.Value, interpretation))
997+ if(string.Equals(_image.Uri, interpretation))
998 return _image;
999
1000- if(string.Equals(_icon.Value, interpretation))
1001+ if(string.Equals(_icon.Uri, interpretation))
1002 return _icon;
1003
1004- KeyValuePair<string, string> rast = _raster_image.Search(interpretation);
1005- if(rast.Key != null)
1006+ NameUri rast = _raster_image.Search(interpretation);
1007+ if(rast.Name != null)
1008 return rast;
1009
1010- if(string.Equals(_vector_image.Value, interpretation))
1011+ if(string.Equals(_vector_image.Uri, interpretation))
1012 return _vector_image;
1013
1014- return new KeyValuePair<string, string>();
1015+ return new NameUri();
1016 }
1017
1018 #region Private Fields
1019
1020- private KeyValuePair<string, string> _image = new KeyValuePair<string, string>("Image", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Image");
1021+ private NameUri _image = new NameUri("Image", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Image");
1022
1023- private KeyValuePair<string, string> _icon = new KeyValuePair<string, string>("Icon", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Icon");
1024+ private NameUri _icon = new NameUri("Icon", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Icon");
1025
1026 private RasterImageType _raster_image = new RasterImageType();
1027
1028- private KeyValuePair<string, string> _vector_image = new KeyValuePair<string, string>("VectorImage", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#VectorImage");
1029+ private NameUri _vector_image = new NameUri("VectorImage", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#VectorImage");
1030
1031
1032 #endregion
1033@@ -1298,7 +1298,7 @@
1034 /// <remarks>
1035 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#RasterImage
1036 /// </remarks>
1037- public KeyValuePair<string, string> RasterImage
1038+ public NameUri RasterImage
1039 {
1040 get
1041 {
1042@@ -1312,7 +1312,7 @@
1043 /// <remarks>
1044 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Cursor
1045 /// </remarks>
1046- public KeyValuePair<string, string> Cursor
1047+ public NameUri Cursor
1048 {
1049 get
1050 {
1051@@ -1320,22 +1320,22 @@
1052 }
1053 }
1054
1055- public KeyValuePair<string, string> Search(string interpretation)
1056+ public NameUri Search(string interpretation)
1057 {
1058- if(string.Equals(_raster_image.Value, interpretation))
1059+ if(string.Equals(_raster_image.Uri, interpretation))
1060 return _raster_image;
1061
1062- if(string.Equals(_cursor.Value, interpretation))
1063+ if(string.Equals(_cursor.Uri, interpretation))
1064 return _cursor;
1065
1066- return new KeyValuePair<string, string>();
1067+ return new NameUri();
1068 }
1069
1070 #region Private Fields
1071
1072- private KeyValuePair<string, string> _raster_image = new KeyValuePair<string, string>("RasterImage", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#RasterImage");
1073+ private NameUri _raster_image = new NameUri("RasterImage", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#RasterImage");
1074
1075- private KeyValuePair<string, string> _cursor = new KeyValuePair<string, string>("Cursor", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Cursor");
1076+ private NameUri _cursor = new NameUri("Cursor", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Cursor");
1077
1078 #endregion
1079 }
1080@@ -1348,7 +1348,7 @@
1081 /// <remarks>
1082 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Video
1083 /// </remarks>
1084- public KeyValuePair<string, string> Video
1085+ public NameUri Video
1086 {
1087 get
1088 {
1089@@ -1362,7 +1362,7 @@
1090 /// <remarks>
1091 /// http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#Movie
1092 /// </remarks>
1093- public KeyValuePair<string, string> Movie
1094+ public NameUri Movie
1095 {
1096 get
1097 {
1098@@ -1376,7 +1376,7 @@
1099 /// <remarks>
1100 /// http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#TVShow
1101 /// </remarks>
1102- public KeyValuePair<string, string> TVShow
1103+ public NameUri TVShow
1104 {
1105 get
1106 {
1107@@ -1384,27 +1384,27 @@
1108 }
1109 }
1110
1111- public KeyValuePair<string, string> Search(string interpretation)
1112+ public NameUri Search(string interpretation)
1113 {
1114- if(string.Equals(_video.Value, interpretation))
1115+ if(string.Equals(_video.Uri, interpretation))
1116 return _video;
1117
1118- if(string.Equals(_movie.Value, interpretation))
1119+ if(string.Equals(_movie.Uri, interpretation))
1120 return _movie;
1121
1122- if(string.Equals(_tv_show.Value, interpretation))
1123+ if(string.Equals(_tv_show.Uri, interpretation))
1124 return _tv_show;
1125
1126- return new KeyValuePair<string, string>();
1127+ return new NameUri();
1128 }
1129
1130 #region Private Fields
1131
1132- private KeyValuePair<string, string> _video = new KeyValuePair<string, string>("Video", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Video");
1133-
1134- private KeyValuePair<string, string> _movie = new KeyValuePair<string, string>("Movie", "http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#Movie");
1135-
1136- private KeyValuePair<string, string> _tv_show = new KeyValuePair<string, string>("TVShow", "http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#TVShow");
1137+ private NameUri _video = new NameUri("Video", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Video");
1138+
1139+ private NameUri _movie = new NameUri("Movie", "http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#Movie");
1140+
1141+ private NameUri _tv_show = new NameUri("TVShow", "http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#TVShow");
1142
1143 #endregion
1144 }
1145@@ -1421,7 +1421,7 @@
1146 /// <remarks>
1147 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#MediaList
1148 /// </remarks>
1149- public KeyValuePair<string, string> MediaList
1150+ public NameUri MediaList
1151 {
1152 get
1153 {
1154@@ -1435,7 +1435,7 @@
1155 /// <remarks>
1156 /// http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#MusicAlbum
1157 /// </remarks>
1158- public KeyValuePair<string, string> MusicAlbum
1159+ public NameUri MusicAlbum
1160 {
1161 get
1162 {
1163@@ -1443,22 +1443,22 @@
1164 }
1165 }
1166
1167- public KeyValuePair<string, string> Search(string interpretation)
1168+ public NameUri Search(string interpretation)
1169 {
1170- if(string.Equals(_media_list.Value, interpretation))
1171+ if(string.Equals(_media_list.Uri, interpretation))
1172 return _media_list;
1173
1174- if(string.Equals(_music_album.Value, interpretation))
1175+ if(string.Equals(_music_album.Uri, interpretation))
1176 return _music_album;
1177
1178- return new KeyValuePair<string, string>();
1179+ return new NameUri();
1180 }
1181
1182 #region Private Fields
1183
1184- private KeyValuePair<string, string> _media_list = new KeyValuePair<string, string>("MediaList", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#MediaList");
1185+ private NameUri _media_list = new NameUri("MediaList", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#MediaList");
1186
1187- private KeyValuePair<string, string> _music_album = new KeyValuePair<string, string>("MusicAlbum", "http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#MusicAlbum");
1188+ private NameUri _music_album = new NameUri("MusicAlbum", "http://www.semanticdesktop.org/ontologies/2009/02/19/nmm#MusicAlbum");
1189
1190 #endregion
1191 }
1192@@ -1475,7 +1475,7 @@
1193 /// <remarks>
1194 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Message
1195 /// </remarks>
1196- public KeyValuePair<string, string> Message
1197+ public NameUri Message
1198 {
1199 get
1200 {
1201@@ -1489,7 +1489,7 @@
1202 /// <remarks>
1203 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Email
1204 /// </remarks>
1205- public KeyValuePair<string, string> Email
1206+ public NameUri Email
1207 {
1208 get
1209 {
1210@@ -1503,7 +1503,7 @@
1211 /// <remarks>
1212 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#IMMessage
1213 /// </remarks>
1214- public KeyValuePair<string, string> IMMessage
1215+ public NameUri IMMessage
1216 {
1217 get
1218 {
1219@@ -1511,27 +1511,27 @@
1220 }
1221 }
1222
1223- public KeyValuePair<string, string> Search(string interpretation)
1224+ public NameUri Search(string interpretation)
1225 {
1226- if(string.Equals(_message.Value, interpretation))
1227+ if(string.Equals(_message.Uri, interpretation))
1228 return _message;
1229
1230- if(string.Equals(_email.Value, interpretation))
1231+ if(string.Equals(_email.Uri, interpretation))
1232 return _email;
1233
1234- if(string.Equals(_im_message.Value, interpretation))
1235+ if(string.Equals(_im_message.Uri, interpretation))
1236 return _im_message;
1237
1238- return new KeyValuePair<string, string>();
1239+ return new NameUri();
1240 }
1241
1242 #region Private Fields
1243
1244- private KeyValuePair<string, string> _message = new KeyValuePair<string, string>("Message", "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Message");
1245-
1246- private KeyValuePair<string, string> _email = new KeyValuePair<string, string>("Email", "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Email");
1247-
1248- private KeyValuePair<string, string> _im_message = new KeyValuePair<string, string>("IMMessage", "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#IMMessage");
1249+ private NameUri _message = new NameUri("Message", "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Message");
1250+
1251+ private NameUri _email = new NameUri("Email", "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#Email");
1252+
1253+ private NameUri _im_message = new NameUri("IMMessage", "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#IMMessage");
1254
1255 #endregion
1256 }
1257@@ -1548,7 +1548,7 @@
1258 /// <remarks>
1259 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Software
1260 /// </remarks>
1261- public KeyValuePair<string, string> Software
1262+ public NameUri Software
1263 {
1264 get
1265 {
1266@@ -1562,7 +1562,7 @@
1267 /// <remarks>
1268 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Application
1269 /// </remarks>
1270- public KeyValuePair<string, string> Application
1271+ public NameUri Application
1272 {
1273 get
1274 {
1275@@ -1576,7 +1576,7 @@
1276 /// <remarks>
1277 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#OperatingSystem
1278 /// </remarks>
1279- public KeyValuePair<string, string> OperatingSystem
1280+ public NameUri OperatingSystem
1281 {
1282 get
1283 {
1284@@ -1584,27 +1584,27 @@
1285 }
1286 }
1287
1288- public KeyValuePair<string, string> Search(string interpretation)
1289+ public NameUri Search(string interpretation)
1290 {
1291- if(string.Equals(_software.Value, interpretation))
1292+ if(string.Equals(_software.Uri, interpretation))
1293 return _software;
1294
1295- if(string.Equals(_application.Value, interpretation))
1296+ if(string.Equals(_application.Uri, interpretation))
1297 return _application;
1298
1299- if(string.Equals(_os.Value, interpretation))
1300+ if(string.Equals(_os.Uri, interpretation))
1301 return _os;
1302
1303- return new KeyValuePair<string, string>();
1304+ return new NameUri();
1305 }
1306
1307 #region Private Fields
1308
1309- private KeyValuePair<string, string> _software = new KeyValuePair<string, string>("Software", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Software");
1310-
1311- private KeyValuePair<string, string> _application = new KeyValuePair<string, string>("Application", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Application");
1312-
1313- private KeyValuePair<string, string> _os = new KeyValuePair<string, string>("OperatingSystem", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#OperatingSystem");
1314+ private NameUri _software = new NameUri("Software", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Software");
1315+
1316+ private NameUri _application = new NameUri("Application", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Application");
1317+
1318+ private NameUri _os = new NameUri("OperatingSystem", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#OperatingSystem");
1319
1320 #endregion
1321 }
1322
1323=== modified file 'Zeitgeist/Datamodel/Manifestation.cs'
1324--- Zeitgeist/Datamodel/Manifestation.cs 2010-09-18 10:18:13 +0000
1325+++ Zeitgeist/Datamodel/Manifestation.cs 2010-10-02 05:56:43 +0000
1326@@ -31,7 +31,7 @@
1327 /// <remarks>
1328 /// http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#CalendarDataObject
1329 /// </remarks>
1330- public KeyValuePair<string, string> CalendarDataObject
1331+ public NameUri CalendarDataObject
1332 {
1333 get
1334 {
1335@@ -73,7 +73,7 @@
1336 /// <remarks>
1337 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#HardDiskPartition
1338 /// </remarks>
1339- public KeyValuePair<string, string> HardDiskPartition
1340+ public NameUri HardDiskPartition
1341 {
1342 get
1343 {
1344@@ -87,7 +87,7 @@
1345 /// <remarks>
1346 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#MailboxDataObject
1347 /// </remarks>
1348- public KeyValuePair<string, string> MailboxDataObject
1349+ public NameUri MailboxDataObject
1350 {
1351 get
1352 {
1353@@ -101,7 +101,7 @@
1354 /// <remarks>
1355 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#MediaStream
1356 /// </remarks>
1357- public KeyValuePair<string, string> MediaStream
1358+ public NameUri MediaStream
1359 {
1360 get
1361 {
1362@@ -115,7 +115,7 @@
1363 /// <remarks>
1364 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#RemotePortAddress
1365 /// </remarks>
1366- public KeyValuePair<string, string> RemotePortAddress
1367+ public NameUri RemotePortAddress
1368 {
1369 get
1370 {
1371@@ -129,7 +129,7 @@
1372 /// <remarks>
1373 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#SoftwareItem
1374 /// </remarks>
1375- public KeyValuePair<string, string> SoftwareItem
1376+ public NameUri SoftwareItem
1377 {
1378 get
1379 {
1380@@ -143,7 +143,7 @@
1381 /// <remarks>
1382 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#SoftwareService
1383 /// </remarks>
1384- public KeyValuePair<string, string> SoftwareService
1385+ public NameUri SoftwareService
1386 {
1387 get
1388 {
1389@@ -151,61 +151,61 @@
1390 }
1391 }
1392
1393- public KeyValuePair<string, string> Search(string manifestation)
1394+ public NameUri Search(string manifestation)
1395 {
1396- if(string.Equals(_cal_data_obj.Value, manifestation))
1397+ if(string.Equals(_cal_data_obj.Uri, manifestation))
1398 return _cal_data_obj;
1399
1400- KeyValuePair<string, string> event_manifestation = _event_manifestation.Search(manifestation);
1401- if(event_manifestation.Key != null)
1402+ NameUri event_manifestation = _event_manifestation.Search(manifestation);
1403+ if(event_manifestation.Name != null)
1404 return event_manifestation;
1405
1406- KeyValuePair<string, string> file_data_obj = _file_data_obj.Search(manifestation);
1407- if(file_data_obj.Key != null)
1408+ NameUri file_data_obj = _file_data_obj.Search(manifestation);
1409+ if(file_data_obj.Name != null)
1410 return file_data_obj;
1411
1412- if(string.Equals(_hd_partition.Value, manifestation))
1413+ if(string.Equals(_hd_partition.Uri, manifestation))
1414 return _hd_partition;
1415
1416- if(string.Equals(_mailbox_data_obj.Value, manifestation))
1417+ if(string.Equals(_mailbox_data_obj.Uri, manifestation))
1418 return _mailbox_data_obj;
1419
1420- if(string.Equals(_media_stream.Value, manifestation))
1421+ if(string.Equals(_media_stream.Uri, manifestation))
1422 return _media_stream;
1423
1424- if(string.Equals(_remote_port_addr.Value, manifestation))
1425+ if(string.Equals(_remote_port_addr.Uri, manifestation))
1426 return _remote_port_addr;
1427
1428- if(string.Equals(_sw_item.Value, manifestation))
1429+ if(string.Equals(_sw_item.Uri, manifestation))
1430 return _sw_item;
1431
1432- if(string.Equals(_sw_service.Value, manifestation))
1433+ if(string.Equals(_sw_service.Uri, manifestation))
1434 return _sw_service;
1435
1436- return new KeyValuePair<string, string>();
1437+ return new NameUri();
1438 }
1439
1440 #region Private Fields
1441
1442 private static Manifestation _singleton_obj = new Manifestation();
1443
1444- private KeyValuePair<string, string> _cal_data_obj = new KeyValuePair<string, string>("CalendarDataObject", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#CalendarDataObject");
1445+ private NameUri _cal_data_obj = new NameUri("CalendarDataObject", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#CalendarDataObject");
1446
1447 private EventManifestationType _event_manifestation = new EventManifestationType();
1448
1449 private FileDataObjectType _file_data_obj = new FileDataObjectType();
1450
1451- private KeyValuePair<string, string> _hd_partition = new KeyValuePair<string, string>("HardDiskPartition", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#HardDiskPartition");
1452-
1453- private KeyValuePair<string, string> _mailbox_data_obj = new KeyValuePair<string, string>("MailboxDataObject", "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#MailboxDataObject");
1454-
1455- private KeyValuePair<string, string> _media_stream = new KeyValuePair<string, string>("MediaStream", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#MediaStream");
1456-
1457- private KeyValuePair<string, string> _remote_port_addr = new KeyValuePair<string, string>("RemotePortAddress", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#RemotePortAddress");
1458-
1459- private KeyValuePair<string, string> _sw_item = new KeyValuePair<string, string>("SoftwareItem", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#SoftwareItem");
1460-
1461- private KeyValuePair<string, string> _sw_service = new KeyValuePair<string, string>("SoftwareService", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#SoftwareService");
1462+ private NameUri _hd_partition = new NameUri("HardDiskPartition", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#HardDiskPartition");
1463+
1464+ private NameUri _mailbox_data_obj = new NameUri("MailboxDataObject", "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#MailboxDataObject");
1465+
1466+ private NameUri _media_stream = new NameUri("MediaStream", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#MediaStream");
1467+
1468+ private NameUri _remote_port_addr = new NameUri("RemotePortAddress", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#RemotePortAddress");
1469+
1470+ private NameUri _sw_item = new NameUri("SoftwareItem", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#SoftwareItem");
1471+
1472+ private NameUri _sw_service = new NameUri("SoftwareService", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#SoftwareService");
1473
1474 #endregion
1475 }
1476@@ -218,7 +218,7 @@
1477 /// <remarks>
1478 /// http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#EventManifestation
1479 /// </remarks>
1480- public KeyValuePair<string, string> EventManifestation
1481+ public NameUri EventManifestation
1482 {
1483 get
1484 {
1485@@ -232,7 +232,7 @@
1486 /// <remarks>
1487 /// http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#HeuristicActivity
1488 /// </remarks>
1489- public KeyValuePair<string, string> HeuristicActivity
1490+ public NameUri HeuristicActivity
1491 {
1492 get
1493 {
1494@@ -246,7 +246,7 @@
1495 /// <remarks>
1496 /// http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#ScheduledActivity
1497 /// </remarks>
1498- public KeyValuePair<string, string> ScheduledActivity
1499+ public NameUri ScheduledActivity
1500 {
1501 get
1502 {
1503@@ -260,7 +260,7 @@
1504 /// <remarks>
1505 /// http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#SystemNotification
1506 /// </remarks>
1507- public KeyValuePair<string, string> SystemNotification
1508+ public NameUri SystemNotification
1509 {
1510 get
1511 {
1512@@ -274,7 +274,7 @@
1513 /// <remarks>
1514 /// http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#UserActivity
1515 /// </remarks>
1516- public KeyValuePair<string, string> UserActivity
1517+ public NameUri UserActivity
1518 {
1519 get
1520 {
1521@@ -288,7 +288,7 @@
1522 /// <remarks>
1523 /// http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#WorldActivity
1524 /// </remarks>
1525- public KeyValuePair<string, string> WorldActivity
1526+ public NameUri WorldActivity
1527 {
1528 get
1529 {
1530@@ -296,42 +296,42 @@
1531 }
1532 }
1533
1534- public KeyValuePair<string, string> Search(string manifestation)
1535+ public NameUri Search(string manifestation)
1536 {
1537- if(string.Equals(_evnt_manifest.Value, manifestation))
1538+ if(string.Equals(_evnt_manifest.Uri, manifestation))
1539 return _evnt_manifest;
1540
1541- if(string.Equals(_heur_activity.Value, manifestation))
1542+ if(string.Equals(_heur_activity.Uri, manifestation))
1543 return _heur_activity;
1544
1545- if(string.Equals(_schld_activity.Value, manifestation))
1546+ if(string.Equals(_schld_activity.Uri, manifestation))
1547 return _schld_activity;
1548
1549- if(string.Equals(_sys_notification.Value, manifestation))
1550+ if(string.Equals(_sys_notification.Uri, manifestation))
1551 return _sys_notification;
1552
1553- if(string.Equals(_user_activity.Value, manifestation))
1554+ if(string.Equals(_user_activity.Uri, manifestation))
1555 return _user_activity;
1556
1557- if(string.Equals(_world_activity.Value, manifestation))
1558+ if(string.Equals(_world_activity.Uri, manifestation))
1559 return _world_activity;
1560
1561- return new KeyValuePair<string, string>();
1562+ return new NameUri();
1563 }
1564
1565 #region Private Fields
1566
1567- private KeyValuePair<string, string> _evnt_manifest = new KeyValuePair<string, string>("EventManifestation", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#EventManifestation");
1568-
1569- private KeyValuePair<string, string> _heur_activity = new KeyValuePair<string, string>("HeuristicActivity", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#HeuristicActivity");
1570-
1571- private KeyValuePair<string, string> _schld_activity = new KeyValuePair<string, string>("ScheduledActivity", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#ScheduledActivity");
1572-
1573- private KeyValuePair<string, string> _sys_notification = new KeyValuePair<string, string>("SystemNotification", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#SystemNotification");
1574-
1575- private KeyValuePair<string, string> _user_activity = new KeyValuePair<string, string>("UserActivity", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#UserActivity");
1576-
1577- private KeyValuePair<string, string> _world_activity = new KeyValuePair<string, string>("WorldActivity", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#WorldActivity");
1578+ private NameUri _evnt_manifest = new NameUri("EventManifestation", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#EventManifestation");
1579+
1580+ private NameUri _heur_activity = new NameUri("HeuristicActivity", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#HeuristicActivity");
1581+
1582+ private NameUri _schld_activity = new NameUri("ScheduledActivity", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#ScheduledActivity");
1583+
1584+ private NameUri _sys_notification = new NameUri("SystemNotification", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#SystemNotification");
1585+
1586+ private NameUri _user_activity = new NameUri("UserActivity", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#UserActivity");
1587+
1588+ private NameUri _world_activity = new NameUri("WorldActivity", "http://www.zeitgeist-project.com/ontologies/2010/01/27/zg#WorldActivity");
1589
1590 #endregion
1591 }
1592@@ -344,7 +344,7 @@
1593 /// <remarks>
1594 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject
1595 /// </remarks>
1596- public KeyValuePair<string, string> FileDataObject
1597+ public NameUri FileDataObject
1598 {
1599 get
1600 {
1601@@ -358,7 +358,7 @@
1602 /// <remarks>
1603 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#DeletedResource
1604 /// </remarks>
1605- public KeyValuePair<string, string> DeletedResource
1606+ public NameUri DeletedResource
1607 {
1608 get
1609 {
1610@@ -386,7 +386,7 @@
1611 /// <remarks>
1612 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#RemoteDataObject
1613 /// </remarks>
1614- public KeyValuePair<string, string> RemoteDataObject
1615+ public NameUri RemoteDataObject
1616 {
1617 get
1618 {
1619@@ -394,33 +394,33 @@
1620 }
1621 }
1622
1623- public KeyValuePair<string, string> Search(string manifestation)
1624+ public NameUri Search(string manifestation)
1625 {
1626- if(string.Equals(_file_data_obj.Value, manifestation))
1627+ if(string.Equals(_file_data_obj.Uri, manifestation))
1628 return _file_data_obj;
1629
1630- if(string.Equals(_deleted_resc.Value, manifestation))
1631+ if(string.Equals(_deleted_resc.Uri, manifestation))
1632 return _deleted_resc;
1633
1634- KeyValuePair<string, string> embedded_file_data_obj = _embedded_file_data_obj.Search(manifestation);
1635- if(embedded_file_data_obj.Key != null)
1636+ NameUri embedded_file_data_obj = _embedded_file_data_obj.Search(manifestation);
1637+ if(embedded_file_data_obj.Name != null)
1638 return embedded_file_data_obj;
1639
1640- if(string.Equals(_remote_data_obj.Value, manifestation))
1641+ if(string.Equals(_remote_data_obj.Uri, manifestation))
1642 return _remote_data_obj;
1643
1644- return new KeyValuePair<string, string>();
1645+ return new NameUri();
1646 }
1647
1648 #region Private Fields
1649
1650- private KeyValuePair<string, string> _file_data_obj = new KeyValuePair<string, string>("FileDataObject", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject");
1651+ private NameUri _file_data_obj = new NameUri("FileDataObject", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject");
1652
1653- private KeyValuePair<string, string> _deleted_resc = new KeyValuePair<string, string>("DeletedResource", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#DeletedResource");
1654+ private NameUri _deleted_resc = new NameUri("DeletedResource", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#DeletedResource");
1655
1656 private EmbeddedFileDataObjectType _embedded_file_data_obj = new EmbeddedFileDataObjectType();
1657
1658- private KeyValuePair<string, string> _remote_data_obj = new KeyValuePair<string, string>("RemoteDataObject", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#RemoteDataObject");
1659+ private NameUri _remote_data_obj = new NameUri("RemoteDataObject", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#RemoteDataObject");
1660
1661 #endregion
1662 }
1663@@ -433,7 +433,7 @@
1664 /// <remarks>
1665 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#EmbeddedFileDataObject
1666 /// </remarks>
1667- public KeyValuePair<string, string> EmbeddedFileDataObject
1668+ public NameUri EmbeddedFileDataObject
1669 {
1670 get
1671 {
1672@@ -447,7 +447,7 @@
1673 /// <remarks>
1674 /// http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#ArchiveItem
1675 /// </remarks>
1676- public KeyValuePair<string, string> ArchiveItem
1677+ public NameUri ArchiveItem
1678 {
1679 get
1680 {
1681@@ -461,7 +461,7 @@
1682 /// <remarks>
1683 /// http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Attachment
1684 /// </remarks>
1685- public KeyValuePair<string, string> Attachment
1686+ public NameUri Attachment
1687 {
1688 get
1689 {
1690@@ -469,27 +469,27 @@
1691 }
1692 }
1693
1694- public KeyValuePair<string, string> Search(string manifestation)
1695+ public NameUri Search(string manifestation)
1696 {
1697- if(string.Equals(_embedded_file_data_obj.Value, manifestation))
1698+ if(string.Equals(_embedded_file_data_obj.Uri, manifestation))
1699 return _embedded_file_data_obj;
1700
1701- if(string.Equals(_archive_item.Value, manifestation))
1702+ if(string.Equals(_archive_item.Uri, manifestation))
1703 return _archive_item;
1704
1705- if(string.Equals(_attachment.Value, manifestation))
1706+ if(string.Equals(_attachment.Uri, manifestation))
1707 return _attachment;
1708
1709- return new KeyValuePair<string, string>();
1710+ return new NameUri();
1711 }
1712
1713 #region Private Fields
1714
1715- private KeyValuePair<string, string> _embedded_file_data_obj = new KeyValuePair<string, string>("EmbeddedFileDataObject", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#EmbeddedFileDataObject");
1716-
1717- private KeyValuePair<string, string> _archive_item = new KeyValuePair<string, string>("ArchiveItem", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#ArchiveItem");
1718-
1719- private KeyValuePair<string, string> _attachment = new KeyValuePair<string, string>("Attachment", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Attachment");
1720+ private NameUri _embedded_file_data_obj = new NameUri("EmbeddedFileDataObject", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#EmbeddedFileDataObject");
1721+
1722+ private NameUri _archive_item = new NameUri("ArchiveItem", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#ArchiveItem");
1723+
1724+ private NameUri _attachment = new NameUri("Attachment", "http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#Attachment");
1725
1726 #endregion
1727 }
1728
1729=== added file 'Zeitgeist/Datamodel/NameUri.cs'
1730--- Zeitgeist/Datamodel/NameUri.cs 1970-01-01 00:00:00 +0000
1731+++ Zeitgeist/Datamodel/NameUri.cs 2010-10-02 05:56:43 +0000
1732@@ -0,0 +1,34 @@
1733+using System;
1734+using org.freedesktop;
1735+using org.freedesktop.DBus;
1736+using System.Collections.Generic;
1737+
1738+namespace Zeitgeist.Datamodel
1739+{
1740+ /// <summary>
1741+ /// The type which holds a pair of values. The pair is Name and Uri
1742+ /// </summary>
1743+ public class NameUri
1744+ {
1745+ public NameUri()
1746+ {
1747+ }
1748+
1749+ public NameUri(string name, string uri)
1750+ {
1751+ Name = name;
1752+ Uri = uri;
1753+ }
1754+
1755+ /// <summary>
1756+ /// The name associated with this container type
1757+ /// </summary>
1758+ public string Name { get; set;}
1759+
1760+ /// <summary>
1761+ /// The Uri associated with this container type
1762+ /// </summary>
1763+ public string Uri { get; set;}
1764+ }
1765+}
1766+
1767
1768=== modified file 'Zeitgeist/Datamodel/Subject.cs'
1769--- Zeitgeist/Datamodel/Subject.cs 2010-09-18 11:01:02 +0000
1770+++ Zeitgeist/Datamodel/Subject.cs 2010-10-02 05:56:43 +0000
1771@@ -53,7 +53,7 @@
1772 /// <summary>
1773 /// Interpretation of the Subject
1774 /// </summary>
1775- public KeyValuePair<string, string> Interpretation
1776+ public NameUri Interpretation
1777 {
1778 get; set;
1779 }
1780@@ -61,7 +61,7 @@
1781 /// <summary>
1782 /// Manifestation of the Subject
1783 /// </summary>
1784- public KeyValuePair<string, string> Manifestation
1785+ public NameUri Manifestation
1786 {
1787 get; set;
1788 }
1789
1790=== modified file 'Zeitgeist/Zeitgeist.csproj'
1791--- Zeitgeist/Zeitgeist.csproj 2010-09-19 19:43:25 +0000
1792+++ Zeitgeist/Zeitgeist.csproj 2010-10-02 05:56:43 +0000
1793@@ -56,6 +56,7 @@
1794 <Compile Include="ZsUtils.cs" />
1795 <Compile Include="Datamodel\Interpretation.cs" />
1796 <Compile Include="Datamodel\Manifestation.cs" />
1797+ <Compile Include="Datamodel\NameUri.cs" />
1798 </ItemGroup>
1799 <ItemGroup>
1800 <Folder Include="Datamodel\" />
1801
1802=== modified file 'Zeitgeist/ZsUtils.cs'
1803--- Zeitgeist/ZsUtils.cs 2010-10-01 16:40:29 +0000
1804+++ Zeitgeist/ZsUtils.cs 2010-10-02 05:56:43 +0000
1805@@ -133,15 +133,15 @@
1806 public static void PrintEvent(Event e)
1807 {
1808 Console.WriteLine("ID: "+e.Id);
1809- Console.WriteLine("Interpretation: "+e.Interpretation.Key);
1810- Console.WriteLine("Manifestation: "+e.Manifestation.Key);
1811+ Console.WriteLine("Interpretation: "+e.Interpretation.Name);
1812+ Console.WriteLine("Manifestation: "+e.Manifestation.Name);
1813 Console.WriteLine("Timestamp: "+e.Timestamp.ToLongTimeString());
1814 Console.WriteLine("Actor: "+e.Actor);
1815 foreach(Subject sub in e.Subjects)
1816 {
1817 Console.WriteLine("URI: "+sub.Uri);
1818- Console.WriteLine("Interpretation: "+sub.Interpretation.Key);
1819- Console.WriteLine("Manifestation: "+sub.Manifestation.Key);
1820+ Console.WriteLine("Interpretation: "+sub.Interpretation.Name);
1821+ Console.WriteLine("Manifestation: "+sub.Manifestation.Name);
1822 Console.WriteLine("Mimetype: "+sub.MimeType);
1823 Console.WriteLine("Text: "+sub.Text);
1824 }

Subscribers

People subscribed via source and target branches