%META:TOPICPARENT{name="VirtRDFViews"}%
---+++RDF View for ODS Calendar
IMPORTANT! The following code is part of the ODS global VIEW regarding the Calendar 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:
#Calendar
create iri class ods:calendar_event "http://^{URIQADefaultHost}^/dataspace/%U/calendar/%U/%d"
(in uname varchar not null, in inst_name varchar not null, in calendar_id integer not null)
option (returns "http://^{URIQADefaultHost}^/dataspace/%U/calendar/%U/%d" ) .
create iri class ods:calendar_event_text "http://^{URIQADefaultHost}^/dataspace/%U/calendar/%U/%d/text"
(in uname varchar not null, in inst_name varchar not null, in calendar_id integer not null)
option (returns "http://^{URIQADefaultHost}^/dataspace/%U/calendar/%U/%d/text" ) .
create iri class ods:calendar_forum "http://^{URIQADefaultHost}^/dataspace/%U/calendar/%U"
( in uname varchar not null, in forum_name varchar not null)
option (returns "http://^{URIQADefaultHost}^/dataspace/%U/calendar/%U") .
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_CALENDAR_EVENTS as cal_events
where (^{cal_events.}^.U_NAME = ^{users.}^.U_NAME)
from DB.DBA.ODS_CALENDAR_TAGS as cal_tags
where (^{cal_tags.}^.U_NAME = ^{users.}^.U_NAME)
{
create virtrdf:ODS_DS as graph ods:graph (users.U_NAME) option (exclusive)
{
#----
# Calendar
ods:calendar_event (cal_events.U_NAME, cal_events.WAI_NAME, cal_events.E_ID) a calendar:vevent option (EXCLUSIVE) ;
dc:title cal_events.E_SUBJECT ;
dct:created cal_events.E_CREATED ;
dct:modified cal_events.E_UPDATED ;
dc:date cal_events.E_UPDATED ;
ann:created cal_events.E_CREATED ;
dc:creator cal_events.U_NAME ;
sioc:link ods:proxy (cal_events.E_URI) ;
sioc:content cal_events.E_DESCRIPTION ;
sioc:has_creator ods:user (cal_events.U_NAME) ;
foaf:maker ods:person (cal_events.U_NAME) ;
sioc:has_container ods:calendar_forum (cal_events.U_NAME, cal_events.WAI_NAME) .
ods:calendar_forum (cal_events.U_NAME, cal_events.WAI_NAME) sioc:container_of ods:calendar_event (cal_events.U_NAME, cal_events.WAI_NAME, cal_events.E_ID) .
ods:user (cal_events.U_NAME) sioc:creator_of ods:calendar_event (cal_events.U_NAME, cal_events.WAI_NAME, cal_events.E_ID) .
ods:calendar_event (cal_tags.U_NAME, cal_tags.WAM_INST, cal_tags.ITEM_ID)
sioc:topic ods:tag (cal_tags.U_NAME, cal_tags.E_TAG) .
ods:tag (cal_tags.U_NAME, cal_tags.E_TAG) a skos:Concept ;
skos:prefLabel cal_tags.E_TAG ;
skos:isSubjectOf ods:calendar_event (cal_tags.U_NAME, cal_tags.WAM_INST, cal_tags.ITEM_ID) .
# end Calendar
#---
} .
} .
;
CategoryVirtuoso CategoryRDF CategoryCalendar