beagle r4583 - trunk/beagle-xesam/src



Author: arunsr
Date: Thu Mar  6 14:36:44 2008
New Revision: 4583
URL: http://svn.gnome.org/viewvc/beagle?rev=4583&view=rev

Log:
Support hits with multiple values for a single property (e.g.: multiple 'dc:author's)


Modified:
   trunk/beagle-xesam/src/Search.cs

Modified: trunk/beagle-xesam/src/Search.cs
==============================================================================
--- trunk/beagle-xesam/src/Search.cs	(original)
+++ trunk/beagle-xesam/src/Search.cs	Thu Mar  6 14:36:44 2008
@@ -85,13 +85,18 @@
 						break;
 					    
 					default:
-						//FIXME: This *will* break since we don't know what the expected
-						//type here is
-						object p = hit.GetFirstProperty (Ontologies.XesamToBeagleField (field));
-						if (p != null)
-							hitValue [i++] = p.ToString();
-						else
+						// FIXME: This *will* break since we don't know what the expected
+						// type here is, and we're always using strings
+						
+						string[] prop = hit.GetProperties (Ontologies.XesamToBeagleField (field));
+						if (prop != null) {
+							if (prop.Length == 1)
+								hitValue [i++] = prop [0];
+							else
+								hitValue [i++] = prop;
+						} else {
 							hitValue [i++] = String.Empty;
+						}
 						break;
 					}
 				}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]