%META:TOPICPARENT{name="VirtRDFViews"}%
---+++RDF View for ODS Discussions
IMPORTANT! The following code is part of the ODS global VIEW regarding the Discussions part, it is not a separate VIEW and is strongly recommended NOT to be executed directly. Instead, you should use the code from [[VirtRDFViewODSGlobal][ODS RDF Views Deployment and Demo Scripts]].
sparql prefix ods:
# NNTPF
create iri class ods:nntp_forum "http://^{URIQADefaultHost}^/dataspace/discussion/%U"
( in forum_name varchar not null)
option (returns "http://^{URIQADefaultHost}^/dataspace/discussion/%U").
create iri class ods:nntp_post "http://^{URIQADefaultHost}^/dataspace/discussion/%U/%U"
( in group_name varchar not null, in message_id varchar not null)
option (returns "http://^{URIQADefaultHost}^/dataspace/discussion/%U/%U" ) .
create iri class ods:nntp_post_text "http://^{URIQADefaultHost}^/dataspace/discussion/%U/%U/text"
( in group_name varchar not null, in message_id varchar not null)
option (returns "http://^{URIQADefaultHost}^/dataspace/discussion/%U/%U/text") .
create iri class ods:nntp_role "http://^{URIQADefaultHost}^/dataspace/discussion/%U#reader"
(in forum_name varchar not null)
option (returns "http://^{URIQADefaultHost}^/dataspace/discussion/%U#reader") .
sparql
prefix sioc:
prefix sioct:
prefix atom:
prefix rdfs:
prefix foaf:
prefix dc:
prefix dct:
prefix skos:
prefix geo:
prefix bm:
prefix exif:
prefix ann:
prefix wikiont:
prefix calendar:
prefix ods:
alter quad storage virtrdf:DefaultQuadStorage
from DB.DBA.ODS_NNTP_GROUPS as nntp_groups
from DB.DBA.ODS_NNTP_POSTS as nntp_posts
from DB.DBA.ODS_NNTP_USERS as nntp_users
where (^{nntp_users.}^.U_NAME = ^{users.}^.U_NAME)
from DB.DBA.ODS_NNTP_LINKS as nntp_links
{
create virtrdf:ODS_DS as graph ods:graph (users.U_NAME) option (exclusive)
{
#----
# NNTP
ods:nntp_forum (nntp_groups.NG_NAME) a sioct:MessageBoard ;
sioc:id nntp_groups.NG_NAME ;
sioc:description nntp_groups.NG_DESC .
ods:nntp_post (nntp_posts.NG_NAME, nntp_posts.NM_ID) a sioct:BoardPost ;
sioc:content nntp_posts.NM_BODY ;
dc:title nntp_posts.FTHR_SUBJ ;
dct:created nntp_posts.REC_DATE ;
dct:modified nntp_posts.REC_DATE ;
foaf:maker ods:proxy (nntp_posts.MAKER) ;
sioc:reply_of ods:nntp_post (nntp_posts.NG_NAME, nntp_posts.FTHR_REFER) ;
sioc:has_container ods:nntp_forum (nntp_posts.NG_NAME) .
ods:nntp_post (nntp_posts.NG_NAME, nntp_posts.FTHR_REFER)
sioc:has_reply
ods:nntp_post (nntp_posts.NG_NAME, nntp_posts.NM_ID) .
ods:nntp_forum (nntp_posts.NG_NAME)
sioc:container_of
ods:nntp_post (nntp_posts.NG_NAME, nntp_posts.NM_ID) .
ods:nntp_role (nntp_groups.NG_NAME)
sioc:has_scope
ods:nntp_forum (nntp_groups.NG_NAME) .
ods:nntp_forum (nntp_groups.NG_NAME)
sioc:scope_of
ods:nntp_role (nntp_groups.NG_NAME) .
ods:user (nntp_users.U_NAME)
sioc:has_function
ods:nntp_role (nntp_users.NG_NAME) .
ods:nntp_role (nntp_users.NG_NAME)
sioc:function_of
ods:user (nntp_users.U_NAME) .
ods:nntp_post (nntp_links.NG_NAME, nntp_links.NML_MSG_ID)
sioc:links_to
ods:proxy (nntp_links.NML_URL) .
# end NNTP
#---
} .
} .
;
CategoryVirtuoso CategoryRDF CategoryDiscussions