VOS.VirtRDFViewODSWiki

  • Topic
  • Discussion
  • VOS.VirtRDFViewODSWiki(Last) -- DAVWikiAdmin? , 2017-06-13 05:48:00 Edit WebDAV System Administrator 2017-06-13 01:48:00

    RDF View for ODS Wiki

    IMPORTANT! The following code is part of the ODS global VIEW regarding the Wiki part, it is not a separate VIEW and is strongly recommended NOT to be executed directly. Instead, you should use the code from ODS RDF Views Deployment and Demo Scripts.
    sparql prefix ods: <http://www.openlinksw.com/virtuoso/ods/>
    
            # Wiki
    	create iri class ods:wiki_post "http://^{URIQADefaultHost}^/dataspace/%U/wiki/%U/%U"
    		(in uname varchar not null, in inst_name varchar not null, in topic_id varchar not null)
    		option (returns "http://^{URIQADefaultHost}^/dataspace/%U/wiki/%U/%U") .
    	create iri class ods:wiki_post_text "http://^{URIQADefaultHost}^/dataspace/%U/wiki/%U/%U/text"
    		(in uname varchar not null, in inst_name varchar not null, in topic_id varchar not null)
    		option (returns "http://^{URIQADefaultHost}^/dataspace/%U/wiki/%U/%U/text" ) .
    	create iri class ods:wiki_forum "http://^{URIQADefaultHost}^/dataspace/%U/wiki/%U"
    		( in uname varchar not null, in forum_name varchar not null)
    		option (returns  "http://^{URIQADefaultHost}^/dataspace/%U/wiki/%U" ) .
    
    


    sparql
        prefix sioc: <http://rdfs.org/sioc/ns#>
        prefix sioct: <http://rdfs.org/sioc/types#>
        prefix atom: <http://atomowl.org/ontologies/atomrdf#>
        prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
        prefix foaf: <http://xmlns.com/foaf/0.1/>
        prefix dc: <http://purl.org/dc/elements/1.1/>
        prefix dct: <http://purl.org/dc/terms/>
        prefix skos: <http://www.w3.org/2004/02/skos/core#>
        prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
        prefix bm: <http://www.w3.org/2002/01/bookmark#>
        prefix exif: <http://www.w3.org/2003/12/exif/ns/>
        prefix ann: <http://www.w3.org/2000/10/annotation-ns#>
        prefix wikiont: <http://sw.deri.org/2005/04/wikipedia/wikiont.owl#>
        prefix calendar: <http://www.w3.org/2002/12/cal#>
        prefix ods: <http://www.openlinksw.com/virtuoso/ods/>
    
       alter quad storage virtrdf:DefaultQuadStorage
           
          from DB.DBA.ODS_ODRIVE_POSTS as odrv_posts
          where (^{odrv_posts.}^.U_MEMBER = ^{users.}^.U_NAME)
          from DB.DBA.ODS_ODRIVE_TAGS as odrv_tags
          where (^{odrv_tags.}^.U_OWNER = ^{users.}^.U_NAME)
    
    {
    	create virtrdf:ODS_DS as graph ods:graph (users.U_NAME) option (exclusive)
    	  {
    	    #----
    
                # Wiki
                ods:wiki_post (wiki_posts.U_NAME, wiki_posts.CLUSTERNAME, wiki_posts.LOCALNAME) a wikiont:Article ;
    	    dc:title wiki_posts.LOCALNAME ;
    	    dct:created wiki_posts.RES_CREATED ;
    	    dct:modified wiki_posts.RES_MODIFIED ;
    	    sioc:content wiki_posts.RES_CONTENT ;
    	    sioc:has_creator ods:user (wiki_posts.U_NAME) ;
    	    foaf:maker ods:person (wiki_posts.U_NAME) ;
    	    sioc:has_container ods:wiki_forum (wiki_posts.U_NAME, wiki_posts.CLUSTERNAME) .
    
    	    ods:wiki_forum (wiki_posts.U_NAME, wiki_posts.CLUSTERNAME)
    	    sioc:container_of
    	    ods:wiki_post (wiki_posts.U_NAME, wiki_posts.CLUSTERNAME, wiki_posts.LOCALNAME) .
    
    	    ods:user (wiki_posts.U_NAME)
    	    sioc:creator_of
    	    ods:wiki_post (wiki_posts.U_NAME, wiki_posts.CLUSTERNAME, wiki_posts.LOCALNAME) .
    	    # end Wiki
                #---
    	  } .
        } .
    ;
    

    CategoryVirtuoso CategoryRDF CategoryWiki