<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Interactive Media Manager Blog</title><link>http://blogs.msdn.com/b/imm/</link><description /><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>The IMM solution has been discontinued</title><link>http://blogs.msdn.com/b/imm/archive/2009/07/21/the-imm-solution-has-been-discontinued.aspx</link><pubDate>Wed, 22 Jul 2009 00:35:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9843947</guid><dc:creator>mkashman</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=9843947</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2009/07/21/the-imm-solution-has-been-discontinued.aspx#comments</comments><description>&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;</description></item><item><title>Updated Import Ontology script – replaces previous one in the install guide.</title><link>http://blogs.msdn.com/b/imm/archive/2008/12/08/updated-import-ontology-script-replaces-previous-one-in-the-install-guide.aspx</link><pubDate>Mon, 08 Dec 2008 23:35:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9185413</guid><dc:creator>johndeu</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=9185413</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2008/12/08/updated-import-ontology-script-replaces-previous-one-in-the-install-guide.aspx#comments</comments><description>&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;</description></item><item><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>http://blogs.msdn.com/b/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</link><pubDate>Mon, 08 Dec 2008 23:22:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9185389</guid><dc:creator>johndeu</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=9185389</wfw:commentRss><comments>http://blogs.msdn.com/b/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#comments</comments><description>&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;</description><category domain="http://blogs.msdn.com/b/imm/archive/tags/IMM/">IMM</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/SPARQL/">SPARQL</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/OWL/">OWL</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/RDF/">RDF</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/model/">model</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/metadata/">metadata</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/sw_5F00_Sparql/">sw_Sparql</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/Inference/">Inference</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/Graphs/">Graphs</category></item><item><title>Creating an ADO.NET DataService for RDF Entities in IMM</title><link>http://blogs.msdn.com/b/imm/archive/2008/12/04/creating-an-ado-net-dataservice-for-rdf-entities-in-imm.aspx</link><pubDate>Fri, 05 Dec 2008 05:46:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9178000</guid><dc:creator>johndeu</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=9178000</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2008/12/04/creating-an-ado-net-dataservice-for-rdf-entities-in-imm.aspx#comments</comments><description>&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;</description></item><item><title>Deleting all the triples in the IMM database</title><link>http://blogs.msdn.com/b/imm/archive/2008/11/26/deleting-all-the-triples-in-the-imm-database.aspx</link><pubDate>Wed, 26 Nov 2008 23:19:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9145239</guid><dc:creator>johndeu</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=9145239</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2008/11/26/deleting-all-the-triples-in-the-imm-database.aspx#comments</comments><description>&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;</description></item><item><title>Updated MetadataPolicy.xml Configuration File</title><link>http://blogs.msdn.com/b/imm/archive/2008/11/04/updated-metadatapolicy-xml-configuration-file.aspx</link><pubDate>Wed, 05 Nov 2008 01:26:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9041809</guid><dc:creator>johndeu</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=9041809</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2008/11/04/updated-metadatapolicy-xml-configuration-file.aspx#comments</comments><description>&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;</description><category domain="http://blogs.msdn.com/b/imm/archive/tags/IMM/">IMM</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/RDF/">RDF</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/metadata/">metadata</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/Media+Services/">Media Services</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/MetadataPolicy/">MetadataPolicy</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/XMP/">XMP</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/WIC/">WIC</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/EXIF/">EXIF</category></item><item><title>Join us in LA at the Henry Stewart DAM Conference</title><link>http://blogs.msdn.com/b/imm/archive/2008/10/31/join-us-in-la-at-the-henry-stewart-dam-conference.aspx</link><pubDate>Fri, 31 Oct 2008 19:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9026877</guid><dc:creator>mkashman</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=9026877</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2008/10/31/join-us-in-la-at-the-henry-stewart-dam-conference.aspx#comments</comments><description>&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;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9026877" width="1" height="1"&gt;</description></item><item><title>Advanced SPARQL in IMM</title><link>http://blogs.msdn.com/b/imm/archive/2008/10/28/advanced-sparql-in-imm.aspx</link><pubDate>Tue, 28 Oct 2008 15:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9020887</guid><dc:creator>derbaron</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=9020887</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2008/10/28/advanced-sparql-in-imm.aspx#comments</comments><description>&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;</description><category domain="http://blogs.msdn.com/b/imm/archive/tags/SPARQL/">SPARQL</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/OWL/">OWL</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/RDF/">RDF</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/metadata/">metadata</category></item><item><title>Migrating Code to IMM 2.0</title><link>http://blogs.msdn.com/b/imm/archive/2008/10/23/migrating-code-to-imm-2-0.aspx</link><pubDate>Fri, 24 Oct 2008 01:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9013912</guid><dc:creator>derbaron</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=9013912</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2008/10/23/migrating-code-to-imm-2-0.aspx#comments</comments><description>&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;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9013912" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/imm/archive/tags/IMM/">IMM</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/SPARQL/">SPARQL</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/RDF/">RDF</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/SDK/">SDK</category></item><item><title>Importing and Exporting RDF Ntriples from IMM</title><link>http://blogs.msdn.com/b/imm/archive/2008/10/22/importing-and-exporting-rdf-ntriples-from-imm.aspx</link><pubDate>Wed, 22 Oct 2008 21:23:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9011466</guid><dc:creator>johndeu</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=9011466</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2008/10/22/importing-and-exporting-rdf-ntriples-from-imm.aspx#comments</comments><description>&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;</description><category domain="http://blogs.msdn.com/b/imm/archive/tags/IMM/">IMM</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/RDF/">RDF</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/SDK/">SDK</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/Bulk/">Bulk</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/nTriples/">nTriples</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/Load/">Load</category></item><item><title>IMM's Metadata Model: a 2min. 18sec. vidcast</title><link>http://blogs.msdn.com/b/imm/archive/2008/08/20/imm-s-metadata-model-a-2min-18sec-vidcast.aspx</link><pubDate>Wed, 20 Aug 2008 22:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8882090</guid><dc:creator>mkashman</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=8882090</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2008/08/20/imm-s-metadata-model-a-2min-18sec-vidcast.aspx#comments</comments><description>&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;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8882090" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/imm/archive/tags/IMM/">IMM</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/OWL/">OWL</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/RDF/">RDF</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/interactive+media+manager/">interactive media manager</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/model/">model</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/metadata/">metadata</category></item><item><title>IMM @ NAB 2008 (DEMO video)</title><link>http://blogs.msdn.com/b/imm/archive/2008/05/22/imm-nab-2008-demo-video.aspx</link><pubDate>Thu, 22 May 2008 02:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8530461</guid><dc:creator>mkashman</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=8530461</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2008/05/22/imm-nab-2008-demo-video.aspx#comments</comments><description>&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;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8530461" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/imm/archive/tags/NAB/">NAB</category></item><item><title>Service Oriented Media Enterprise</title><link>http://blogs.msdn.com/b/imm/archive/2008/04/22/service-oriented-media-enterprise.aspx</link><pubDate>Tue, 22 Apr 2008 19:28:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8416818</guid><dc:creator>johndeu</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=8416818</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2008/04/22/service-oriented-media-enterprise.aspx#comments</comments><description>&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;</description></item><item><title>We're on Channel9</title><link>http://blogs.msdn.com/b/imm/archive/2008/04/01/we-re-on-channel9.aspx</link><pubDate>Tue, 01 Apr 2008 20:07:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8348463</guid><dc:creator>aweiker</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=8348463</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2008/04/01/we-re-on-channel9.aspx#comments</comments><description>&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;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8348463" width="1" height="1"&gt;</description></item><item><title>Creating and extending OWL ontologies in IMM (Part 2 of 2)</title><link>http://blogs.msdn.com/b/imm/archive/2007/11/26/creating-and-extending-owl-ontologies-in-imm-part-2-of-2.aspx</link><pubDate>Tue, 27 Nov 2007 03:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6538183</guid><dc:creator>johndeu</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=6538183</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2007/11/26/creating-and-extending-owl-ontologies-in-imm-part-2-of-2.aspx#comments</comments><description>&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;</description></item><item><title>Creating and extending OWL ontologies in IMM (Part 1 of 2)</title><link>http://blogs.msdn.com/b/imm/archive/2007/11/21/creating-and-extending-owl-ontologies-in-imm.aspx</link><pubDate>Thu, 22 Nov 2007 03:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6461441</guid><dc:creator>johndeu</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=6461441</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2007/11/21/creating-and-extending-owl-ontologies-in-imm.aspx#comments</comments><description>&lt;P&gt;Since IMM uses Semantic Web technologies like RDF. OWL, and SPARQL, it is a requirement to first set up a useful and meaningful metadata model that can be expressed using the Web Ontology Language (OWL) as the first step in deploying an IMM solution. &lt;/P&gt;
&lt;P&gt;The ontology is what defines and describes the data and relationships between everything that will be stored in the IMM Metadata Store.&amp;nbsp; Once you have your ontology defined you can use the IMM Visual Studio tools to generate .NET classes that can be used to populate data in the IMM Metadata Store and also build custom forms to collect metadata in a workflow.&lt;/P&gt;
&lt;H4&gt;Creating a new custom Ontology file&lt;/H4&gt;
&lt;P&gt;In order to create a new ontology for IMM, you must first have the IMM Core ontology and it's required imports available on your local machine. To do this, you can find all the core ontologies in the SDK folder of the IMM installation.&amp;nbsp; This is by default found at &lt;EM&gt;%Program Files (x86)%\Microsoft Interactive Media Manager 2008\SDK\Ontologies.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;You should copy the following core OWL files into a new working directory.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;IMM Core.owl &lt;/LI&gt;
&lt;LI&gt;Dublin Core Elements.owl &lt;/LI&gt;
&lt;LI&gt;Dublin Core Terms.owl &lt;/LI&gt;
&lt;LI&gt;Dublin Core Types.owl &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The reason you need the Dublin Core owl files, is that they are imported and used by the IMM Core Owl file.&lt;/P&gt;
&lt;P&gt;Create a new directory in your working path. For this discussion lets say I created a new folder on my C drive called &lt;STRONG&gt;c:\Owl\Contoso.&amp;nbsp; &lt;/STRONG&gt;Now I will copy the core Owl files into this new directory.&amp;nbsp; You should now have a folder that looks like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;A href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_4.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=101 alt=image src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_1.png" width=327 border=0 mce_src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Next create a new OWL file. In this case I will create a new blank file called Contoso.owl. I recommend that you use &lt;A href="http://www.altova.com/products/semanticworks/semantic_web_rdf_owl_editor.html" target=_blank mce_href="http://www.altova.com/products/semanticworks/semantic_web_rdf_owl_editor.html"&gt;Altova Semanticworks&lt;/A&gt; to do this, since that is what I will be using for the rest of this article to explain how to edit an OWL ontology. &lt;/P&gt;
&lt;P&gt;In SemanticWorks, select &lt;STRONG&gt;File-&amp;gt;New&lt;/STRONG&gt;, then save the file as Contoso.owl into your working directory - in my case c:\Owl\Contoso.&lt;/P&gt;
&lt;H4&gt;Defining your new Ontology and namespace&lt;/H4&gt;
&lt;P&gt;Next we will begin to define our new ontology.&amp;nbsp; In order to do this, we first need to set up a few things within SemanticWorks to make our lives easier.&lt;/P&gt;
&lt;P&gt;Namespace imports are not automatic in SemanticWorks so we need to set then in &lt;STRONG&gt;Tools-&amp;gt;Namespace Imports for RDF... &lt;/STRONG&gt;menu.&amp;nbsp; Once in the menu, click Add to create a new row. In this row you need to add the following to the Namespace column &lt;/P&gt;
&lt;P&gt;&lt;A title=http://schemas.microsoft.com/imm/core/1.0# href="http://schemas.microsoft.com/imm/core/1.0#" mce_href="http://schemas.microsoft.com/imm/core/1.0#"&gt;http://schemas.microsoft.com/imm/core/1.0#&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;In the Import File column, this should be the &lt;U&gt;absolute&lt;/U&gt; path to your IMM Core.owl file. It should look similar to mine.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_8.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=195 alt=image src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_3.png" width=526 border=0 mce_src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now we need to make sure that all of the IMM Uri prefixes are set up in SemanticWorks so that it will collapse the Uris down to easy to read prefixes. To do this, go to the &lt;STRONG&gt;Tools-&amp;gt;URIref Prefixes... &lt;/STRONG&gt;menu.&amp;nbsp; In this dialog box you should see 3 prefixes already set up - owl, rdf and rdfs. We will now add the IMM required prefixes. An easy way to do this is to open up the IMM Core.owl file and view the URIref Prefixes that are already configured there.&amp;nbsp; Here are all the settings required:&lt;/P&gt;
&lt;TABLE class="" cellSpacing=0 cellPadding=2 width=546 border=1&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=127&gt;&lt;STRONG&gt;Prefix&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD class="" vAlign=top width=417&gt;&lt;STRONG&gt;URI&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=124&gt;dc&lt;/TD&gt;
&lt;TD class="" vAlign=top width=417&gt;http://purl.org/dc/elements/1.1/&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=123&gt;dcterms&lt;/TD&gt;
&lt;TD class="" vAlign=top width=417&gt;http://purl.org/dc/terms/&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=122&gt;did&lt;/TD&gt;
&lt;TD class="" vAlign=top width=417&gt;urn:mpeg:mpeg21:2002:02-DIDMODEL-NS#&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=122&gt;dii&lt;/TD&gt;
&lt;TD class="" vAlign=top width=417&gt;urn:mpeg:mpeg21:2002:01-DII-NS#&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=122&gt;imm&lt;/TD&gt;
&lt;TD class="" vAlign=top width=417&gt;http://schemas.microsoft.com/imm/core/1.0#&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=122&gt;owl&lt;/TD&gt;
&lt;TD class="" vAlign=top width=417&gt;http://www.w3.org/2002/07/owl#&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=122&gt;rdf&lt;/TD&gt;
&lt;TD class="" vAlign=top width=417&gt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=122&gt;rdfs&lt;/TD&gt;
&lt;TD class="" vAlign=top width=417&gt;http://www.w3.org/2000/01/rdf-schema#&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD class="" vAlign=top width=122&gt;xsd&lt;/TD&gt;
&lt;TD class="" vAlign=top width=417&gt;http://www.w3.org/2001/XMLSchema#&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;Next you will need to define your own namespace for your custom ontology. This can be a URI that actually links to your OWL file on the Internet or just a reference urn if you like.&amp;nbsp; For my example ontology I have defined this namespace.&lt;/P&gt;
&lt;P&gt;http://www.contoso.com/imm/1.0#&lt;/P&gt;
&lt;P&gt;The namespace for your ontology must end in either a "#" or a "/" to be valid.&amp;nbsp; &lt;BR&gt;You should also add a prefix to the URIref Prefixes for your own namespace to make it easier to edit the ontology. In this case I added a &lt;STRONG&gt;cont &lt;/STRONG&gt;prefix for my namespace to the above list.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_10.png" mce_href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_10.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=237 alt=image src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_4.png" width=522 border=0 mce_src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_4.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now we will define the Ontology name, version, and import the IMM Core ontology. To do this, switch back to your custom ontology file in SemanticWorks and go to the "Ontologies" tab in the UI.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_12.png" mce_href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_12.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=56 alt=image src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_5.png" width=344 border=0 mce_src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_5.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;From here create a new owl:Ontology from the button in the Ontologies tab and name it exactly the same as your namespace. In my case &lt;STRONG&gt;http://www.contoso.com/imm/1.0#.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_14.png" mce_href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_14.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=105 alt=image src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_6.png" width=371 border=0 mce_src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_6.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;H4&gt;Importing the IMM Core Ontology&lt;/H4&gt;
&lt;P&gt;Select the button next to the namespace and right click on the new Ontology you defined. You will get a context menu with many options. From this menu select &lt;STRONG&gt;Add owl:imports. &lt;BR&gt;&lt;/STRONG&gt;Right click on the new owl:imports and select &lt;STRONG&gt;Add resource object.&amp;nbsp; &lt;/STRONG&gt;In the new resource object, you will enter the URI for the IMM Core ontology. &lt;/P&gt;
&lt;P&gt;Enter &lt;STRONG&gt;&lt;A href="http://schemas.microsoft.com/imm/core/1.0" mce_href="http://schemas.microsoft.com/imm/core/1.0"&gt;http://schemas.microsoft.com/imm/core/1.0&lt;/A&gt;#&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;It should now look like the following&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_18.png" mce_href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_18.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=59 alt=image src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_8.png" width=529 border=0 mce_src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_8.png"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Next right click on your Ontology name again and select &lt;STRONG&gt;Add owl:versionInfo&lt;/STRONG&gt;&amp;nbsp; then right click on the versionInfo node and select &lt;STRONG&gt;Add literal&lt;/STRONG&gt;.&amp;nbsp; Enter your desired version number here. In my case, I just used a simple "1.0" string.&lt;/P&gt;
&lt;P&gt;Your completed Ontology definition and imports should look like this. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_20.png" mce_href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_20.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=155 alt=image src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_9.png" width=532 border=0 mce_src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_9.png"&gt;&lt;/A&gt; &lt;BR&gt;If you select from the menu &lt;STRONG&gt;RDF/OWL-&amp;gt;Reload all imports&amp;nbsp; &lt;/STRONG&gt;you should see both your ontology and the IMM Core ontology listed in the Ontologies tab now. This means that you have successfully imported the core ontology. If you look at the source code in the Text tab at the bottom of the page, you should see this very simple OWL definition. Save your ontology so far.&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;SPAN style="COLOR: rgb(0,128,128)"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;
&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdf:RDF&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt; xmlns:Prefix0&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;="&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;urn:newURI&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt; xmlns:imm&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;="&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;http://schemas.microsoft.com/imm/core/1.0#&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt; &lt;BR&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;xmlns:owl&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;="&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;http://www.w3.org/2002/07/owl#&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt; &lt;BR&gt;xmlns:rdf&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;="&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt; &lt;BR&gt;xmlns:rdfs&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;="&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;http://www.w3.org/2000/01/rdf-schema#&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;
    &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdf:Description&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt; rdf:about&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;="&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;http://www.contoso.com/imm/1.0#&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;
        &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdf:type&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;
            &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdf:Description&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt; rdf:about&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;="&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;http://www.w3.org/2002/07/owl#Ontology&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;/&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;
        &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdf:type&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;
        &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdfs:comment&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;This is my comment about my sample ontology&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdfs:comment&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;
        &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdfs:label&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;Contoso Ontology&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdfs:label&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;
        &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;owl:imports&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;
            &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdf:Description&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt; rdf:about&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;="&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;http://schemas.microsoft.com/imm/core/1.0#&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;/&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;
        &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;owl:imports&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;
        &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;owl:versionInfo&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;1.0&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;owl:versionInfo&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;
    &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdf:Description&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;
&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdf:RDF&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;H4&gt;&amp;nbsp;&lt;/H4&gt;
&lt;H4&gt;Defining Custom Properties&lt;/H4&gt;
&lt;P&gt;Now that we have a new Ontology definition, version number, and the IMM Core imported, we are ready to begin to define our new Properties and Classes and extend the IMM Core classes where necessary.&lt;/P&gt;
&lt;P&gt;Go back to the RDF/OWL view by selecting the RDF/OWL button at the bottom of the page, exit out of your Ontology by clicking the Up button and then select the Properties tab. Here you should see a list of all the imported Dublin Core, IMM, and MPEG21 namespaces that are a part of the IMM Core ontology. &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_22.png" mce_href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_22.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=217 alt=image src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_10.png" width=398 border=0 mce_src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_10.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;There are two types of properties that can be defined in OWL.&amp;nbsp; One is a &lt;STRONG&gt;DatatypeProperty&lt;/STRONG&gt;, and the other is an &lt;STRONG&gt;ObjectProperty&lt;/STRONG&gt;. It's easy to think about how these work -Datatype properties are used to store actual literal values such as strings, integers, booleans, decimal, etc.... &lt;STRONG&gt;ObjectProperties &lt;/STRONG&gt;are used to point to other objects by URI. &lt;/P&gt;
&lt;P&gt;To define a basic Datatype Property, select the &lt;STRONG&gt;owl:DatatypeProperty&lt;/STRONG&gt; from the insert button in the Properties page.&amp;nbsp; You should see a new &lt;STRONG&gt;owl:DatatypeProperty &lt;/STRONG&gt;with a&lt;STRONG&gt; urn:unnamed-1&lt;/STRONG&gt; title on it. &lt;/P&gt;
&lt;P&gt;Edit the title to be the name of the property that you desire. In this case I will create a new property of type string called &lt;STRONG&gt;Artist. &lt;/STRONG&gt;To do so, I use my previously defined prefix, a colon, and then the name &lt;STRONG&gt;Artist &lt;/STRONG&gt;like this.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;cont:Artist&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;It is very important that you already added the URIref prefix to SemanticWorks as noted above, otherwise you will get an error later.&amp;nbsp; Switch to Text view and make certain that the full URI has been expanded in the &lt;STRONG&gt;rdf:about &lt;/STRONG&gt;property for this new item. If it has not been expanded, than you probably entered the property before properly setting up your URIRef prefixes. If it says just &lt;STRONG&gt;cont:Artist&lt;/STRONG&gt;, then you will get serious errors later.&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdf:Description&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt; rdf:about&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;="&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;http://www.contoso.com/imm/1.0#Artist&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdf:type&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt; &lt;BR&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="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdf:Description&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt; rdf:about&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;="&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt;http://www.w3.org/2002/07/owl#DatatypeProperty&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;/&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdf:type&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,0)"&gt; &lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(128,0,0)"&gt;rdf:Description&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: rgb(255,255,255)"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Next we will define the datatype of this property. Click into the property and you will be able to right click and &lt;STRONG&gt;Add Range.&amp;nbsp; &lt;/STRONG&gt;The Range in OWL is what defines what is valid to be stored in this datatype property. &lt;/P&gt;
&lt;P&gt;Right click the range node and select &lt;STRONG&gt;Add XML schema datatype, &lt;/STRONG&gt;then select the schema type that you desire. In my case, I selected &lt;A href="http://www.w3.org/2001/XMLSchema#string" mce_href="http://www.w3.org/2001/XMLSchema#string"&gt;http://www.w3.org/2001/XMLSchema#string&lt;/A&gt;. &lt;BR&gt;Your property will now look like the following.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_24.png" mce_href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_24.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=73 alt=image src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_11.png" width=512 border=0 mce_src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_11.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;H4&gt;Adding Properties to Classes&lt;/H4&gt;
&lt;P&gt;There are two ways in which to add a defined Property to a Class in Owl. One is Global, the other is local to the Class definition.&amp;nbsp; I prefer to use the later, due to the fact that when you define it on a Global level you lose some control later.&lt;/P&gt;
&lt;P&gt;I'll start with the recommended route to add a Property to an existing IMM Core Class.&lt;/P&gt;
&lt;P&gt;Let's use the example of adding our new Artist property to the IMM Core &lt;STRONG&gt;AudioItem &lt;/STRONG&gt;definition.&amp;nbsp; Switch to the Classes tab in SemanticWorks and scroll down to the bottom past the Dublin Core imports to open up the the &lt;STRONG&gt;imm:AudioItem &lt;/STRONG&gt;class definition.&lt;/P&gt;
&lt;P&gt;Expand out the little plus sign (see red arrow below) at the top of the imm:AudioItem class. This will show you the imm:MediaItem node, which represents the fact that AudioItem derives from MediaItem.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_28.png" mce_href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_28.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=354 alt=image src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_13.png" width=400 border=0 mce_src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_13.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Right click on the arrow that I circled above in &lt;FONT color=#0000ff&gt;&lt;STRONG&gt;blue &lt;/STRONG&gt;&lt;FONT color=#000000&gt;above and select &lt;STRONG&gt;Add Restriction. &lt;BR&gt;&lt;/STRONG&gt;In the drop down list select the property that you just created. This "restricts" the definition of AudioItem to now require a cont:Artist in my case.&amp;nbsp; At this point, we have not restricted the cardinality of the property, so it is in fact a collection of cont:Artist - meaning, I can have as many cont:Artist properties attached to an AudioItem as I want. If this is the desired outcome, you are done and the owl.exe tool will automatically generate a Collection of strings for the cont:Artist property.&amp;nbsp;&amp;nbsp; If you want a single valued property you need to set the &lt;STRONG&gt;Max Cardinality.&amp;nbsp; &lt;/STRONG&gt;To do this in SemanticWorks, there is a tiny (barely visible) ".."&amp;nbsp; under the property restriction.&amp;nbsp; Set the right side of this to "&lt;STRONG&gt;1&lt;/STRONG&gt;" as below. &lt;BR&gt;&lt;BR&gt;Your final property restriction should look like this.&amp;nbsp; You have now defined a single property on the AudioItem. Repeat the process of defining properties and adding them to the classes to build out your objects and vocabulary.&amp;nbsp; &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_30.png" mce_href="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_30.png"&gt;&lt;IMG style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height=400 alt=image src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_14.png" width=399 border=0 mce_src="http://blogs.msdn.com/blogfiles/imm/WindowsLiveWriter/CreatingandextendingOWLontologiesinIMM_D770/image_thumb_14.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;In my next post I will go over how to define new classes in OWL. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6461441" width="1" height="1"&gt;</description></item><item><title>Putting the SPARQL Back in Your Eye</title><link>http://blogs.msdn.com/b/imm/archive/2007/10/16/putting-the-sparql-back-in-your-eye.aspx</link><pubDate>Tue, 16 Oct 2007 15:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5464125</guid><dc:creator>aweiker</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=5464125</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2007/10/16/putting-the-sparql-back-in-your-eye.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/imm/IMMSharepoint_20_2D_20Video_20Accent.png" mce_href="http://blogs.msdn.com/blogfiles/imm/IMMSharepoint_20_2D_20Video_20Accent.png"&gt;&lt;img src="http://blogs.msdn.com/blogfiles/imm/IMMSharepoint_20_2D_20Video_20Accent_thumb.jpg" alt="IMMSharepoint - Video Accent" mce_src="http://blogs.msdn.com/blogfiles/imm/IMMSharepoint_20_2D_20Video_20Accent_thumb.jpg" border="0"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;How long should it take you to build out an IMM site like this?&lt;/p&gt;
&lt;p&gt;What about if you need to extend our ontology because it doesn’t meet all of your needs?&lt;/p&gt;
&lt;p&gt;Just last week we had to do this very thing for one of our internal customers here at Microsoft. In the process a few things really hit us. First: We knew our documentation was poor, but when all of the custimizations we did are undocumented that is just a sad thing. Secondly: It only took us about 4 days. This is how long we want it to take when we deploy to customers; however it is nowhere near this timeframe. This is primarily related to my first point.&lt;/p&gt;
&lt;p&gt;So what is to follow is a primer on the Media Library web part. In case you are wondering, the Media Library web part is that thing highlighted in red in the screen shot above.&lt;/p&gt;
&lt;h3&gt;What do you mean that's not a list, I thought everything was a list in SharePoint?&lt;/h3&gt;
&lt;p&gt;As some of you may have already thought about&amp;nbsp;or experienced, SharePoint can be pretty unforgiving when working with hundreds of large files. So how then, with IMM being built on SharePoint, do we provide you the ability to manage, dare I say “millions”, of video files through a single SharePoint site? Does IMM use the external storage API identified in KB938499?&lt;/p&gt;
&lt;p&gt;While you are pondering that, let us also take a look at what metadata is required to work with these media files. After all, what good is a 4 GB movie if you don't know if it's &lt;i&gt;The Matrix&lt;/i&gt;, &lt;i&gt;Jaws&lt;/i&gt;, or my high school prom video? While we can all agree on the title, how do we decide how to capture the rest of the metadata? There are already two very popular websites that solve this problem, &lt;i&gt;&lt;a href="http://www.imdb.com/" target="_blank" mce_href="http://www.imdb.com/"&gt;The Internet Movie Database&lt;/a&gt;&lt;/i&gt; (IMDb) and &lt;i&gt;&lt;a href="http://www.wikipedia.com/" target="_blank" mce_href="http://www.wikipedia.com/"&gt;Wikipedia&lt;/a&gt;&lt;/i&gt;. Both websites take two very different approaches. Now being built using SharePoint the obvious choice would have been to go with storing all data in a SharePoint list and using our own content types. While this approach would have given us the ability to inherit content types and allow our customers to add their own metadata onto each list, we still come back to a fundmental problem: performance. &lt;a href="http://technet2.microsoft.com/Office/en-us/library/6a13cd9f-4b44-40d6-85aa-c70a8e5c34fe1033.mspx?mfr=true" title="TechNet Article  - Plan for software boundaries" target="_blank" mce_href="http://technet2.microsoft.com/Office/en-us/library/6a13cd9f-4b44-40d6-85aa-c70a8e5c34fe1033.mspx?mfr=true"&gt;As we all know&lt;/a&gt; this would have slowed down SharePoint to the point where it was a very poor experience.&lt;/p&gt;
&lt;p&gt;So as you already guessed, we aren’t using a list to store our data.&amp;nbsp;Instead what we decided to do with IMM is to store all of our metadata&amp;nbsp;in Resource Description Framework (RDF). RDF is a specification outlined by the W3C at &lt;a href="http://www.w3.org/RDF/" mce_href="http://www.w3.org/RDF/"&gt;http://www.w3.org/RDF/&lt;/a&gt;. Since RDF by itself can be a very unstructured way of describing things a Web Ontology Language (OWL) (&lt;a href="http://www.w3.org/2004/OWL/" mce_href="http://www.w3.org/2004/OWL/"&gt;http://www.w3.org/2004/OWL/&lt;/a&gt;) was created by the W3C to create a vocabulary so that things could be described consistently and related to each other. In this article I don't want to go into all of the details on why we chose RDF over using a SharePoint list or something else. This is saved for another day.&lt;/p&gt;
&lt;p&gt;Do I still have your attention? Are you wondering how we store RDF metadata in SharePoint?&amp;nbsp;We dont’ store our RDF metadata in SharePoint, we&amp;nbsp;use our own proprietory RDF store. Where then do we store our large essence files? The typical scenario for this&amp;nbsp;is a large SAN; however, this could be another Digital Asset Management (DAM) system or even a tape. So here you have it, we do not use any lists in SharePoint to store our data!&lt;/p&gt;
&lt;h3&gt;Getting the data about the data&lt;/h3&gt;
&lt;p&gt;The media library provides you a glimpse into the metadata repository. It's not meant to show you the whole thing, but just that thing that you need to know in order to do your job. Its meant to help you see the forest from the trees, or however that saying goes. The media library consists of views. A view is simply two things: 1) the query on how to get the data, and 2) the way that the grid should look. This allows us to have multiple ways of looking at the same set of data. This view here is the default view that we use for our demos.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/blogfiles/imm/IMM_2DSharePoint_20Media_20Library_20_2D_20Default_small.jpg" alt="Media Library - Default View" mce_src="http://blogs.msdn.com/blogfiles/imm/IMM_2DSharePoint_20Media_20Library_20_2D_20Default_small.jpg" border="0"&gt;&lt;/p&gt;
&lt;p&gt;While this is the same media library in a different view.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/blogfiles/imm/IMM_2DSharePoint_20Media_20Library_20_2D_20Additional_20Details_small.jpg" alt="Media Library - Additional Details View" mce_src="http://blogs.msdn.com/blogfiles/imm/IMM_2DSharePoint_20Media_20Library_20_2D_20Additional_20Details_small.jpg" border="0"&gt;&lt;/p&gt;
&lt;p&gt;As you can see this is the same data, just a different way of looking at it. In a typical SharePoint environment you would define your views at the list level and would have somewhat limited options available to you unless you created your own XSLT. With IMM we do things a little differently. Our media library doesn't pull its configuration from SharePoint, instead it is all stored inside of an XML file that is defined in the web.config file. By default this configuration file is stored in ~\wpresources\ImmMediaLibrary\LibraryTemplates.xml. Instead of going into detail on every piece of this file I'll instead highlight the key sections.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/blogfiles/imm/LibraryTemplateXML.png" alt="LibraryTemplateXML" mce_src="http://blogs.msdn.com/blogfiles/imm/LibraryTemplateXML.png" border="0"&gt;&lt;/p&gt;
&lt;p&gt;As with all large XML files the first step is to know what you need to pay attention to when. There are usually two different reasons to be editing this file. You are going to either be defining your view/grid/columns or defining your data source. This is why I like to use an XML editor where I can collapse all unnecessary elements as I have done above.&lt;/p&gt;
&lt;h3&gt;What is a Column?&lt;/h3&gt;
&lt;p&gt;As you can see from the example above a Grid is made up of Columns. This naturally leads to two questions, What kinds of columns are supported out of box? and How can I make my own Column?. With the later question being more important. So what do we ship with? Since we are currently sold as a "solution" we only ship with two core column types: Menu and Workflow Selector. Menu is simply a column that can be bound to a result column and contain drop down menus that contain actions.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/blogfiles/imm/Menu_20Field_small.jpg" alt="Menu Field" mce_src="http://blogs.msdn.com/blogfiles/imm/Menu_20Field_small.jpg" border="0"&gt;&lt;/p&gt;
&lt;p&gt;The next field is the Workflow Selector. This field is simply a checkbox that can be tied back to the workflow drop down menu. Now you may be wondering how useful the media library is if we only ship with those two columns. Remember how I mentioned that we are sold as a "solution"? This means that this isn't an out of box piece of software that you can buy, like SharePoint or Exchange, but is something that requires customization to fit into your scenario. As a part of this customization we ship with sample code and extensions that have more column types. Included in these is a very handy column type called Html Field and Proxy Thumbnail Field. The Html Field column is one of the more flexible that allows us to&amp;nbsp; customize the grid with HTML markup that is based upon the type of result being returned. So for example if a TV Season is returned we can display it differently than a Movie.&lt;/p&gt;
&lt;h3&gt;Getting the Data&lt;/h3&gt;
&lt;p&gt;As I mentioned earlier the data is stored in an RDF store that we have running outside of SharePoint. In order to get to this data we use SPARQL queries. SPARQL is a W3C specification (&lt;a href="http://www.w3.org/TR/rdf-sparql-query/" mce_href="http://www.w3.org/TR/rdf-sparql-query/"&gt;http://www.w3.org/TR/rdf-sparql-query/&lt;/a&gt;) that specifies how to query RDF data. For the media library these queries are stored in the Data Source section of the template XML file.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/blogfiles/imm/LibraryXML_2DSPARQL.png" alt="LibraryXML-SPARQL" mce_src="http://blogs.msdn.com/blogfiles/imm/LibraryXML_2DSPARQL.png" border="0"&gt;&lt;/p&gt;
&lt;p&gt;The syntax for these queries appears to be similar to SQL but that is as far as it goes. The similarity is truly only skin deep. Does this make it a shallow language? Not really as SPARQL is only able to do perform SELECT queries but it provides a lot of power around it.&lt;/p&gt;
&lt;p&gt;A SPARQL query consists of at least three different sections: PREFIX, SELECT, and WHERE. The PREFIX is used to define the namespaces for the types that will be used. The SELECT section is used to indicate which variables should be returned. This is similar to a SQL query. Then the WHERE section is used to put any conditions on the data. Unlike SQL this is a required field as without it nothing would be returned. Additionally unlike SQL instead of specifying a table to return results from, you specify what triple pattern you want results returned for by specifying any of the subject, predicate, or object. Please refer to the SPARQL specification for more information as this article is not intended to go into detail on this subject.&lt;/p&gt;
&lt;p&gt;Instead of dealing with a single query that does it all, the media library is broken down into two different queries. The first query gets back the list of subjects that will be displayed (RowIdSparql) and then the second is used to define what data to display about those subjects (RowDetailsSparql). Additionally since the media library allows you drill down the row query takes an optional "{CURRENTSUBJECT}" variable. This variable is passed is inserted automatically when being drilled down into. Then the same is true for the row details query exception that a different variable name is used. In this case "{ROWSUBJECT}" is used. ROWSUBJECT is taken from the ?rowId variable used in row query. Now that I'm bound to have you confused as to how this actually works, let us walk through an example.&lt;/p&gt;
&lt;p&gt;In my test environment my SharePoint Web ID is "58cedcd8-9398-4dfe-8205-45e3ef988799" and since I have not specified anything in the properties of the web part for the Root ID, the sites web id will be used as the container. The query then that is executing looks like the following:&lt;/p&gt;&lt;pre&gt;	PREFIX dc: &lt;HTTP: 1.1="" elements="" dc="" purl.org=""&gt;&lt;br&gt;	PREFIX did: &amp;lt;urn:mpeg:mpeg21:2002:02-didmodel-ns#&amp;gt;&lt;br&gt;	PREFIX rdf: &amp;lt;http: 22-rdf-syntax-ns# 02 1999 www.w3.org&amp;gt;&lt;br&gt;	&lt;br&gt;	SELECT ?rowId ?title&lt;br&gt;	WHERE&lt;br&gt;	{&lt;br&gt;	  &amp;lt;guid:_58cedcd8-9398-4dfe-8205-45e3ef988799&amp;gt; &amp;lt;did:itemcollection&amp;gt; ?rowId.&lt;br&gt;	  ?rowId &amp;lt;dc:title&amp;gt; ?title.&lt;br&gt;	  ?rowId &amp;lt;did:resourcecollection&amp;gt; ?proxyRes.&lt;br&gt;	}&lt;br&gt;&lt;/HTTP:&gt;&lt;/pre&gt;
&lt;p&gt;With the following result set being returned:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;table border="1"&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;rowId&lt;/th&gt;
&lt;th&gt;title&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;guid:_c0ea9f7d-02f1-4ea6-868b-e82855c4ed73&lt;/td&gt;
&lt;td&gt;Gelatin Video&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_f6da28c7-3f86-4ec0-847c-82ff9bcd32cf&lt;/td&gt;
&lt;td&gt;Fighter Pilot&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_bdeca860-127d-41e0-9530-f2653b90a7de&lt;/td&gt;
&lt;td&gt;Amsterdam Street Performer&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_275b1c0a-3d88-4ec0-8332-f154b845293a&lt;/td&gt;
&lt;td&gt;Media Player&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_973fe83b-8d39-4388-8916-85bff9a51d70&lt;/td&gt;
&lt;td&gt;Amsterdam Street Performer 2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_69151f9e-2c57-40de-8c89-a4f05c4c5f16&lt;/td&gt;
&lt;td&gt;London Stock Exchange&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_0801d764-2ea6-49ea-a2c1-6e3c8aa5975a&lt;/td&gt;
&lt;td&gt;DEMO&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_cb9a8e86-8b7f-4332-81c4-eb3c1378f7ce&lt;/td&gt;
&lt;td&gt;BP MOSS Case Study&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_e8090739-e6b4-47cf-94fc-9028d5b7034c&lt;/td&gt;
&lt;td&gt;IBC 2007&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_d3ac0886-a6c7-4380-add9-234c0df3dc9d&lt;/td&gt;
&lt;td&gt;Universitat&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_fe67eca4-e480-40e2-9d2e-3b84d3d139d5&lt;/td&gt;
&lt;td&gt;helloworld&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_30411e27-2c80-4e13-b87e-9a7d007e2a5d&lt;/td&gt;
&lt;td&gt;Harris&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_cfa6f18f-6734-4a7e-88bd-e86d69c3edac&lt;/td&gt;
&lt;td&gt;Coffee&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_966eed5d-6e3d-4aee-97d5-dbcb6f9657da&lt;/td&gt;
&lt;td&gt;Party Boat&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_7aa32b57-19f6-491c-a4df-d48fbe899970&lt;/td&gt;
&lt;td&gt;Mediaset Demo&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_70447a00-a5d5-4a94-a323-4d543d130106&lt;/td&gt;
&lt;td&gt;Mikhail&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_fbbdeedc-68db-48e0-9fe6-06a3e86e6bb7&lt;/td&gt;
&lt;td&gt;Alliance&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_ca10bc92-0a60-4b78-a568-ec49e8eb8208&lt;/td&gt;
&lt;td&gt;Demo 123&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_10937f47-e088-4e41-a5d9-6c0c04ea10fa&lt;/td&gt;
&lt;td&gt;T-Online Video&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_476b5dc7-95c3-4cfc-864e-a15f0379c11b&lt;/td&gt;
&lt;td&gt;HP DEMO&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_1576c8ac-1199-467d-b403-4aeffb1180ad&lt;/td&gt;
&lt;td&gt;Last Presentation of IBC&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;guid:_b5389571-2641-4ce6-bd06-0dda75f67ed4&lt;/td&gt;
&lt;td&gt;Connections&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;With this data then another query is generated using the rowId this time as the key. This query is similar to the following:&lt;/p&gt;&lt;pre&gt;	PREFIX dc: &amp;lt;http://purl.org/dc/elements/1.1/&amp;gt;&lt;br&gt;	PREFIX did: &amp;lt;urn:mpeg:mpeg21:2002:02-DIDMODEL-NS#&amp;gt;&lt;br&gt;	PREFIX imm: &amp;lt;http://schemas.microsoft.com/imm/core/1.0#&amp;gt;&lt;br&gt;	PREFIX xsd: &amp;lt;http://www.w3.org/2001/XMLSchema#&amp;gt;&lt;br&gt;	&lt;br&gt;	SELECT ?rowId ?title ?thumbnail ?description&lt;br&gt;	WHERE&lt;br&gt;	{&lt;br&gt;	    ?rowId &amp;lt;dc:title&amp;gt; ?title.&lt;br&gt;	    ?rowId &amp;lt;dc:description&amp;gt; ?description.&lt;br&gt;	    ?rowId &amp;lt;did:ResourceCollection&amp;gt; ?proxyRes.&lt;br&gt;	    ?proxyRes &amp;lt;imm:IsProxy&amp;gt; 'true'^^&amp;lt;xsd:boolean&amp;gt;.&lt;br&gt;	    ?proxyRes &amp;lt;did:Ref&amp;gt; ?thumbnail.&lt;br&gt;	    FILTER(?rowId = &amp;lt;guid:_c0ea9f7d-02f1-4ea6-868b-e82855c4ed73&amp;gt;)&lt;br&gt;	}&lt;br&gt;&lt;/pre&gt;
&lt;p&gt;Please note that this is not the actual query that is used as that would result in X + 1 queries being executed where X is the number of results returned in the first query. Instead all of the queries are appended together and one large batch is sent to the RDF repository. The results for the previous query look like such: &lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;rowId&lt;/th&gt;
&lt;th&gt;Title&lt;/th&gt;
&lt;th&gt;Thumbnail&lt;/th&gt;
&lt;th&gt;description&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;guid:_c0ea9f7d-02f1-4ea6-868b-e82855c4ed73&lt;/td&gt;
&lt;td&gt;Gelatin Video&lt;/td&gt;
&lt;td&gt;\2007 09 08\guid__a6c5bbe6-dd1e-400f-ae7c-a3821158b857.wmv&lt;/td&gt;
&lt;td&gt;This is a video about Gelatin. This is a video about Gelatin. This is a video about Gelatin. This is a video about Gelatin. This is a video about Gelatin. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Since all of this SPARQL stuff can be very confusing, we have created a &lt;a href="http://blogs.msdn.com/imm/attachment/5464125.ashx" target="_blank" mce_href="http://blogs.msdn.com/imm/attachment/5464125.ashx"&gt;SPARQL Cheat Sheet&lt;/a&gt; that should be referenced. (I have mine on my wall beside me, where’s yours?)&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5464125" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-05-46-41-25/SPARQL-Cheat-Sheet.pdf" length="214646" type="application/pdf" /><category domain="http://blogs.msdn.com/b/imm/archive/tags/IMM/">IMM</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/SPARQL/">SPARQL</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/Media+Library/">Media Library</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/OWL/">OWL</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/RDF/">RDF</category><category domain="http://blogs.msdn.com/b/imm/archive/tags/Display+Templates/">Display Templates</category></item><item><title>Interactive Media Manager demo at IBC 2007</title><link>http://blogs.msdn.com/b/imm/archive/2007/09/25/imm-demo-at-ibc-2007.aspx</link><pubDate>Tue, 25 Sep 2007 19:50:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5124577</guid><dc:creator>johndeu</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/imm/rsscomments.aspx?WeblogPostID=5124577</wfw:commentRss><comments>http://blogs.msdn.com/b/imm/archive/2007/09/25/imm-demo-at-ibc-2007.aspx#comments</comments><description>&lt;P&gt;To kick off our IMM team blog, I thought it would be appropriate to post a link to &lt;A class="" title="IMM Demo at IBC 2007" href="http://www.clarkezone.net/default.aspx?id=ce35944a-7faf-464f-9438-8eeb1dee1301" mce_href="http://www.clarkezone.net/default.aspx?id=ce35944a-7faf-464f-9438-8eeb1dee1301"&gt;our latest demo&lt;/A&gt; that we built out for the International Broadcasters Association (IBC) convention in Amsterdam.&amp;nbsp; We had a very good show this year, and I want to thank James Clarke for recording this little demo on the last day.&lt;/P&gt;
&lt;P mce_keep="true"&gt;&lt;IFRAME src="http://silverlight.services.live.com/invoke/24807/jdibc/iframe.html" frameBorder=0 width=463 scrolling=no height=371&gt;&lt;/IFRAME&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5124577" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/imm/archive/tags/IBC+Demo+IMM+John+Amsterdam+RoughCut+Silverlight/">IBC Demo IMM John Amsterdam RoughCut Silverlight</category></item></channel></rss>
