<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Interactive Media Manager Blog</title><subtitle type="html" /><id>http://blogs.msdn.com/imm/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/imm/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/imm/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2007-11-26T16:59:00Z</updated><entry><title>The IMM solution has been discontinued</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/imm/archive/2009/07/21/the-imm-solution-has-been-discontinued.aspx" /><id>http://blogs.msdn.com/imm/archive/2009/07/21/the-imm-solution-has-been-discontinued.aspx</id><published>2009-07-22T00:35:58Z</published><updated>2009-07-22T00:35:58Z</updated><content type="html">&lt;p&gt;Microsoft Services is &lt;u&gt;de-investing&lt;/u&gt; in the Interactive Media Manager (IMM) solution. There will be no further development of the solution, nor any official support of this Microsoft IP beyond a custom support agreement from the Microsoft Premier organization. The final IP is only accessible to the Microsoft Consulting Services (MCS) field; there will not be external access to the IP beyond an official, contracted MCS engagement. It is possible for MCS to subcontract to a partner. Microsoft will retain the rights to the IP, and neither customer nor partner can redistribute it. Please note the IMM solution is dependent on a 3rd party component, licensed separately from &lt;a href="http://www.intellidimension.com" target="_blank"&gt;Intellidimension&lt;/a&gt;. Please contact your local MCS representative for more information – start &lt;a href="http://www.microsoft.com/Microsoftservices/contact.aspx" target="_blank"&gt;here&lt;/a&gt; to locate a Microsoft Services contact in your location.&lt;/p&gt;  &lt;p&gt;There is a good, free solution posted on CodePlex called the &lt;b&gt;Podcasting Kit for SharePoint &lt;/b&gt;(&lt;a href="http://www.codeplex.com/pks" target="_blank"&gt;PKS&lt;/a&gt;) – and this can be extended/scaled beyond podcasting asset management scenarios – with all value/R&amp;amp;D of SharePoint 2007 as its base server component. You can see it in action here at a &lt;a href="http://getsharp.3sharp.com/Pages/pkshomepage.aspx" target="_blank"&gt;PKS-based demo site&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;And there are a number of partner solutions built on SharePoint focused on digital asset management (DAM) – found within the list &lt;a href="http://www.microsoft.com/resources/mediaandentertainment/partners.mspx" target="_blank"&gt;here&lt;/a&gt; off of Microsoft.com.&lt;/p&gt;  &lt;p&gt;It’s been fun. Thanks for your interest in IMM. On to the next project.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9843947" width="1" height="1"&gt;</content><author><name>mkashman</name><uri>http://blogs.msdn.com/members/mkashman.aspx</uri></author></entry><entry><title>Updated Import Ontology script – replaces previous one in the install guide.</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/imm/archive/2008/12/08/updated-import-ontology-script-replaces-previous-one-in-the-install-guide.aspx" /><id>http://blogs.msdn.com/imm/archive/2008/12/08/updated-import-ontology-script-replaces-previous-one-in-the-install-guide.aspx</id><published>2008-12-08T23:35:26Z</published><updated>2008-12-08T23:35:26Z</updated><content type="html">&lt;p&gt;Recently we discovered an issue in the installation guide’s import script that was causing the ontologies to be incorrectly imported. There was an extra call to DeleteResource that was resulting in previously imported ontologies to be removed.&lt;/p&gt;  &lt;p&gt;Here is the updated script below. Remember to set your timeout really high as this takes several minutes to complete.&lt;/p&gt;  &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 112.65%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; height: 210px; background-color: #f4f4f4"&gt;   &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;import &lt;span style="color: #006080"&gt;&amp;quot;/imm/semanticmetadataservice/ontology.rql&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;debug=&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;consoleOutput=&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; ontologyUri = &lt;span style="color: #006080"&gt;&amp;quot;http://purl.org/dc/elements/1.1/&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; tempOntologyDs = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; datasource(&lt;span style="color: #006080"&gt;&amp;quot;inet?parsetype=rdf&amp;amp;context=&amp;quot;&lt;/span&gt; + server.urlencode(ontologyUri) + &lt;span style="color: #006080"&gt;&amp;quot;&amp;amp;url=&amp;quot;&lt;/span&gt; + server.urlencode(ontologyUri));&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;InsertOntology(ontologyUri, tempOntologyDs);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; ontologyUri = &lt;span style="color: #006080"&gt;&amp;quot;http://purl.org/dc/terms/&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; tempOntologyDs = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; datasource(&lt;span style="color: #006080"&gt;&amp;quot;inet?parsetype=rdf&amp;amp;context=&amp;quot;&lt;/span&gt; + server.urlencode(ontologyUri) + &lt;span style="color: #006080"&gt;&amp;quot;&amp;amp;url=&amp;quot;&lt;/span&gt; + server.urlencode(ontologyUri));&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;InsertOntology(ontologyUri, tempOntologyDs);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; ontologyUri = &lt;span style="color: #006080"&gt;&amp;quot;http://purl.org/dc/dcmitype/&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; tempOntologyDs = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; datasource(&lt;span style="color: #006080"&gt;&amp;quot;inet?parsetype=rdf&amp;amp;context=&amp;quot;&lt;/span&gt; + server.urlencode(ontologyUri) + &lt;span style="color: #006080"&gt;&amp;quot;&amp;amp;url=&amp;quot;&lt;/span&gt; + server.urlencode(ontologyUri));&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;InsertOntology(ontologyUri, tempOntologyDs);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; ontologyUri = &lt;span style="color: #006080"&gt;&amp;quot;http://schemas.microsoft.com/imm/2.0/core/&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; tempOntologyDs = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; datasource(&lt;span style="color: #006080"&gt;&amp;quot;inet?parsetype=rdf&amp;amp;context=&amp;quot;&lt;/span&gt; + server.urlencode(ontologyUri) + &lt;span style="color: #006080"&gt;&amp;quot;&amp;amp;url=&amp;quot;&lt;/span&gt; + server.urlencode(ontologyUri));&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;InsertOntology(ontologyUri, tempOntologyDs);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; ontologyPath = &lt;span style="color: #006080"&gt;&amp;quot;C:\\Program Files\\Microsoft Interactive Media Manager\\Samples\\Data\\LitwareInc.owl&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; ontologyUri = &lt;span style="color: #006080"&gt;&amp;quot;http://imm.litwareinc.com/samples/2.0/&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; tempOntologyDs = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; datasource(&lt;span style="color: #006080"&gt;&amp;quot;inet?parsetype=rdf&amp;amp;context=&amp;quot;&lt;/span&gt; + server.urlencode(ontologyUri) + &lt;span style="color: #006080"&gt;&amp;quot;&amp;amp;url=&amp;quot;&lt;/span&gt; + server.urlencode(ontologyPath));&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;InsertOntology(ontologyUri, tempOntologyDs);&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;After importing the Ontologies, you can run this SQL Script and you should see a row for each imported ontology.&lt;/p&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4"&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;exec&lt;/span&gt; sw_Sparql &lt;span style="color: #006080"&gt;'&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;SELECT ?s ?o&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;FROM &amp;lt;http://schemas.microsoft.com/IMM/ontology&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;WHERE {   graph ?g { ?s &amp;lt;http://schemas.microsoft.com/imm/2.0/core/InferenceIndex&amp;gt; ?o }}'&lt;/span&gt;,&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;1&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9185413" width="1" height="1"&gt;</content><author><name>johndeu</name><uri>http://blogs.msdn.com/members/johndeu.aspx</uri></author></entry><entry><title>How to use inferencing with the sw_Sparql stored procedure and how to get the InferenceIndex for a specific ontology in the database</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/imm/archive/2008/12/08/how-to-use-inferencing-with-the-sw-sparql-stored-procedure-and-how-to-get-the-inferenceindex-for-a-specific-ontology-in-the-database.aspx" /><id>http://blogs.msdn.com/imm/archive/2008/12/08/how-to-use-inferencing-with-the-sw-sparql-stored-procedure-and-how-to-get-the-inferenceindex-for-a-specific-ontology-in-the-database.aspx</id><published>2008-12-08T23:22:48Z</published><updated>2008-12-08T23:22:48Z</updated><content type="html">&lt;p&gt;It’s often very useful when creating custom SPARQL queries against the IMM Metadata Store using the sw_Sparql stored procedure to pull in some “inferred” metadata from the ontologies that you have imported.&amp;#160; For example, you may have ingested a bunch of metadata into the IMM data table that stores the “facts” but you want to query back for information that is generated dynamically based on you ontology definitions. &lt;/p&gt;  &lt;p&gt;One simple example of this is you may have saved a VideoItem in the database with it’s rdf:type set to imm:VideoItem, but you never provided the metadata to explain that this item is also derived from imm:MediaItem.&amp;#160; That information is provided in the IMM core ontology. To write a query for that directly against the sw_sparql stored procedure in the database, you need to know two well known graph URI’s.&amp;#160; &lt;/p&gt;  &lt;p&gt;The first one is the URI to the IMM data graph which stores all of the known “facts&amp;quot;.&amp;#160; Note that the “IMM” in this URI is case sensitive!    &lt;br /&gt;    &lt;br /&gt;&lt;a href="http://schemas.microsoft.com/IMM/data"&gt;http://schemas.microsoft.com/IMM/data&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The next URI you will need is the one for the inferred metadata generated from your imported ontology.&lt;/p&gt;  &lt;p&gt;If I execute the following query in SQL Server Management Studio against the IMMMetadata database, it will select all the VideoItems from the “facts” table as you can see in the FROM clause. If you have the Litware sample data installed, you should get some results back. If you look at the Litware rdf data, you will notice that we have set the type of these objects to VideoItem already, so the “facts” table contains their types.&lt;/p&gt;  &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4"&gt;   &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;exec&lt;/span&gt; sw_Sparql &lt;span style="color: #006080"&gt;'&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;PREFIX rdf: &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;PREFIX dii: &amp;lt;urn:mpeg:mpeg21:2002:01-DII-NS#&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;PREFIX did: &amp;lt;urn:mpeg:mpeg21:2002:02-DIDMODEL-NS#&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;PREFIX imm: &amp;lt;http://schemas.microsoft.com/imm/2.0/core/&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;SELECT ?s &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;FROM &amp;lt;http://schemas.microsoft.com/IMM/data&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;WHERE {  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    ?s rdf:type imm:VideoItem.&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;}'&lt;/span&gt;,&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;1&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;If I execute&amp;#160; this query, which is the same as above except now this time I am asking for a type that is in the IMM core Ontology, but not declared in the facts that I imported – it will return no results. Notice that the only change I made is the name of the type.&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4"&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;exec&lt;/span&gt; sw_Sparql &lt;span style="color: #006080"&gt;'&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;PREFIX rdf: &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;PREFIX dii: &amp;lt;urn:mpeg:mpeg21:2002:01-DII-NS#&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;PREFIX did: &amp;lt;urn:mpeg:mpeg21:2002:02-DIDMODEL-NS#&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;PREFIX imm: &amp;lt;http://schemas.microsoft.com/imm/2.0/core/&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;SELECT ?s &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;FROM &amp;lt;http://schemas.microsoft.com/IMM/data&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;WHERE {  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    ?s rdf:type imm:MediaItem.&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;}'&lt;/span&gt;,&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;1&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;So, how do I get back these “inferred” types in a query. First we need to know the graph name that was generated for us when we imported our Ontology.&amp;#160; IMM automatically creates an inference graph when you import the core and any custom ontology.&amp;#160; We automatically add those inference graphs if you pass in the URI to to your ontology in the GetResource or Query methods on the web service.&amp;#160; &lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div&gt;In order to get back this information from the database you can execute the following SQL script which will return back a list of the known ontologies that are imported into IMM, as well as an ID that is used to identify their inference graph name. &lt;/div&gt;

&lt;div&gt;&amp;#160;&lt;/div&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4"&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;exec&lt;/span&gt; sw_sparql &lt;span style="color: #006080"&gt;'&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;SELECT ?s ?o &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;FROM &amp;lt;http://schemas.microsoft.com/IMM/ontology&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;WHERE { graph ?g { ?s &amp;lt;http://schemas.microsoft.com/imm/2.0/core/InferenceIndex&amp;gt; ?o. }}&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;order by ?o'&lt;/span&gt;,&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;1&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Now, we can rewrite the script above to add a extra FROM clause that uses this inference index to point to the correct inference graph. 
  &lt;br /&gt;Look at the results of the above query and locate the Ontology that you are interested in using. Append the InferenceIndex that is returned in column 2 of the results to the following URI&amp;#160; “http://schemas.microsoft.com/IMM/inference_”&amp;#160; and you will get the URI for that inference graph.&amp;#160;&amp;#160; &lt;br /&gt;

  &lt;br /&gt;For example the results from my database contains the index number “8” for the IMM Core ontology, so my resulting graph URI would be “http://schemas.microsoft.com/IMM/inference_8”.&lt;/p&gt;

&lt;p&gt;My new query with ontology inferencing enabled would then look like this:&lt;/p&gt;

&lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4"&gt;
  &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;exec&lt;/span&gt; sw_Sparql &lt;span style="color: #006080"&gt;'&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;PREFIX rdf: &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;PREFIX dii: &amp;lt;urn:mpeg:mpeg21:2002:01-DII-NS#&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;PREFIX did: &amp;lt;urn:mpeg:mpeg21:2002:02-DIDMODEL-NS#&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;PREFIX imm: &amp;lt;http://schemas.microsoft.com/imm/2.0/core/&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;SELECT ?s &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;FROM &amp;lt;http://schemas.microsoft.com/IMM/data&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;FROM &amp;lt;http://schemas.microsoft.com/IMM/inference_8&amp;gt;&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;WHERE {  &lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    ?s rdf:type imm:MediaItem.&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;}'&lt;/span&gt;,&lt;/pre&gt;

    &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;1&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;If you execute this against the Litware sample metadata you will now get back the same (or more if you have other items that are derived from MediaItem) number of results as in the first query.&amp;#160;&amp;#160; &lt;/p&gt;

&lt;table cellspacing="0" cellpadding="0" width="550" border="0"&gt;&lt;tbody&gt;
    &lt;tr&gt;
      &lt;td valign="top" width="92"&gt;
        &lt;p&gt;&lt;img height="150" src="http://avatar.xboxlive.com/avatar/deutscherj/avatar-body.png" width="75" /&gt; &lt;/p&gt;
      &lt;/td&gt;

      &lt;td valign="top" width="456"&gt;
        &lt;p&gt;&lt;b&gt;
            &lt;br /&gt;

            &lt;br /&gt;

            &lt;br /&gt;

            &lt;br /&gt;

            &lt;br /&gt;John Deutscher 

            &lt;br /&gt;&lt;/b&gt;Group Program Manager 

          &lt;br /&gt;Microsoft 

          &lt;br /&gt;&lt;a href="mailto:johndeu@microsoft.com"&gt;johndeu@microsoft.com&lt;/a&gt;&lt;/p&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;&lt;/table&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9185389" width="1" height="1"&gt;</content><author><name>johndeu</name><uri>http://blogs.msdn.com/members/johndeu.aspx</uri></author><category term="IMM" scheme="http://blogs.msdn.com/imm/archive/tags/IMM/default.aspx" /><category term="SPARQL" scheme="http://blogs.msdn.com/imm/archive/tags/SPARQL/default.aspx" /><category term="OWL" scheme="http://blogs.msdn.com/imm/archive/tags/OWL/default.aspx" /><category term="RDF" scheme="http://blogs.msdn.com/imm/archive/tags/RDF/default.aspx" /><category term="model" scheme="http://blogs.msdn.com/imm/archive/tags/model/default.aspx" /><category term="metadata" scheme="http://blogs.msdn.com/imm/archive/tags/metadata/default.aspx" /><category term="sw_Sparql" scheme="http://blogs.msdn.com/imm/archive/tags/sw_5F00_Sparql/default.aspx" /><category term="Inference" scheme="http://blogs.msdn.com/imm/archive/tags/Inference/default.aspx" /><category term="Graphs" scheme="http://blogs.msdn.com/imm/archive/tags/Graphs/default.aspx" /></entry><entry><title>Creating an ADO.NET DataService for RDF Entities in IMM</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/imm/archive/2008/12/04/creating-an-ado-net-dataservice-for-rdf-entities-in-imm.aspx" /><id>http://blogs.msdn.com/imm/archive/2008/12/04/creating-an-ado-net-dataservice-for-rdf-entities-in-imm.aspx</id><published>2008-12-05T05:46:57Z</published><updated>2008-12-05T05:46:57Z</updated><content type="html">&lt;p&gt;Ok, so I have been playing around with the ADO.NET DataServices to get something working for a REST based access to the RDF Store. My goal here was to create a simple REST based way to grab metadata out of the RDF store based on the ADO.NET DataServices model instead of relying on SOAP and SPARQL. I just wanted a simple way to get a specific object and some basic locked down values into a Silverlight application.&amp;#160; &lt;/p&gt;  &lt;p&gt;To create an ADO.NET DataService for use with IMM you need to follow these steps. Keep in mind that the DataService will need to be locked down to a specific Entity view of objects in the IMM Store, and is mostly meant to be read only for Silverlight applications or public sites. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Fire up Visual Studio 2008 SP1. (has to be SP1) &lt;/li&gt;    &lt;li&gt;Create a new ASP.NET Web Application      &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image001_2.jpg"&gt;&lt;img title="clip_image001" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="324" alt="clip_image001" src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image001_thumb.jpg" width="461" border="0" /&gt;&lt;/a&gt;       &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Add a new solution Folder and call it Views      &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image003_2.jpg"&gt;&lt;img title="clip_image003" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="68" alt="clip_image003" src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image003_thumb.jpg" width="136" border="0" /&gt;&lt;/a&gt;       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Add a New Item to the Views folder. Select Text item and call it      &lt;br /&gt;“CreateVideoItemsView.sql”       &lt;br /&gt;      &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image005_2.jpg"&gt;&lt;img title="clip_image005" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="66" alt="clip_image005" src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image005_thumb.jpg" width="242" border="0" /&gt;&lt;/a&gt;       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;We’ll use this SQL script to create a new View in the IMMMetadata database for us to expose via LINQ to SQL      &lt;br /&gt;      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Copy and paste this CREATE View script into the new sql script file.&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;      &lt;br /&gt;A few notes here. This creates a new View table based on a SPARQL query. You can edit this and create as many columns as you want bound to your SPARQL query.       &lt;br /&gt;In this case, I am creating a new row for every imm:VideoItem in the database and adding a column for the title, description, and proxy path.       &lt;br /&gt;      &lt;br /&gt;&lt;strong&gt;ONE VERY IMPORTANT NOTE HERE – YOU MUST use the column name “ID” (in caps!)&lt;/strong&gt; for the Entity framework and ADO.NET DataServices to work properly.&amp;#160; That becomes the default primary key on the table and will be the value that you use to index into the REST service’s list of VideoItems. In this example below, I used a SUBSTRING on the value returned from IMM as the Subject. The reason I did this is because I wanted to use only the GUID at the end of the Subject URI as the method of indexing, so my URI looks like this -       &lt;br /&gt;      &lt;br /&gt;http://localhost:29062/SemanticMetadata.svc/VideoItems('A8FC8F13-0A34-4446-B7E0-1AD8AF9E1A49').       &lt;br /&gt;      &lt;br /&gt;Nice and simple to use instead of a full URL.       &lt;br /&gt;      &lt;br /&gt;      &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 98.76%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; height: 210px; background-color: #f4f4f4"&gt;       &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;         &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;CREATE&lt;/span&gt; &lt;span style="color: #0000ff"&gt;VIEW&lt;/span&gt; dbo.VideoItems&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;AS&lt;/span&gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; &lt;span style="color: #0000ff"&gt;SUBSTRING&lt;/span&gt;(c1.&lt;span style="color: #0000ff"&gt;Value&lt;/span&gt;,50,37) &lt;span style="color: #0000ff"&gt;AS&lt;/span&gt; ID,&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     c2.&lt;span style="color: #0000ff"&gt;Value&lt;/span&gt; &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; Title, &lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;     c3.&lt;span style="color: #0000ff"&gt;Value&lt;/span&gt; &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; [Description],&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     c4.&lt;span style="color: #0000ff"&gt;Value&lt;/span&gt; &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; [&lt;span style="color: #0000ff"&gt;Ref&lt;/span&gt;], &lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; dbo.sparql (&lt;span style="color: #006080"&gt;'&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;PREFIX dc: &amp;lt;http://purl.org/dc/elements/1.1/&amp;gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;PREFIX imm: &amp;lt;http://schemas.microsoft.com/imm/2.0/core/&amp;gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;PREFIX rdf: &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;PREFIX did: &amp;lt;urn:mpeg:mpeg21:2002:02-DIDMODEL-NS#&amp;gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;PREFIX dii: &amp;lt;urn:mpeg:mpeg21:2002:01-DII-NS#&amp;gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;SELECT ?item ?title ?description ?ref&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;FROM &amp;lt;http://schemas.microsoft.com/IMM/data&amp;gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;WHERE&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;{&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    ?item rdf:type imm:VideoItem.&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    ?item dc:title ?title.&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    ?item dc:title ?description.&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    ?item did:ResourceCollection ?resource.&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    ?resource imm:ResourceType &amp;quot;Proxy&amp;quot;^^&amp;lt;http://www.w3.org/2001/XMLSchema#string&amp;gt;.&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    ?resource did:Ref ?ref.&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;}&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;'&lt;/span&gt;)&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;GO&lt;/span&gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/li&gt;

  &lt;li&gt;With the SQL script open hit F5 to execute it. You will need to connect to the database “IMMMetadata”. 
    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;Once that is successful, we now have a View in our database that contains the VideoItem data that we wanted. You can repeat this process to add Views for other Ontology class types in the RDF Store. 
    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;Next we are going to add our ADO.NET DataService. Add a New ADO.NET Data Service Item to the Project.&amp;#160; If you don’t see that item, then you don’t have Visual Studio SP1 installed. 
    &lt;br /&gt;Call the item something like IMMDataService.svc 

    &lt;br /&gt;

    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image007_2.jpg"&gt;&lt;img title="clip_image007" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="295" alt="clip_image007" src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image007_thumb.jpg" width="496" border="0" /&gt;&lt;/a&gt; 

    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;Next we will add a LINQ to SQL class. Go to Add Item to Project and select the LINQ to SQL template. Name it IMMMetadata.dbml 
    &lt;br /&gt;

    &lt;br /&gt;

    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image009_2.jpg"&gt;&lt;img title="clip_image009" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="306" alt="clip_image009" src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image009_thumb.jpg" width="508" border="0" /&gt;&lt;/a&gt; 

    &lt;br /&gt;

    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;Now we need to make sure we have a connection to the SQL database in our Server Explorer. Should have this since we connected to the SQL to run the View Script. 
    &lt;br /&gt;Open it up and check to see if you View is in the IMMMetadata database. 

    &lt;br /&gt;

    &lt;br /&gt;

    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image011_2.jpg"&gt;&lt;img title="clip_image011" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="259" alt="clip_image011" src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image011_thumb.jpg" width="245" border="0" /&gt;&lt;/a&gt; 

    &lt;br /&gt;

    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;Next you will need to drag the View out onto the LINQ to SQL designer surface. 
    &lt;br /&gt;

    &lt;br /&gt;

    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image013_2.jpg"&gt;&lt;img title="clip_image013" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="184" alt="clip_image013" src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image013_thumb.jpg" width="244" border="0" /&gt;&lt;/a&gt; 

    &lt;br /&gt;

    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;Open the DataService class file – IMMDataService.svc. We need to make a few edits in this file to get stuff working. 
    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;Edit the file by adding your DataContext to the base class type for the DataService. In my case below I added IMMMetadataDataContext which is the class that was generated by the LINQ to SQL tool. 
    &lt;br /&gt;In addition, I uncommented the Access Rule in the InitializeService method and changed the name of my Entity set to “VideoItems” to expose that collection. You can adjust the security settings as needed, but AllRead is fine for now.&amp;#160; If you want to expose ALL entity sets that you may have views for, you can add more lines, or for testing you can set the value to “*” to expose everything. 

    &lt;br /&gt;

    &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4"&gt;
      &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;/// The IMM Data Service for use with ADO.NET&lt;/span&gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; IMMDataService : DataService&amp;lt;IMMMetadataDataContext&amp;gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;{&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    &lt;span style="color: #008000"&gt;// This method is called only once to initialize service-wide policies.&lt;/span&gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    &lt;span style="color: #008000"&gt;/// Initializes the service.&lt;/span&gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;config&amp;quot;&amp;gt;The config.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    &lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; InitializeService(IDataServiceConfiguration config)&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    {&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    &lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;             config.SetEntitySetAccessRule(&lt;span style="color: #006080"&gt;&amp;quot;VideoItems&amp;quot;&lt;/span&gt;, EntitySetRights.AllRead);&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;            &lt;span style="color: #008000"&gt;// config.SetServiceOperationAccessRule(&amp;quot;MyServiceOperation&amp;quot;, ServiceOperationRights.All);&lt;/span&gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    }&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    &lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;}&lt;/pre&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/li&gt;

  &lt;li&gt;Now, just Build your solution and browse to the IMMDataService.svc page.&amp;#160; You should see the following. 
    &lt;br /&gt;If you cannot see the output in the above way, go to Tools-&amp;gt;Internet Options-&amp;gt; Content Tab. Click the Settings button in the Feeds section, an uncheck the &lt;strong&gt;Turn on Feed Reading View&lt;/strong&gt; option. You may need to restart IE for that setting to take. I had to on server but not on Vista. 

    &lt;br /&gt;

    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image015_2.jpg"&gt;&lt;img title="clip_image015" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="219" alt="clip_image015" src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image015_thumb.jpg" width="501" border="0" /&gt;&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;Notice that the collection is named VideoItems. It used the name of our View to create the collection name. 
    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;We can now drill down into that collection.&amp;#160; To view the whole list of items we could hit this URL. That could be really slow on a huge database, and you may want to disable that in production by setting the EntitySetRights in the InitializeService method to allow only single items. 
    &lt;br /&gt;

    &lt;br /&gt;&lt;a href="http://localhost:33655/IMMDataService.svc/VideoItems"&gt;http://localhost:33655/IMMDataService.svc/VideoItems&lt;/a&gt; 

    &lt;br /&gt;

    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image016_2.jpg"&gt;&lt;img title="clip_image016" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="288" alt="clip_image016" src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image016_thumb.jpg" width="494" border="0" /&gt;&lt;/a&gt; 

    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;Note that the format of the feed is AtomPub. You can also get a JSON feed if you like – just look at the docs on DataServices). 
    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;Also notice that in the feed we now have an //entry/id element that contains the full URI to the details page for each asset. 
    &lt;br /&gt;I have the Litware RDF data loaded so I am seeing the Litware items. If you have this sample data loaded also, you should see the Billion Dollar Limited title asset as the first item. 

    &lt;br /&gt;If you don’t have anything listed at this point, you probably don’t have any items that match your SPARQL query loaded in the database. Load some data, or check to make sure the SPARQL query you used to create the view is correct. 

    &lt;br /&gt;

    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;To drill down into the details, just use the URI in the ID element, or adjust your URI on the address bar to include the GUID of the item you want. 
    &lt;br /&gt;Notice that I now have just the single item’s details. 

    &lt;br /&gt;

    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image017_2.jpg"&gt;&lt;img title="clip_image017" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="303" alt="clip_image017" src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image017_thumb.jpg" width="602" border="0" /&gt;&lt;/a&gt; 

    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;We can even go further into the item by adding the Predicate name to the end of the URI. For example to get the Ref path for the proxy, I just add /Ref to the URL. 
    &lt;br /&gt;

    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image019_2.jpg"&gt;&lt;img title="clip_image019" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="136" alt="clip_image019" src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image019_thumb.jpg" width="533" border="0" /&gt;&lt;/a&gt; 

    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;I can now also use some queries to change the resultsets. Try out a few of these… 
    &lt;br /&gt;

    &lt;p&gt;a.) Select the Top 3 Items 
      &lt;br /&gt;

      &lt;br /&gt;http://localhost:29062/SemanticMetadata.svc/VideoItems?$top=3&lt;/p&gt;

    &lt;p&gt;b.) Order by Title predicate 
      &lt;br /&gt;

      &lt;br /&gt;http://localhost:29062/SemanticMetadata.svc/VideoItems?$orderby=Title&lt;/p&gt;

    &lt;p&gt;c.) Skip ahead by 10 items in the results and limit to 10.&amp;#160; Good for paging! 
      &lt;br /&gt;

      &lt;br /&gt;http://localhost:33655/IMMDataService.svc/VideoItems?$skip=10&amp;amp;$top=10&lt;/p&gt;

    &lt;p&gt;d.) Filter by the content of a predicate. 
      &lt;br /&gt;

      &lt;br /&gt;http://localhost:33655/IMMDataService.svc/VideoItems?$filter=Title eq 'Volcano'&amp;#160;&amp;#160; &lt;/p&gt;

    &lt;p&gt;e.) More query options and examples are &lt;a href="http://msdn.microsoft.com/en-us/library/cc668791.aspx"&gt;here&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/cc668786.aspx"&gt;here&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;

  &lt;li&gt;If you want to use the REST service in your .NET code or more importantly in a Silverlight application, you must deploy the DataService to the same Domain as you Silverlight application. 
    &lt;br /&gt;

    &lt;br /&gt;

    &lt;ol&gt;
      &lt;li&gt;&lt;b&gt;To use the data service from the application for Silverlight:&lt;/b&gt; &lt;/li&gt;
    &lt;/ol&gt;

    &lt;blockquote&gt;
      &lt;p&gt;a.) Generate data service classes from the running data service. These classes represent each of the entities that are defined in the data service. This step can be completed by using the Add Service Reference Dialog Box in Visual Studio. Make sure the data service is running, right-click the project, and then select Add Service Reference. Type the base URL of the data service, such as &lt;a href="http://localhost:33655/IMMDataService.svc"&gt;http://localhost:33655/IMMDataService.svc&lt;/a&gt; into the address text box and click Go. 

        &lt;br /&gt;The output from the command is a C# or Visual Basic file that contains a class for each entity type in the data service. For more information about the client classes, see .NET Client Library (ADO.NET Data Services Framework). The System.Data.Services.Client assembly is added to the project automatically when you generate the client classes by using Add Service Reference. This assembly comes with Silverlight and contains the classes needed by the client application to access ADO.NET Data Services. &lt;/p&gt;
    &lt;/blockquote&gt;

    &lt;blockquote&gt;
      &lt;p&gt;b.) The classes that represent data service types can also be generated by using &lt;b&gt;DataSvcUtil.exe&lt;/b&gt;. DataSvcUtil.exe is located in the directory \WINDOWS\Microsoft.NET\Framework\v3.5\. The command line takes two arguments: the name and path of an output file and the base URL to the data service for which types are to be generated.&lt;/p&gt;

      &lt;p&gt;c.) In the page.xaml.cs, add the following using directive: using System.Data.Services.Client. &lt;/p&gt;
    &lt;/blockquote&gt;
  &lt;/li&gt;

  &lt;li&gt;You can now create an instance of the DataServiceContext in your Silverlight client code and add data binding to you user interface elements 
    &lt;br /&gt;

    &lt;br /&gt;For more details on the ADO.NET Data Services Framework see &lt;a href="http://msdn.microsoft.com/en-us/library/cc668792.aspx"&gt;http://msdn.microsoft.com/en-us/library/cc668792.aspx&lt;/a&gt; 

    &lt;br /&gt;

    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;If you want to add relationships, say for example Resources under the VideoItems you just do the following. 
    &lt;br /&gt;

    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;Add a new View for Resources. Here’s my sample view… 
    &lt;br /&gt;

    &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4"&gt;
      &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;
        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;CREATE&lt;/span&gt; &lt;span style="color: #0000ff"&gt;VIEW&lt;/span&gt; dbo.Resources&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;AS&lt;/span&gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;SELECT&lt;/span&gt; &lt;span style="color: #0000ff"&gt;SUBSTRING&lt;/span&gt;(c1.&lt;span style="color: #0000ff"&gt;Value&lt;/span&gt;,50,37) &lt;span style="color: #0000ff"&gt;AS&lt;/span&gt; ID,&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;           c2.&lt;span style="color: #0000ff"&gt;Value&lt;/span&gt; &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; Type,&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;           c3.&lt;span style="color: #0000ff"&gt;Value&lt;/span&gt; &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; [&lt;span style="color: #0000ff"&gt;Size&lt;/span&gt;],&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;           c4.&lt;span style="color: #0000ff"&gt;Value&lt;/span&gt; &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; vFormat,&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;           c5.&lt;span style="color: #0000ff"&gt;Value&lt;/span&gt; &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; Mime,&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;           c6.&lt;span style="color: #0000ff"&gt;Value&lt;/span&gt; &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; &lt;span style="color: #0000ff"&gt;Ref&lt;/span&gt;,&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;           c7.&lt;span style="color: #0000ff"&gt;Value&lt;/span&gt; &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; Lang,&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;           &lt;span style="color: #0000ff"&gt;SUBSTRING&lt;/span&gt;(c8.&lt;span style="color: #0000ff"&gt;Value&lt;/span&gt;,50,37) &lt;span style="color: #0000ff"&gt;As&lt;/span&gt; ParentID&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;FROM&lt;/span&gt; dbo.sparql (&lt;span style="color: #006080"&gt;'&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;PREFIX dc: &amp;lt;http://purl.org/dc/elements/1.1/&amp;gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;PREFIX rdf: &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;PREFIX dii: &amp;lt;urn:mpeg:mpeg21:2002:01-DII-NS#&amp;gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;PREFIX did: &amp;lt;urn:mpeg:mpeg21:2002:02-DIDMODEL-NS#&amp;gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;PREFIX imm: &amp;lt;http://schemas.microsoft.com/imm/2.0/core/&amp;gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;SELECT ?s ?type ?size ?vFormat ?mime ?ref ?lang ?parent&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;FROM &amp;lt;http://schemas.microsoft.com/IMM/data&amp;gt;&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;WHERE&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;{&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    ?s rdf:type did:Resource.&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;    ?parent did:ResourceCollection ?s.&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;    OPTIONAL{&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        ?s imm:ResourceType ?type.&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;        ?s imm:SizeInBytes ?size.&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        ?s imm:VideoFormat ?vFormat.&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;        ?s did:MimeType ?mime.&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;        ?s did:Ref ?ref.&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;        ?s dc:language ?lang.&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     }&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;}&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;'&lt;/span&gt;)&lt;/pre&gt;

        &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&amp;#160;&lt;/pre&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/li&gt;

  &lt;li&gt;Next in the LINQ to SQL designer, drag the new Resources View table out. 
    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;Right click on the design surface and Add an Association. Set it up like this. 
    &lt;br /&gt;

    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image021_2.jpg"&gt;&lt;img title="clip_image021" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="279" alt="clip_image021" src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image021_thumb.jpg" width="483" border="0" /&gt;&lt;/a&gt; 

    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;Set the Primary Key for both “ID” columns in the designer Property box. 
    &lt;br /&gt;

    &lt;br /&gt;&lt;a href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image022_2.jpg" target="_blank"&gt;&lt;img title="clip_image022" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="328" alt="clip_image022" src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image022_thumb.jpg" width="505" border="0" /&gt;&lt;/a&gt; 

    &lt;br /&gt;

    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;Rebuild your Solution and relaunch the DataService in the browser. 
    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;You will now be able to drill down into your linked Resources from your VideoItems &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image024_2.jpg"&gt;&lt;img title="clip_image024" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="236" alt="clip_image024" src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/Creati.NETDataServiceforRDFEntitiesinIMM_FFFB/clip_image024_thumb.jpg" width="615" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Have Fun!&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;
  &lt;table cellspacing="0" cellpadding="0" border="0"&gt;&lt;tbody&gt;
      &lt;tr&gt;
        &lt;td valign="top" width="115"&gt;
          &lt;p&gt;&lt;img height="150" src="http://avatar.xboxlive.com/avatar/deutscherj/avatar-body.png" width="75" /&gt; &lt;/p&gt;
        &lt;/td&gt;

        &lt;td valign="top" width="523"&gt;
          &lt;p&gt;&lt;b&gt;
              &lt;br /&gt;

              &lt;br /&gt;

              &lt;br /&gt;

              &lt;br /&gt;

              &lt;br /&gt;John Deutscher 

              &lt;br /&gt;&lt;/b&gt;Group Program Manager 

            &lt;br /&gt;Microsoft 

            &lt;br /&gt;&lt;a href="mailto:johndeu@microsoft.com"&gt;johndeu@microsoft.com&lt;/a&gt;&lt;/p&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9178000" width="1" height="1"&gt;</content><author><name>johndeu</name><uri>http://blogs.msdn.com/members/johndeu.aspx</uri></author></entry><entry><title>Deleting all the triples in the IMM database</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/imm/archive/2008/11/26/deleting-all-the-triples-in-the-imm-database.aspx" /><id>http://blogs.msdn.com/imm/archive/2008/11/26/deleting-all-the-triples-in-the-imm-database.aspx</id><published>2008-11-26T23:19:14Z</published><updated>2008-11-26T23:19:14Z</updated><content type="html">&lt;p&gt;A common question that comes up a lot on our &lt;a href="mailto:IMMAsk@microsoft.com"&gt;IMMAsk@microsoft.com&lt;/a&gt; alias is how does one delete all of the RDF triples in the IMM database.&amp;#160; Just follow these simple steps.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Open up SQL Server Management Studio and connect to your SQL Server.&lt;/li&gt;    &lt;li&gt;Open up the IMMMetadata Database&lt;/li&gt;    &lt;li&gt;Right click on the IMMMetadata and select New Query&lt;/li&gt;    &lt;li&gt;Enter this SQL script and execute it.&lt;/li&gt; &lt;/ol&gt;  &lt;blockquote&gt;   &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;exec &lt;/span&gt;sw_sparql &lt;span style="color: red"&gt;'
DELETE FROM &amp;lt;http://schemas.microsoft.com/IMM/data&amp;gt; {?s ?p ?o} 
FROM &amp;lt;http://schemas.microsoft.com/IMM/data&amp;gt;
WHERE { ?s ?p ?o }'
&lt;/span&gt;&lt;span style="color: gray"&gt;,&lt;/span&gt;0&lt;/pre&gt;
&lt;/blockquote&gt;

&lt;p&gt;That will delete all of the triples in the “data” graph for IMM. Note that there is a known bug in RTM of 2.0 where some triples of type “decimal” could be left behind. Just ignore those triples if there are just a few of them.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9145239" width="1" height="1"&gt;</content><author><name>johndeu</name><uri>http://blogs.msdn.com/members/johndeu.aspx</uri></author></entry><entry><title>Updated MetadataPolicy.xml Configuration File</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/imm/archive/2008/11/04/updated-metadatapolicy-xml-configuration-file.aspx" /><id>http://blogs.msdn.com/imm/archive/2008/11/04/updated-metadatapolicy-xml-configuration-file.aspx</id><published>2008-11-05T01:26:57Z</published><updated>2008-11-05T01:26:57Z</updated><content type="html">&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Today we posted an &lt;a href="http://imm.s3.amazonaws.com/MetadataPolicy.xml" target="_blank"&gt;updated MetadataPolicy.xml&lt;/a&gt; configuration file to support more image metadata fields when using the IMM Media Services to extract metadata from a JPEG or TIFF image. Download the latest cersion of the file and replace the existing one in the folder:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="2"&gt;%Program Files%/Microsoft Interactive Media Manager\Microsoft Interactive Media Manager\Media Services\Metadata&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The updates include support for more EXIF, TIFF, and XMP metadata fields that are commonly found. &lt;/p&gt;  &lt;p&gt;It’s very useful to spend a few moments to understand how the metadata policy file works, if you need to extend it to extract metadata fields that may not be standard. You can easily edit this file and just save it back and it will be used immediately on the next query to the Image endpoint’s GetMetadata method. &lt;/p&gt;  &lt;p&gt;The MetadataPolicy.xml file is modeled after the default Vista metadata policy in how it chooses what metadata to parse from an image file. You will notice that it is grouped into Policy Groups. Each Group defines a prioritized list of metadata paths to attempt to extract metadata from a file. IMM MediaServices uses this policy file to determine which path to attempt first and once it gets a hit, it will stop processing that Policy Group and return the results in RDF format using the property name defined in the &lt;strong&gt;immPredicate&lt;/strong&gt; attribute of the Policy element.&lt;/p&gt;  &lt;p&gt;There are lots of tools out there to use to view the existing metadata on your image files and help determine which ones to add to the policy document.&amp;#160; Here’s a couple of my favorite tools.&lt;/p&gt;  &lt;h3&gt;WIC EXPLORER&lt;/h3&gt;  &lt;p&gt;A great tool for helping out with image metadata and our MetadataPolicy file is the WIC Explorer which is in the Windows Imaging Component Code Samples and Tools. You can download it from &lt;a href="http://www.microsoft.com/downloads/thankyou.aspx?familyId=a6d6ec6a-e4f2-405e-842d-7c3bcb5b1390&amp;amp;displayLang=en" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The WIC Explorer lets you view a tree of the metadata extracted in the files.&amp;#160; You can use the “Metadata Values” decimal (in Green below) to extract the metadata by setting the appropriate path in MetadataPolicy.xml file.&lt;/p&gt;  &lt;p&gt;&lt;img title="clip_image001" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="341" alt="clip_image001" src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/UpdatedMetadataPoli.xmlConfigurationFile_7D0A/clip_image001_3.jpg" width="451" border="0" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;EXIF TOOL&lt;/h3&gt;  &lt;p&gt;Another handy tool is ExifTool by Phil Harvey. It is great for getting a dump from a file of available metadata in XMP format. &lt;a href="http://www.sno.phy.queensu.ca/~phil/exiftool/"&gt;http://www.sno.phy.queensu.ca/~phil/exiftool/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Drop it in your Windows folder, rename it to just “exiftool.exe” and run it like this to get an .xmp file in RDF format. Great for debugging.&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;c:\Content&amp;gt;exiftool 068.JPG -o -s %d%f.xmp&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Also, just run the console like this to get a dump of metadata and field names.&lt;/p&gt;  &lt;p&gt;&lt;font face="Courier New"&gt;c:\Content&amp;gt;exiftool 068.JPG –s&lt;/font&gt;&lt;/p&gt;  &lt;h3&gt;Updating Ontology to Support New Properties&lt;/h3&gt;  &lt;p&gt;Once you have located and added the new properties to the MetadataPolicy.xml file you will need to update your Owl Ontology’s ImageEssenceFormat class to have the new property restrictions.&amp;#160; In the current version of the IMM 2.0 Core Ontology, only the following properties are defined on the ImageEssenceFormat.&amp;#160; If you want to use other properties in your code, you will need to add more property restrictions to this class and then regenerate your own custom ontology assemblies for use in .NET development.&lt;/p&gt;  &lt;p&gt;Default Properties of ImageEssenceFormat on the &lt;a href="http://schemas.microsoft.com/imm/2.0/core/" target="_blank"&gt;IMM Core 2.0 Ontology.&lt;/a&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;imm:ResolutionX &lt;/li&gt;    &lt;li&gt;imm:ResolutionY &lt;/li&gt;    &lt;li&gt;imm:Codec &lt;/li&gt;    &lt;li&gt;imm:BitDepth &lt;/li&gt;    &lt;li&gt;MicrosoftPhoto:CameraSerialNumber &lt;/li&gt;    &lt;li&gt;MicrosoftPhoto:DateAcquired &lt;/li&gt;    &lt;li&gt;MicrosoftPhoto:FlashManufacturer &lt;/li&gt;    &lt;li&gt;MicrosoftPhoto:FlashModel &lt;/li&gt;    &lt;li&gt;MicrosoftPhoto:LastKeywordIPTC &lt;/li&gt;    &lt;li&gt;MicrosoftPhoto:LastKeywordXMP &lt;/li&gt;    &lt;li&gt;MicrosoftPhoto:LensManufacturer &lt;/li&gt;    &lt;li&gt;MicrosoftPhoto:LensModel &lt;/li&gt;    &lt;li&gt;MicrosoftPhoto:Rating &lt;/li&gt;    &lt;li&gt;MicrosoftPhoto:RatingPercent &lt;/li&gt;    &lt;li&gt;dc:Subject &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;To extend the ImageEssenceFormat Class, you simply create a new custom ontology (or if you already defined one use that one), and then you add restrictions to the ImageEssenceFormat class. &lt;/p&gt;  &lt;p&gt;First open or create a new OWL document. Define a new Ontology element and import the IMM Core 2.0 ontology from the web.&lt;/p&gt;  &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;encoding&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;UTF-8&amp;quot;&lt;/span&gt;?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdf:RDF&lt;/span&gt; &lt;span class="attr"&gt;xmlns:owl&lt;/span&gt;&lt;span class="kwrd"&gt;=&lt;a href="http://www.w3.org/2002/07/owl#"&gt;http://www.w3.org/2002/07/owl#&lt;/a&gt;&lt;/span&gt; &lt;br /&gt;&lt;span class="attr"&gt; xmlns:rdf&lt;/span&gt;&lt;span class="kwrd"&gt;=&lt;a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&gt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&lt;/a&gt;&lt;/span&gt;&lt;span class="attr"&gt;&lt;br /&gt; xmlns:rdfs&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://www.w3.org/2000/01/rdf-schema#&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdf:Description&lt;/span&gt; &lt;span class="attr"&gt;rdf:about&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;foo:MyCustomOntology&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdf:type&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdf:Description&lt;/span&gt; &lt;span class="attr"&gt;rdf:about&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://www.w3.org/2002/07/owl#&lt;br /&gt;Ontology&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;rdf:type&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdfs:comment&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;My Custom Ontology example for extending &lt;br /&gt;ImageEssenceFormat&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;rdfs:comment&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;owl:imports&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdf:Description&lt;/span&gt; &lt;span class="attr"&gt;rdf:about&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/imm/2.0/core/&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;owl:imports&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;owl:versionInfo&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1.0&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;owl:versionInfo&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;rdf:Description&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;rdf:RDF&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;First you need to define the new property that you want to add. In this case, I am adding the XMP Rating property as a new DatatypeProperty of type integer.&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdf:Description&lt;/span&gt; &lt;span class="attr"&gt;rdf:about&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://ns.adobe.com/xap/1.0/Rating&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdf:type&lt;/span&gt; &lt;span class="attr"&gt;rdf:resource&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://www.w3.org/2002/07/owl#&lt;br /&gt;DatatypeProperty&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdfs:comment&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;A number that indicates a document’s status relative to&lt;/pre&gt;

  &lt;pre&gt;other documents, used to organize documents in a file&lt;/pre&gt;

  &lt;pre class="alt"&gt;browser. Values are user-defined within an application defined&lt;/pre&gt;

  &lt;pre&gt;range.&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;rdfs:comment&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdfs:label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;Rating&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;rdfs:label&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdfs:range&lt;/span&gt; &lt;span class="attr"&gt;rdf:resource&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://www.w3.org/2001/XMLSchema#integer&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;rdf:Description&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;Next you need to add the property as a restriction on the ImageEssenceFormat class.&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdf:Description&lt;/span&gt; &lt;span class="attr"&gt;rdf:about&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/imm/2.0/core/&lt;br /&gt;ImageEssenceFormat&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdfs:subClassOf&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdf:Description&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;owl:maxCardinality&lt;/span&gt; &lt;span class="attr"&gt;rdf:datatype&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://www.w3.org/&lt;br /&gt;2001/XMLSchema#nonNegativeInteger&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;owl:maxCardinality&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;owl:onProperty&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdf:Description&lt;/span&gt; &lt;span class="attr"&gt;rdf:about&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://ns.adobe.com/&lt;br /&gt;xap/1.0/Rating&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;owl:onProperty&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;                &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdf:type&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;                    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;rdf:Description&lt;/span&gt; &lt;span class="attr"&gt;rdf:about&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://www.w3.org/2002/&lt;br /&gt;07/owl#Restriction&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;                &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;rdf:type&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;            &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;rdf:Description&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;rdfs:subClassOf&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;rdf:Description&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;



.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;Now, if I regenerate my ontology class using the Visual Studio tools, I will have a new Rating property on my ImageEssenceFormat class. I can now deserialize the RDF/XML from the GetMetadata call to Media Services and it will populate this new Rating property if the image has an XMP Rating value stored on it.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9041809" width="1" height="1"&gt;</content><author><name>johndeu</name><uri>http://blogs.msdn.com/members/johndeu.aspx</uri></author><category term="IMM" scheme="http://blogs.msdn.com/imm/archive/tags/IMM/default.aspx" /><category term="RDF" scheme="http://blogs.msdn.com/imm/archive/tags/RDF/default.aspx" /><category term="metadata" scheme="http://blogs.msdn.com/imm/archive/tags/metadata/default.aspx" /><category term="Media Services" scheme="http://blogs.msdn.com/imm/archive/tags/Media+Services/default.aspx" /><category term="MetadataPolicy" scheme="http://blogs.msdn.com/imm/archive/tags/MetadataPolicy/default.aspx" /><category term="XMP" scheme="http://blogs.msdn.com/imm/archive/tags/XMP/default.aspx" /><category term="WIC" scheme="http://blogs.msdn.com/imm/archive/tags/WIC/default.aspx" /><category term="EXIF" scheme="http://blogs.msdn.com/imm/archive/tags/EXIF/default.aspx" /></entry><entry><title>Join us in LA at the Henry Stewart DAM Conference</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/imm/archive/2008/10/31/join-us-in-la-at-the-henry-stewart-dam-conference.aspx" /><id>http://blogs.msdn.com/imm/archive/2008/10/31/join-us-in-la-at-the-henry-stewart-dam-conference.aspx</id><published>2008-10-31T19:07:00Z</published><updated>2008-10-31T19:07:00Z</updated><content type="html">&lt;P style="MARGIN: 0in 0in 0pt" class=MsoNormal&gt;&lt;FONT size=3 face=Calibri&gt;&lt;STRONG&gt;&lt;U&gt;Henry Stewart&lt;/U&gt;&lt;/STRONG&gt; is a briefing and networking event focused on digital asset management. We will be attending the Los Angeles, CA&amp;nbsp;briefing event, with a presentation focused on showing how companies can streamline the creation, management, and delivery of content, “&lt;STRONG&gt;Integrating DAM with Distribution Tools to Build and Effective Digital Supply Chain&lt;/STRONG&gt;,” &lt;SPAN style="COLOR: #404040"&gt;&amp;lt;Monday, Nov. 10&lt;SUP&gt;th&lt;/SUP&gt; @ 4:30pm&amp;gt;&lt;/SPAN&gt; by &lt;B&gt;Jake Winett&lt;/B&gt; – M&amp;amp;E Global Industry Manager. And a session focused on the productive use of workflow to bridge process gaps, “&lt;STRONG&gt;How Our Workflow has Been Made More Productive&lt;/STRONG&gt;,” &lt;SPAN style="COLOR: #404040"&gt;&amp;lt;Monday, Nov. 10&lt;SUP&gt;th&lt;/SUP&gt; @ 10am&amp;gt;&lt;/SPAN&gt; presented by &lt;B&gt;Mark Kashman&lt;/B&gt; -- IMM Product Manager. If you plan to be at the conference, or are in the area, come tap us on the shoulder. We are open to any side meetings/conversations you'd like to coordinate - send any requests to &lt;A href="mailto:IMMAsk@microsoft.com"&gt;IMMAsk@microsoft.com&lt;/A&gt;. For more information on the Henry Stewart DAM LA conference, click &lt;A title="Henry Stewart DAM Conference LA" target=_blank href="http://www.damusers.com/events/about.php?eventid=4" mce_href="http://www.damusers.com/events/about.php?eventid=4"&gt;here&lt;/A&gt;. And for the official brochure, click &lt;A title="Official Henry Stewart Conference Brochure" target=_blank href="http://www.damusers.com/events/brochures/DAM%20LA%2008.pdf" mce_href="http://www.damusers.com/events/brochures/DAM%20LA%2008.pdf"&gt;here&lt;/A&gt;.&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9026877" width="1" height="1"&gt;</content><author><name>mkashman</name><uri>http://blogs.msdn.com/members/mkashman.aspx</uri></author></entry><entry><title>Advanced SPARQL in IMM</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/imm/archive/2008/10/28/advanced-sparql-in-imm.aspx" /><id>http://blogs.msdn.com/imm/archive/2008/10/28/advanced-sparql-in-imm.aspx</id><published>2008-10-28T15:02:00Z</published><updated>2008-10-28T15:02:00Z</updated><content type="html">&lt;p&gt;Today I would like to profile an advanced &lt;a href="http://www.w3.org/TR/rdf-sparql-query/"&gt;SPARQL&lt;/a&gt; query, break it down, and explain how each part works.&lt;/p&gt;  &lt;h5&gt;The Query:&lt;/h5&gt;  &lt;blockquote&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;with&lt;/span&gt; (
      &lt;span class="kwrd"&gt;select&lt;/span&gt; &lt;font color="#ff0000"&gt;?entityIdIn ?highestTypeOut&lt;/font&gt;
      {
            { &lt;font color="#ff0000"&gt;?entityIdIn &lt;font color="#400000"&gt;rdf:type&lt;/font&gt; ?highestTypeOut&lt;/font&gt;.  }
            &lt;span class="kwrd"&gt;&lt;font color="#408080"&gt;not&lt;/font&gt;&lt;/span&gt;() {
               &lt;font color="#ff0000"&gt;?entityIdIn&lt;/font&gt; rdf:type &lt;font color="#ff0000"&gt;?hType&lt;/font&gt;.
               &lt;font color="#ff0000"&gt;?hType&lt;/font&gt; rdfs:subClassOf &lt;font color="#ff0000"&gt;?highestTypeOut&lt;/font&gt;.
            }
      } &lt;span class="kwrd"&gt;as&lt;/span&gt; :getMostSpecificType
)

&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; &lt;font color="#ff0000"&gt;?title ?rdfType&lt;/font&gt;
&lt;span class="kwrd"&gt;WHERE&lt;/span&gt;
{     
      &lt;font color="#ff0000"&gt;?entityId ?predicate ?title&lt;/font&gt;.    
      { :getMostSpecificType(&lt;font color="#ff0000"&gt;?entityId&lt;/font&gt;, &lt;font color="#ff0000"&gt;?rdfType&lt;/font&gt;) }
      &lt;font color="#0000ff"&gt;FILTER&lt;/font&gt;(:&lt;span class="kwrd"&gt;&lt;font color="#408080"&gt;contains&lt;/font&gt;&lt;/span&gt;(&lt;font color="#ff0000"&gt;?title&lt;/font&gt;, &lt;span class="str"&gt;'Superman'&lt;/span&gt;))
}&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;style type="text/css"&gt;




.csharpcode {
	background-color: #ffffff; font-family: consolas, "Courier New", courier, monospace; color: black; font-size: small
}
.csharpcode pre {
	background-color: #ffffff; font-family: consolas, "Courier New", courier, monospace; color: black; font-size: small
}
.csharpcode pre {
	margin: 0em
}
.csharpcode .rem {
	color: #008000
}
.csharpcode .kwrd {
	color: #0000ff
}
.csharpcode .str {
	color: #006080
}
.csharpcode .op {
	color: #0000c0
}
.csharpcode .preproc {
	color: #cc6633
}
.csharpcode .asp {
	background-color: #ffff00
}
.csharpcode .html {
	color: #800000
}
.csharpcode .attr {
	color: #ff0000
}
.csharpcode .alt {
	background-color: #f4f4f4; margin: 0em; width: 100%
}
.csharpcode .lnum {
	color: #606060
}&lt;/style&gt;

&lt;h5&gt;Overview&lt;/h5&gt;

&lt;p&gt;In essence, this query is searching every entity in the store and returns those entities where a property contains the word “Superman.” It also finds and returns the &lt;em&gt;most specific type &lt;/em&gt;of each result. The purpose of this query is simple: to allow a user to search for a single term and find any resultant entities, regardless of their type or their schema. &lt;/p&gt;

&lt;p&gt;In the results below, a number of different entities are returned: videos, clips, containers, and even resources.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/AdvancedSPARQLFunctionsandNegation_AB02/image_2.png"&gt;&lt;img style="display: inline" title="SPARQL results" border="0" alt="SPARQL results" src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/AdvancedSPARQLFunctionsandNegation_AB02/image_thumb.png" width="486" height="183" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h5&gt;Inference Rules&lt;/h5&gt;

&lt;p&gt;The “&lt;font color="#0000ff" face="Consolas"&gt;with&lt;/font&gt;” clause provides the ability to specify custom inference rules within a SPARQL query. In this case, we have a named rule that returns the most derivative (specific) type of the supplied entity. Since &lt;a href="http://www.w3.org/TR/rdf-sparql-query/#defn_QueryVariable"&gt;SPARQL variables&lt;/a&gt; either act as constraints or as variables depending on whether they are bound or unbound, I have suffixed “in” and “out” to make it clear how each is expected to be used. Calling the rule is simple. It is important to note that the results of this rule are not optional. Therefore, all returned entities must have at least one &lt;a href="http://www.w3.org/TR/rdf-sparql-query/#abbrevRdfType"&gt;rdf:type&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;{ :getMostSpecificType(&lt;font color="#ff0000"&gt;?entityId&lt;/font&gt;, &lt;font color="#ff0000"&gt;?rdfType&lt;/font&gt;) } &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h5&gt;Negation&lt;/h5&gt;

&lt;p&gt;The idea of negation is simple. The solution is the result of a graph pattern which is negatively constrained against the results of another graph pattern.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;{&amp;#160; &lt;font color="#ff0000"&gt;?entityIdIn &lt;font color="#400000"&gt;rdf:type&lt;/font&gt; ?highestTypeOut&lt;/font&gt;.&amp;#160; } 

    &lt;br /&gt;&lt;span class="kwrd"&gt;&lt;font color="#408080"&gt;not&lt;/font&gt;&lt;/span&gt;()&amp;#160; { 

    &lt;br /&gt;&lt;font color="#ff0000"&gt;&amp;#160;&amp;#160; ?entityIdIn&lt;/font&gt; rdf:type &lt;font color="#ff0000"&gt;?hType&lt;/font&gt;. 

    &lt;br /&gt;&lt;font color="#ff0000"&gt;&amp;#160;&amp;#160; ?hType&lt;/font&gt; rdfs:subClassOf &lt;font color="#ff0000"&gt;?highestTypeOut&lt;/font&gt;. 

    &lt;br /&gt;} &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Expressed in English: “Any triple where the subject is ?entityIdIn and the predicate is rdf:type &lt;strong&gt;EXCEPT&lt;/strong&gt; where the same triple exists in the following graph pattern: any triple where the subject is ?entityIdIn and the predicate is rdf:type &lt;strong&gt;AND&lt;/strong&gt; the resultant type is a subclass of another resultant type.” Whew. Put more simply: “Bind ?highestTypeOut to the rdf:type which &lt;strong&gt;has no derivative types&lt;/strong&gt;.” This is an example of using &lt;em&gt;negation&lt;/em&gt; to constrain the results of a &lt;a href="http://www.w3.org/TR/rdf-sparql-query/#GroupPatterns"&gt;graph pattern&lt;/a&gt;.&lt;/p&gt;

&lt;h5&gt;Full Text Search&lt;/h5&gt;

&lt;p&gt;The :contains function provides support for &lt;a href="http://msdn.microsoft.com/en-us/library/ms142571.aspx"&gt;SQL full-text queries&lt;/a&gt; in a SPARQL filter. This is the most performant method of querying for specific text. In addition to simple word matching seen in the query above, advanced features of full-text can be used. For example, we can search for different inflections of the word “ship” by using the following:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;&lt;font color="#0000ff"&gt;FILTER&lt;/font&gt;(:&lt;font color="#408080"&gt;contains&lt;/font&gt;(&lt;font color="#ff0000"&gt;?title&lt;/font&gt;, 'FORMSOF(INFLECTIONAL, \&amp;quot;ship\&amp;quot;)')) &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;font size="2" face="Tah"&gt;This will return results with values such as “ships,” “shipped,” and “shipping.”&lt;/font&gt;&lt;/p&gt;

&lt;h5&gt;Other Thoughts&lt;/h5&gt;

&lt;p&gt;&lt;font size="2"&gt;As mentioned in &lt;a href="http://blogs.msdn.com/imm/archive/2008/10/23/migrating-code-to-imm-2-0.aspx"&gt;my previous post&lt;/a&gt;, the “rdf” and “rdfs” prefixes used in this query are handled automatically by IMM. Additionally, this query uses the ontology graph to determine class derivation. An enterprising developer could utilize more facts from the ontology to enhance the results of the query. For example, he/she could return the friendly name (rdfs:label) for a type instead of the type’s URI.&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9020887" width="1" height="1"&gt;</content><author><name>derbaron</name><uri>http://blogs.msdn.com/members/derbaron.aspx</uri></author><category term="SPARQL" scheme="http://blogs.msdn.com/imm/archive/tags/SPARQL/default.aspx" /><category term="OWL" scheme="http://blogs.msdn.com/imm/archive/tags/OWL/default.aspx" /><category term="RDF" scheme="http://blogs.msdn.com/imm/archive/tags/RDF/default.aspx" /><category term="metadata" scheme="http://blogs.msdn.com/imm/archive/tags/metadata/default.aspx" /></entry><entry><title>Migrating Code to IMM 2.0</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/imm/archive/2008/10/23/migrating-code-to-imm-2-0.aspx" /><id>http://blogs.msdn.com/imm/archive/2008/10/23/migrating-code-to-imm-2-0.aspx</id><published>2008-10-24T01:49:00Z</published><updated>2008-10-24T01:49:00Z</updated><content type="html">&lt;P mce_keep="true"&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt;Many areas of the IMM SDK have been vastly improved in version 2. The most common operations have been streamlined and simplified. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt;The sample below demonstrates some differences in using the new IMM SDK, as well as highlights the improvements we have&amp;nbsp;made in this release. The example scenario is a method that returns the title of every video in the Semantic Metadata Store by executing a &lt;A href="http://www.w3.org/TR/rdf-sparql-query/" mce_href="http://www.w3.org/TR/rdf-sparql-query/"&gt;SPARQL&lt;/A&gt; query.&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt;In version 1:&lt;BR&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 8pt; mso-fareast-font-family: Calibri; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin; mso-bidi-language: AR-SA"&gt;(Contributed by MCS Architect extraordinaire, Jackie Nichols)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;DIV style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 1pt; PADDING-LEFT: 4pt; PADDING-RIGHT: 4pt; BACKGROUND: #f2f2f2; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 1pt; mso-element: para-border-div; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242"&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;private&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;DataTable&lt;/SPAN&gt; GetAllVideoes()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; strQuery = &lt;SPAN style="COLOR: #a31515"&gt;@"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;PREFIX dc:&amp;nbsp; &amp;lt;&lt;SPAN class=attribute-value&gt;http://purl.org/dc/elements/1.1/&amp;gt;&lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;PREFIX imm: &amp;lt;http://schemas.microsoft.com/imm/core/1.0#&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;PREFIX rdf: &amp;lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;SELECT ?videoItem ?videoTitle WHERE {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;?videoId rdf:type imm:VideoItem.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;?videoId dc:title ?videoTitle.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}"&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;bool&lt;/SPAN&gt; isSparqlXml;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;XmlDocument&lt;/SPAN&gt; resultXml = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;XmlDocument&lt;/SPAN&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;DataTable&lt;/SPAN&gt; returnTable = &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; (&lt;SPAN style="COLOR: #2b91af"&gt;Impersonator&lt;/SPAN&gt;.ImpersonateAppPool())&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; (DamServiceClient dsc = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; DamServiceClient(&lt;SPAN style="COLOR: #a31515"&gt;"DamEndpoint"&lt;/SPAN&gt;))&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;QueryRequest&lt;/SPAN&gt; request = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;QueryRequest&lt;/SPAN&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;request.IsSparql = &lt;SPAN style="COLOR: blue"&gt;true&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;request.Query = strQuery;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;QueryResponse&lt;/SPAN&gt; response = dsc.Query(request);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;isSparqlXml = response.IsSparqlXml;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;resultXml.LoadXml(response.Result);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if&lt;/SPAN&gt; (isSparqlXml)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;returnTable = &lt;SPAN style="COLOR: #2b91af"&gt;SparqlResult&lt;/SPAN&gt;.ToDataTable(resultXml.CreateNavigator());&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TripleCollection&lt;/SPAN&gt; trips = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;TripleCollection&lt;/SPAN&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;trips.Load(resultXml.CreateNavigator(), &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;returnTable = trips.ToDataTable();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; returnTable;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P style="LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&lt;BR&gt;&lt;/SPAN&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt;Version 2:&lt;BR style="mso-special-character: line-break"&gt;&lt;BR style="mso-special-character: line-break"&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 10pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV style="BORDER-BOTTOM: windowtext 1pt solid; BORDER-LEFT: windowtext 1pt solid; PADDING-BOTTOM: 1pt; PADDING-LEFT: 4pt; PADDING-RIGHT: 4pt; BACKGROUND: #f2f2f2; BORDER-TOP: windowtext 1pt solid; BORDER-RIGHT: windowtext 1pt solid; PADDING-TOP: 1pt; mso-element: para-border-div; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242"&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: blue; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;private&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt; &lt;SPAN style="COLOR: blue"&gt;static&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;DataTable&lt;/SPAN&gt; GetAllVideoes()&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt; strQuery = &lt;SPAN style="COLOR: #a31515"&gt;@"&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;SELECT ?videoItem ?videoTitle WHERE {&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;?videoId rdf:type imm:VideoItem.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;?videoId dc:title ?videoTitle.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; COLOR: #a31515; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}"&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;DataTable&lt;/SPAN&gt; returnTable = &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; (&lt;SPAN style="COLOR: #2b91af"&gt;Impersonator&lt;/SPAN&gt;.ImpersonateAppPool())&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;using&lt;/SPAN&gt; (&lt;SPAN style="COLOR: #2b91af"&gt;ReadClient&lt;/SPAN&gt; dsc = &lt;SPAN style="COLOR: blue"&gt;new&lt;/SPAN&gt; &lt;SPAN style="COLOR: #2b91af"&gt;ReadClient&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #a31515"&gt;"Read"&lt;/SPAN&gt;))&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Table&lt;/SPAN&gt; response = dsc.Query(strQuery);&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;returnTable = response.ToDataTable();&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; LINE-HEIGHT: normal; MARGIN: 0in 0in 0pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-layout-grid-align: none; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;return&lt;/SPAN&gt; returnTable;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; MARGIN: 0in 0in 10pt; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BACKGROUND: #f2f2f2; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0in; mso-border-alt: solid windowtext .5pt; mso-background-themecolor: background1; mso-background-themeshade: 242; mso-padding-alt: 1.0pt 4.0pt 1.0pt 4.0pt" class=MsoNormal&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; FONT-SIZE: 8pt; mso-no-proof: yes"&gt;}&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 8pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 8pt"&gt;&lt;o:p&gt;&lt;FONT face=Calibri&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 10pt" class=MsoNormal&gt;&lt;B style="mso-bidi-font-weight: normal"&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt;Let me highlight some of&amp;nbsp;the differences:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpFirst&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Symbol; FONT-SIZE: 10pt; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt;&lt;STRONG&gt;Prefixes&lt;/STRONG&gt; - Many common namespaces are handled automatically. In this example, therefore, I can use the QNames for &lt;A href="http://www.w3.org/RDF/"&gt;RDF&lt;/A&gt;, &lt;A href="http://dublincore.org/"&gt;Dublin Core&lt;/A&gt;, and IMM without defining the full namespace in my query.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpMiddle&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Symbol; FONT-SIZE: 10pt; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt;&lt;STRONG&gt;Table&lt;/STRONG&gt; -&amp;nbsp;The&amp;nbsp;&lt;EM&gt;Table&lt;/EM&gt; class is an intermediary object that stores RDF&amp;nbsp;values coming from the IMM Semantic Metadata Store.&amp;nbsp; (Note: Powerful things can be done with a "&lt;EM&gt;Table&lt;/EM&gt;." I will revisit Table soon.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1" class=MsoListParagraphCxSpLast&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: Symbol; FONT-SIZE: 10pt; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;SPAN style="mso-list: Ignore"&gt;·&lt;SPAN style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="LINE-HEIGHT: 115%; FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 10pt"&gt;&lt;STRONG&gt;QueryRequest&lt;/STRONG&gt; - It still exists as &lt;EM&gt;SparqlQueryRequest&lt;/EM&gt;. There is an overload on &lt;EM&gt;Query&lt;/EM&gt;, however, that allows you to just specify the SPARQL command text. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9013912" width="1" height="1"&gt;</content><author><name>derbaron</name><uri>http://blogs.msdn.com/members/derbaron.aspx</uri></author><category term="IMM" scheme="http://blogs.msdn.com/imm/archive/tags/IMM/default.aspx" /><category term="SPARQL" scheme="http://blogs.msdn.com/imm/archive/tags/SPARQL/default.aspx" /><category term="RDF" scheme="http://blogs.msdn.com/imm/archive/tags/RDF/default.aspx" /><category term="SDK" scheme="http://blogs.msdn.com/imm/archive/tags/SDK/default.aspx" /></entry><entry><title>Importing and Exporting RDF Ntriples from IMM</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/imm/archive/2008/10/22/importing-and-exporting-rdf-ntriples-from-imm.aspx" /><id>http://blogs.msdn.com/imm/archive/2008/10/22/importing-and-exporting-rdf-ntriples-from-imm.aspx</id><published>2008-10-22T21:23:01Z</published><updated>2008-10-22T21:23:01Z</updated><content type="html">&lt;p&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="3"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="3"&gt;A question that always comes up is how to bulk export and bulk import raw nTriples or RDF/XML into and out of the IMM Semantic Store.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="3"&gt;Its actually quite simple.&amp;#160; You should open up the RDFQA.exe application in the %Program Files%\Microsoft Interactive Media Manager\Semantic Metadata Store folder, connect to your database, and then execute the following commands.&lt;/font&gt;&lt;/p&gt;  &lt;pre class="csharpcode"&gt;USE IMM;  Export data &lt;span class="kwrd"&gt;as&lt;/span&gt; [c:/backup/mydata.rdf]; 
&lt;span class="kwrd"&gt;var&lt;/span&gt; datas = &lt;span class="kwrd"&gt;new&lt;/span&gt; DataSource(&lt;span class="str"&gt;&amp;quot;inet?url=C:\\back&lt;/span&gt;&lt;span class="str"&gt;up\\mydata.rdf.1&amp;amp;&lt;br /&gt;            parsetype=ntriples&amp;quot;&lt;/span&gt;); 
&lt;span class="rem"&gt;//insert  {?p ?s ?o} into data using #datas where {?p ?s ?o}; &lt;/span&gt;
LOAD {?p ?s ?o} INTO data USING #datas;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/pre&gt;

&lt;p&gt;&lt;font size="3"&gt;As you notice here I commented out the insert command. Insert can be used for small loads, but for larger bulk loads of nTriples or rdf/xml you should use the &lt;font face="Courier New"&gt;LOAD&lt;/font&gt; command.&amp;#160; The &lt;font face="Courier New"&gt;LOAD&lt;/font&gt; command is targeted at bulk imports. &lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="3"&gt;To parse ntriples, set the &lt;font face="Courier New"&gt;parsetype=ntriples&lt;/font&gt;.&amp;#160; For Rdf/XML set the &lt;font face="Courier New"&gt;parsetype=rdf.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="3"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9011466" width="1" height="1"&gt;</content><author><name>johndeu</name><uri>http://blogs.msdn.com/members/johndeu.aspx</uri></author><category term="IMM" scheme="http://blogs.msdn.com/imm/archive/tags/IMM/default.aspx" /><category term="RDF" scheme="http://blogs.msdn.com/imm/archive/tags/RDF/default.aspx" /><category term="SDK" scheme="http://blogs.msdn.com/imm/archive/tags/SDK/default.aspx" /><category term="Bulk" scheme="http://blogs.msdn.com/imm/archive/tags/Bulk/default.aspx" /><category term="nTriples" scheme="http://blogs.msdn.com/imm/archive/tags/nTriples/default.aspx" /><category term="Load" scheme="http://blogs.msdn.com/imm/archive/tags/Load/default.aspx" /></entry><entry><title>IMM's Metadata Model: a 2min. 18sec. vidcast</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/imm/archive/2008/08/20/imm-s-metadata-model-a-2min-18sec-vidcast.aspx" /><id>http://blogs.msdn.com/imm/archive/2008/08/20/imm-s-metadata-model-a-2min-18sec-vidcast.aspx</id><published>2008-08-20T22:28:00Z</published><updated>2008-08-20T22:28:00Z</updated><content type="html">&lt;SPAN style="LAYOUT-GRID-MODE: line; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-family: Arial; mso-ansi-language: EN-US; mso-fareast-language: EN-GB"&gt;&lt;FONT size=3&gt;
&lt;P style="MARGIN: 0in 0in 6pt; LINE-HEIGHT: normal" class=MsoNormal&gt;&lt;SPAN style="LAYOUT-GRID-MODE: line; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'; mso-fareast-language: EN-GB"&gt;IMM is designed to enable users who work with rich media to ingest, manage, edit, and distribute content. While IMM is based on Office SharePoint Server 2007 and offers collaborative, enterprise content management, and search capabilities, IMM is designed specifically to work with media files, and has been modified to integrate with the wider media industry. Key to this is the addition of the IMM Semantic Metadata Store. IMM uses Semantic Web technologies to express, interchange, store and search media asset metadata. This is because RDF and OWL enable developers and users to add business specific and technical information to media assets. In the below vidcast, &lt;STRONG&gt;John Deutscher&lt;/STRONG&gt; - Group Program Manager, spends a few minutes drilling into the IMM metadata model and reasons behind the decision to use the &lt;A class="" title="RDF primer from W3C website" href="http://www.w3.org/2001/09/rdfprimer/rdf-primer-20030119.html" mce_href="http://www.w3.org/2001/09/rdfprimer/rdf-primer-20030119.html"&gt;RDF standard&lt;/A&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;IFRAME style="WIDTH: 500px; HEIGHT: 340px" src="http://silverlight.services.live.com/invoke/67617/The%20Interactive%20Media%20Manager%20metadata%20model%20(Aug%202008)/iframe.html" frameBorder=0 scrolling=no&gt;&lt;/IFRAME&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8882090" width="1" height="1"&gt;</content><author><name>mkashman</name><uri>http://blogs.msdn.com/members/mkashman.aspx</uri></author><category term="IMM" scheme="http://blogs.msdn.com/imm/archive/tags/IMM/default.aspx" /><category term="OWL" scheme="http://blogs.msdn.com/imm/archive/tags/OWL/default.aspx" /><category term="RDF" scheme="http://blogs.msdn.com/imm/archive/tags/RDF/default.aspx" /><category term="interactive media manager" scheme="http://blogs.msdn.com/imm/archive/tags/interactive+media+manager/default.aspx" /><category term="model" scheme="http://blogs.msdn.com/imm/archive/tags/model/default.aspx" /><category term="metadata" scheme="http://blogs.msdn.com/imm/archive/tags/metadata/default.aspx" /></entry><entry><title>IMM @ NAB 2008 (DEMO video)</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/imm/archive/2008/05/22/imm-nab-2008-demo-video.aspx" /><id>http://blogs.msdn.com/imm/archive/2008/05/22/imm-nab-2008-demo-video.aspx</id><published>2008-05-22T02:24:00Z</published><updated>2008-05-22T02:24:00Z</updated><content type="html">&lt;P&gt;We were recently in Las Vegas for the National Association of Broadcaster's (NAB) convention 2008 and produced a simple 19 minute video that shows the DEMO we presented. &lt;FONT face=Verdana&gt;Eric Schoonover, Lead Solution Architect, takes you on the full tour of IMM v2.0 as it was shown at NAB 2008 (beta 1). This includes the IMM Silverlight-based Rough-Cut Editor, updated Media Library, project site creation, metadata management, Silverlight Inking, Media Services (based on WIC) and more.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;Great conference, had a blast! Check it out:&lt;/FONT&gt;&lt;/P&gt;&lt;IFRAME style="WIDTH: 500px; HEIGHT: 375px" src="http://silverlight.services.live.com/invoke/67617/NAB2008-IMM/iframe.html" frameBorder=0 scrolling=no mce_src="http://silverlight.services.live.com/invoke/67617/NAB2008-IMM/iframe.html"&gt;&lt;/IFRAME&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;BR&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8530461" width="1" height="1"&gt;</content><author><name>mkashman</name><uri>http://blogs.msdn.com/members/mkashman.aspx</uri></author><category term="NAB" scheme="http://blogs.msdn.com/imm/archive/tags/NAB/default.aspx" /></entry><entry><title>Service Oriented Media Enterprise</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/imm/archive/2008/04/22/service-oriented-media-enterprise.aspx" /><id>http://blogs.msdn.com/imm/archive/2008/04/22/service-oriented-media-enterprise.aspx</id><published>2008-04-22T19:28:46Z</published><updated>2008-04-22T19:28:46Z</updated><content type="html">&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Another NAB down, this has to be my 11th or 12th show and it's starting to feel a bit repetitive.&amp;#160; One thing that did perk my interest at this year's show was a book.&amp;#160;&amp;#160; I always look forward to visiting the NAB book store to see what is new and pick up one of the latest broadcast reference compilations, but this time I spotted something different. &lt;/p&gt;  &lt;p&gt;Since 2005, my team has been working to push web services standards into the broadcast and media industries on behalf of Microsoft. The first iteration of that was a project called Connected Services Framework for Media. My current project is an asset management system based on web services and Semantic Web standards called Interactive Media Manager.&amp;#160; Throughout the journey I have met many smart people at NAB, but I have always looked forward to running into those who shared a similar, IT-based vision of the future for the M&amp;amp;E market.&amp;#160; &lt;/p&gt;  &lt;p&gt;I was so pleased when I saw John Footen's and Joey Faust's new book &amp;quot;&lt;a href="http://www.amazon.com/Service-Oriented-Media-Enterprise-Professional-Technology/dp/0240809777/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1208879965&amp;amp;sr=8-1"&gt;The Service Oriented Media Enterprise&lt;/a&gt;&amp;quot;.&amp;#160; John is the Vice President of National TeleConsultants Software Solutions Group and high on my list of people that I wait to run into at NAB each year.&amp;#160; We don't always agree on which technology stack to use, but that is beside the point. The point is that the industry should begin to adopt more open standards that enable interoperability and ease of integration between systems in complex workflows.&amp;#160; This will lead to more manageable and reliable IT-based solutions in the broadcast industry. This is increasingly important as the whole industry moves to end-to-end file based workflows.&amp;#160; John is a strong believer in this vision of Web Services and I was also excited to see that on page 493 he and Joey also recognize the need for Semantics in a media SOA. &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;quot;Semantic standards and technologies attempt to capture the true, human-understandable meaning behind all of those countless metadata standards and models.&amp;quot;&lt;/p&gt;    &lt;p&gt;&amp;quot;The Semantic Web is a powerful idea that is taking the IT industry by storm. The M&amp;amp;E industry, since it already deals so heavily in the creative expression of data and meaning, should take note and find ways to leverage the semantic technologies currently out there to develop enhanced library and asset management systems.&amp;quot;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Thanks John for making my NAB a lot more interesting this year. &lt;/p&gt;  &lt;p&gt;- John Deutscher&amp;#160; (&lt;a href="mailto:john.deutscher@microsoft.com"&gt;john.deutscher@microsoft.com&lt;/a&gt;)&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8416818" width="1" height="1"&gt;</content><author><name>johndeu</name><uri>http://blogs.msdn.com/members/johndeu.aspx</uri></author></entry><entry><title>We're on Channel9</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/imm/archive/2008/04/01/we-re-on-channel9.aspx" /><id>http://blogs.msdn.com/imm/archive/2008/04/01/we-re-on-channel9.aspx</id><published>2008-04-01T20:07:00Z</published><updated>2008-04-01T20:07:00Z</updated><content type="html">&lt;P&gt;&lt;A class="" href="http://blogs.msdn.com/kaevans/archive/2008/03/30/digital-asset-management-and-imm.aspx" mce_href="http://blogs.msdn.com/kaevans/archive/2008/03/30/digital-asset-management-and-imm.aspx"&gt;Kirk Evans&lt;/A&gt; just put up an interview he did with Mark Kashman, IMM Product Manager, onto Channel9.&lt;/P&gt;
&lt;P&gt;&lt;A class="" href="http://channel9.msdn.com/ShowPost.aspx?PostID=393711" mce_href="http://channel9.msdn.com/ShowPost.aspx?PostID=393711"&gt;Check it out&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8348463" width="1" height="1"&gt;</content><author><name>aweiker</name><uri>http://blogs.msdn.com/members/aweiker.aspx</uri></author></entry><entry><title>Creating and extending OWL ontologies in IMM (Part 2 of 2)</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/imm/archive/2007/11/26/creating-and-extending-owl-ontologies-in-imm-part-2-of-2.aspx" /><id>http://blogs.msdn.com/imm/archive/2007/11/26/creating-and-extending-owl-ontologies-in-imm-part-2-of-2.aspx</id><published>2007-11-27T03:59:00Z</published><updated>2007-11-27T03:59:00Z</updated><content type="html">&lt;P&gt;A continuation from the Part 1 article on how to define new custom Ontologies for use in IMM.&lt;/P&gt;
&lt;P&gt;Once you have your properties and vocabulary defined, you now need to create classes to use those properties with. In IMM, there are a number of pre defined core classes that are used throughout the solution. Some examples of those include the VideoItem, AudioItem, and ImageItem classes. There are also some lower level base classes like MediaItem, Container, and Anchor that other classes can derive from.&amp;nbsp; Most classes in IMM Core derive from the base IMM Object class.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;To define your own classes, you have two choices, you can take an existing class such as VideoItem and add your own specific properties to it, or you can define your own custom class that is semantically different from the classes that IMM Core provides.&amp;nbsp; Your custom classes should derive from one of the core types whenever possible. &lt;/P&gt;
&lt;H4&gt;Defining new custom Classes in OWL&lt;/H4&gt;
&lt;P&gt;To define a new class in SemanticWorks, just switch to the Classes tab and select the insert owl:Class button at the top of the tab page. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMMPa_E551/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMMPa_E551/image_2.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=150 alt=image src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMMPa_E551/image_thumb.png" width=244 border=0 mce_src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMMPa_E551/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;For this example, I am going to create a new Container type called Catalog.&amp;nbsp; For sake of demonstration, I will define a Catalog as a virtual grouping of assets similar to a virtual folder in IMM, but in this case it may contain some more custom metadata and lets just say that it is semantically different than just a folder in the "Contoso" business rules.&lt;/P&gt;
&lt;P&gt;So this new class would look like this in the Classes tab page.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMMPa_E551/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMMPa_E551/image_4.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=69 alt=image src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMMPa_E551/image_thumb_1.png" width=361 border=0 mce_src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMMPa_E551/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since our new Catalog can contain pointers to assets or other containers, we must set it to derive from the did:Container class in the IMM Core ontology. &lt;/P&gt;
&lt;P&gt;To do so, click into the new cont:Catalog class and right click on the class.&amp;nbsp; Select the &lt;STRONG&gt;add Subclass of &lt;/STRONG&gt;menu option. Now, right click on the arrow subClassOf arrow and select &lt;STRONG&gt;add Class.&amp;nbsp; &lt;/STRONG&gt;From the drop down select the &lt;STRONG&gt;did:Container&lt;/STRONG&gt; class. &lt;/P&gt;
&lt;P&gt;You can now add custom properties and restrictions to this new class. I'll go back and create a new property called &lt;STRONG&gt;cont:ContainerName&lt;/STRONG&gt; in the Contoso namespace, set it to type xsd:string, and then add it to the &lt;STRONG&gt;cont:Catalog&lt;/STRONG&gt; class as a property restriction.&amp;nbsp; The final class should look like this.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMMPa_E551/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMMPa_E551/image_8.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=244 alt=image src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMMPa_E551/image_thumb_3.png" width=244 border=0 mce_src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMMPa_E551/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;That's all there is to it. You can now get a lot fancier with defining more semantic information about your classes and their equivalents, etc... &lt;/P&gt;
&lt;P&gt;Save the final OWL file for Contoso, and you should be able to generate .NET helper classes with the IMM 2.0 Visual Studio tools now. The tools will generate classes that derive from RdfObject tha can be used in IMM Workflows and your own custom web parts to create instances of RDF that will be valid within your custom ontology.&amp;nbsp; &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6538183" width="1" height="1"&gt;</content><author><name>johndeu</name><uri>http://blogs.msdn.com/members/johndeu.aspx</uri></author></entry></feed>