<docbook><section><title>OdsCalendarCRUDEndpoint</title><title>Manipulate my Calendar data via CRUD RESTful using Calendar CalDAV Endpoint</title>Manipulate my Calendar data via CRUD RESTful using Calendar <ulink url="CalDAV">CalDAV</ulink> Endpoint
<para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">What?</bridgehead>
 Calendar CRUD (<emphasis>C</emphasis>reate, <emphasis>R</emphasis>ead, <emphasis>U</emphasis>pdate, <emphasis>D</emphasis>elete) Endpoint Service.<bridgehead class="http://www.w3.org/1999/xhtml:h2">Why?</bridgehead>
 Using CRUD RESTful Endpoint service provides an easy way to manage calendar tasks/events.<bridgehead class="http://www.w3.org/1999/xhtml:h2">How?</bridgehead>
 Knowing an Calendar CRUD Endpoint Service endpoint URL, one can perform the following activities: <itemizedlist mark="bullet" spacing="compact"><listitem>Copy-paste vCard files containing calendar tasks/events.
 So once pasted, the system creates the calendar tasks/events; </listitem>
<listitem>Edit task(s)/event(s); </listitem>
<listitem>Update task(s)/event(s); </listitem>
<listitem>Delete task(s)/event(s); </listitem>
<listitem>Update RDF Data for the Calendar instance.
 Depending on the instance&#39;s model: <itemizedlist mark="bullet" spacing="compact"><listitem>When model is &quot;Closed&quot;, will be updated the RDF Data for the instance&#39;s private graph: <programlisting>http://cname/dataspace/protected/[name-of-the-instance]
</programlisting></listitem>
<listitem>When model is &quot;Opened&quot;, will be updated the RDF Data for the ODS Dataspace public graph: <programlisting>http://cname/dataspace/[name-of-the-instance]
</programlisting></listitem>
</itemizedlist></listitem>
</itemizedlist><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3">Example with Calendar instance that has Member model from type &quot;Closed&quot; and is not set &quot;Visible to public&quot;</bridgehead>
<orderedlist spacing="compact"><listitem>Suppose a user, for ex.
 &quot;demo&quot;, has created Calendar instance with name &quot;demoCalendar&quot; and Member model is &quot;Closed&quot;: <figure><graphic fileref="OdsCalendarCRUDEndpoint/clcrud1.png" /></figure> </listitem>
<listitem>Mount the Calendar <ulink url="CalDAV">CalDAV</ulink> Endpoint URL  <ulink url="http://localhost:8890/DAV/home/demo/calendars/demoCalendar/&lt;/code">http://localhost:8890/DAV/home/demo/calendars/demoCalendar/</ulink>&gt; <figure><graphic fileref="OdsCalendarCRUDEndpoint/clcrud2.png" /></figure> <figure><graphic fileref="OdsCalendarCRUDEndpoint/clcrud3.png" /></figure> <figure><graphic fileref="OdsCalendarCRUDEndpoint/clcrud4.png" /></figure> </listitem>
<listitem>Drop a .vcf file, for ex.
 <ulink url="OdsCalendarCRUDEndpoint/demo-calendar.ics">demo-calendar.ics</ulink> into the mapped <ulink url="CalDAV">CalDAV</ulink> Calendar folder: <figure><graphic fileref="OdsCalendarCRUDEndpoint/clcrud5.png" /></figure> </listitem>
<listitem>The user demo&#39;s Calendar Dataspace instance UI now should show under &quot;Tasks&quot;/&quot;Events&quot; the new imported task(s)/event(s): <figure><graphic fileref="OdsCalendarCRUDEndpoint/clcrud6.png" /></figure> <figure><graphic fileref="OdsCalendarCRUDEndpoint/clcrud7.png" /></figure> </listitem>
<listitem><ulink url="http://ods.openlinksw.com/dataspace/dav/wiki/ODS/ODSGenerateX509Certificate">Generate an X.509 Certificate hosted WebID</ulink> for user &quot;demo&quot; <ulink url="WebID">WebID</ulink>.
</listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtAuthFOAFSSLACL">Secure your SPARQL Endpoint via user &quot;demo&quot; WebID</ulink>, for ex.: <programlisting>-- user &quot;demo&quot; WebID:
http://localhost:8890/dataspace/person/demo#this

-- SPARQL-WebID Endpoint:
-- https://localhost:4433/sparql-webid
</programlisting></listitem>
<listitem>Access the SPARQL-<ulink url="WebID">WebID</ulink> Endpoint.
</listitem>
<listitem>When challenged for authentication select the generated from above certificate for user &quot;demo&quot;: <figure><graphic fileref="OdsCalendarCRUDEndpoint/abcrud8.png" /></figure> </listitem>
<listitem>The SPARQL-<ulink url="WebID">WebID</ulink> Endpoint UI should be presented: <figure><graphic fileref="OdsCalendarCRUDEndpoint/abcrud9.png" /></figure> </listitem>
<listitem>Enter the following query: <programlisting>SELECT * 
FROM &lt;http://localhost:8890/dataspace/protected/demoCalendar&gt;
WHERE {?s ?p ?o}
</programlisting><figure><graphic fileref="OdsCalendarCRUDEndpoint/clcrud10.png" /></figure> </listitem>
<listitem>As result no rows are found.</listitem>
</orderedlist><bridgehead class="http://www.w3.org/1999/xhtml:h3">Example with Calendar instance that has Member model from type &quot;Opened&quot; and is set &quot;Visible to Public&quot;</bridgehead>
<orderedlist spacing="compact"><listitem>Suppose a user, for ex.
 &quot;demo&quot;, has created Calendar instance with name &quot;demoCalendar&quot; and Member model is &quot;Opened&quot; and is set &quot;Visible to Public&quot;.
<figure><graphic fileref="OdsCalendarCRUDEndpoint/clcrud12.png" /></figure> </listitem>
<listitem>Mount the Calendar <ulink url="CalDAV">CalDAV</ulink> Endpoint URL  <ulink url="http://localhost:8890/DAV/home/demo/calendars/demoCalendar/&lt;/code">http://localhost:8890/DAV/home/demo/calendars/demoCalendar/</ulink>&gt; <figure><graphic fileref="OdsCalendarCRUDEndpoint/clcrud2.png" /></figure> <figure><graphic fileref="OdsCalendarCRUDEndpoint/clcrud3.png" /></figure> <figure><graphic fileref="OdsCalendarCRUDEndpoint/clcrud4.png" /></figure> </listitem>
<listitem>Drop a .ics file, for ex.
 * <ulink url="OdsCalendarCRUDEndpoint/demo-calendar.ics">demo-calendar.ics</ulink> into the mapped <ulink url="CalDAV">CalDAV</ulink> Calendar folder: <figure><graphic fileref="OdsCalendarCRUDEndpoint/clcrud5.png" /></figure> </listitem>
<listitem>The user demo&#39;s Calendar Dataspace instance UI now should show under &quot;Tasks&quot;/&quot;Events&quot; the new imported task(s)/event(s): <figure><graphic fileref="OdsCalendarCRUDEndpoint/clcrud6.png" /></figure> </listitem>
<listitem>Access the SPARQL Public Endpoint.
<figure><graphic fileref="OdsCalendarCRUDEndpoint/abcrud13.png" /></figure> </listitem>
<listitem>Suppose there is inserted from above task with id= 1032 </listitem>
<listitem>Enter the following query: <programlisting>SELECT * 
FROM &lt;http://localhost:8890/dataspace&gt;
WHERE 
  {
    &lt;http://localhost:8890/dataspace/demo/calendar/demoCalendar/Task/1032#this&gt; ?p ?o
  }
</programlisting><figure><graphic fileref="OdsCalendarCRUDEndpoint/clcrud14.png" /></figure> </listitem>
<listitem>Click &quot;Run Query&quot;.
</listitem>
<listitem>As result the freshly inserted RDF Data for the task in question will be displayed: <figure><graphic fileref="OdsCalendarCRUDEndpoint/clcrud15.png" /></figure></listitem>
</orderedlist><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="http://ietfreport.isoc.org/idref/draft-ietf-vcarddav-carddav/">CalDAV Specification</ulink> </listitem>
<listitem><ulink url="OdsCalendar">ODS-Calendar Dataspace</ulink></listitem>
</itemizedlist></section></docbook>