<docbook><section><title>VirtRDFViewODSCommunity</title><bridgehead class="http://www.w3.org/1999/xhtml:h3">RDF View for ODS Community</bridgehead>
<emphasis>IMPORTANT!</emphasis> The following code is part of the ODS global VIEW regarding the Community part, it is not a separate VIEW and is strongly recommended NOT to be executed directly.
 Instead, you should use the code from <ulink url="VirtRDFViewODSGlobal">ODS RDF Views Deployment and Demo Scripts</ulink>.<programlisting>sparql prefix ods: &lt;http://www.openlinksw.com/virtuoso/ods/&gt;

        # Community
	create iri class ods:community_forum &quot;http://^{URIQADefaultHost}^/dataspace/%U/community/%U&quot;
		(in uname varchar not null, in forum_name varchar not null)
		option (returns  &quot;http://^{URIQADefaultHost}^/dataspace/%U/community/%U&quot;) .

</programlisting><para> </para>
<programlisting>sparql
    prefix sioc: &lt;http://rdfs.org/sioc/ns#&gt;
    prefix sioct: &lt;http://rdfs.org/sioc/types#&gt;
    prefix atom: &lt;http://atomowl.org/ontologies/atomrdf#&gt;
    prefix rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#&gt;
    prefix foaf: &lt;http://xmlns.com/foaf/0.1/&gt;
    prefix dc: &lt;http://purl.org/dc/elements/1.1/&gt;
    prefix dct: &lt;http://purl.org/dc/terms/&gt;
    prefix skos: &lt;http://www.w3.org/2004/02/skos/core#&gt;
    prefix geo: &lt;http://www.w3.org/2003/01/geo/wgs84_pos#&gt;
    prefix bm: &lt;http://www.w3.org/2002/01/bookmark#&gt;
    prefix exif: &lt;http://www.w3.org/2003/12/exif/ns/&gt;
    prefix ann: &lt;http://www.w3.org/2000/10/annotation-ns#&gt;
    prefix wikiont: &lt;http://sw.deri.org/2005/04/wikipedia/wikiont.owl#&gt;
    prefix calendar: &lt;http://www.w3.org/2002/12/cal#&gt;
    prefix ods: &lt;http://www.openlinksw.com/virtuoso/ods/&gt;

   alter quad storage virtrdf:DefaultQuadStorage
       
      from DB.DBA.ODS_COMMUNITIES as community
      where (^{community.}^.C_OWNER = ^{users.}^.U_NAME)

{
	create virtrdf:ODS_DS as graph ods:graph (users.U_NAME) option (exclusive)
	  {
	    #----

            # Community
	    ods:community_forum (community.C_OWNER, community.CM_COMMUNITY_ID) a sioc:Community ;
	    sioc:has_part ods:forum (community.A_OWNER, community.A_TYPE, community.CM_MEMBER_APP) .

	    ods:forum (community.A_OWNER, community.A_TYPE, community.CM_MEMBER_APP)
	    sioc:part_of
	    ods:community_forum (community.C_OWNER, community.CM_COMMUNITY_ID) .
            # end Community
            #---
	  } .
    } .
;
</programlisting><para><ulink url="CategoryVirtuoso">CategoryVirtuoso</ulink> <ulink url="CategoryRDF">CategoryRDF</ulink> <ulink url="CategoryCommunity">CategoryCommunity</ulink></para>
</section></docbook>