beagle r4503 - branches/beagle-rdf/RDFAdapter



Author: dbera
Date: Wed Feb 20 14:37:07 2008
New Revision: 4503
URL: http://svn.gnome.org/viewvc/beagle?rev=4503&view=rev

Log:
Adding some more example RDF queries. Patch from Enrico.


Modified:
   branches/beagle-rdf/RDFAdapter/SemWebClient.cs

Modified: branches/beagle-rdf/RDFAdapter/SemWebClient.cs
==============================================================================
--- branches/beagle-rdf/RDFAdapter/SemWebClient.cs	(original)
+++ branches/beagle-rdf/RDFAdapter/SemWebClient.cs	Wed Feb 20 14:37:07 2008
@@ -29,9 +29,23 @@
 public class SemWebClient {
 	public static void Main (string[] args)
 	{
+		System.Console.Out.WriteLine();
+		System.Console.Out.WriteLine("Querying for all Triples with MimeType:");
+		query(new Statement(null, new Entity("prop:k:beagle:MimeType"), null));
+		
+		System.Console.Out.WriteLine();
+		System.Console.Out.WriteLine("Querying for all Triples with FileSize:");
+		query(new Statement(null, new Entity("prop:k:fixme:filesize"), null));
+		
+		System.Console.Out.WriteLine();
+		System.Console.Out.WriteLine("Querying for all Triples:");
+		query(Statement.All);
+	}
+	
+	public static void query(Statement filter) {
 		RdfWriter writer = new N3Writer (System.Console.Out);
 		SelectableSource source = new BeagleSource();
-		source.Select (Statement.All, writer);
+		source.Select (filter, writer);
 		writer.Close ();
 	}
 }



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