Collection with tripledoc

Giving some try to implement Solid Meeting with @Vincent Tripledoc, it seems that the basic metting setting look like that
https://holacracy.solid.community/public/meeting/gouvernance/second%20meeting/index.ttl#this (generated with the databrowser)

@prefix : <#>.
@prefix mee: <http://www.w3.org/ns/pim/meeting#>.
@prefix ic: <http://www.w3.org/2002/12/cal/ical#>.
@prefix XML: <http://www.w3.org/2001/XMLSchema#>.
@prefix flow: <http://www.w3.org/2005/01/wf/flow#>.
@prefix c: </profile/card#>.
@prefix ui: <http://www.w3.org/ns/ui#>.
@prefix n0: <http://purl.org/dc/elements/1.1/>.

:id1589757677361
    ic:dtstart "2020-05-17T23:21:17Z"^^XML:dateTime;
    flow:participant c:me;
    ui:backgroundColor "#dbe0cb".
:this
    a mee:Meeting;
    n0:author c:me;
    n0:created "2020-05-17T23:21:01Z"^^XML:dateTime;
    ic:comment "comment cool";
    ic:dtend "2020-05-13"^^XML:date;
    ic:dtstart "2020-05-04"^^XML:date;
    ic:location "nowhere";
    ic:summary "second test meeting";
    flow:participation :id1589757677361;
    mee:toolList ( :this );
    ui:backgroundColor "#ddddcc"^^XML:color.

The two last line give me problem :
Is there a way to add a “Collection” with brackets ? like ( $ 2.5 on that page https://www.w3.org/TeamSubmission/turtle/#sec-tutorial)

 mee:toolList ( :this );

otherwise, the databrowser give me some error like https://holacracy.solid.community/public/meeting/gouvernance/A%20new%20%20meeting/ .
Just adding the bracket manually give me a good meeting https://holacracy.solid.community/public/meeting/gouvernance/helo/
but how can I do that with Tripledoc ?

and how can i specify (^^XML:color) ?

  • are there any reason why the dates are not uniform (date / datetime)
ic:dtstart "2020-05-17T23:21:17Z"^^XML:dateTime;
ic:dtstart "2020-05-04"^^XML:date;

nor the backgroundcolor :

ui:backgroundColor "#dbe0cb".
ui:backgroundColor "#ddddcc"^^XML:color.

Thanxs for any advice on thoose questions :wink:

Hi @Smag0, the brackets are RDF lists, which are somewhat cumbersome, and for which Tripledoc does not have convenience methods to make them easier to work with. (The same holds true for BlankNodes, which it uses behind the scenes.) I found this post, the introduction of which explains how lists are implemented: http://www.snee.com/bobdc.blog/2014/04/rdf-lists-and-sparql.html

You can simulate them in Tripledoc by recreating its data structure, using regular TripleSubjects instead of BlankNodes. Off the top of my head, that would look something like this:

import { fetchDocument } from 'tripledoc';
import { rdf } from 'rdf-namespaces';

fetchDocument('https://holacracy.solid.community/public/meeting/gouvernance/second%20meeting/index.ttl').then(meetingDoc => {
  const meeting = meetingDoc.getSubject('https://holacracy.solid.community/public/meeting/gouvernance/second%20meeting/index.ttl#this');

  const toolList = meetingDoc.addSubject();
  toolList.setRef(rdf.type, rdf.List);
  toolList.setRef(rdf.first, 'https://holacracy.solid.community/public/meeting/gouvernance/second%20meeting/index.ttl#this');
  toolList.setRef(rdf.rest, rdf.nil);

  meeting.setRef('http://www.w3.org/ns/pim/meeting#toolList', toolList.asRef();
});

As for XML:color - unfortunately Tripledoc does not have an addColor method yet (contributions welcome :slight_smile: ). I thought it had an escape hatch to insert it yourself, but it does not. Let me know if this is an important feature for you in the short term, then I can prioritise its implementation.

I’m not sure why they’re using both Dates and DateTimes, but given the context, I’m assuming it’s the difference between a full-day appointment and something at a specific time/duration.

well it seems to give me a blankNode, https://holacracy.solid.community/public/meeting/gouvernance/AAAAA/index.ttl but mashlib don’t be agree https://holacracy.solid.community/public/meeting/gouvernance/AAAAA/index.ttl#this
what do you mean by

but got some rdf-namespaces issues with

rdf.nil
dc.created --> for purl
wf --> for flow 

thoose are “undefined” https://holacracy.solid.community/public/meeting/gouvernance/aeaze/index.ttl

I don’t see a BlankNode in there?

but mashlib don’t be agree https://holacracy.solid.community/public/meeting/gouvernance/AAAAA/index.ttl#this

I’m not quite sure what it’s trying to do there, but I’m expecting it to be a bug in mashlib. It appears that it’s assuming some data to be there that there is not yet, but it’s hard to debug from that error message.

but got some rdf-namespaces issues with

rdf.nil
dc.created --> for purl
wf --> for flow 

thoose are “undefined” https://holacracy.solid.community/public/meeting/gouvernance/aeaze/index.ttl

Hmm, rdf-namespaces is automatically generated from the vocabularies published at the given URLs. For each URL you mentioned, there appears to be a different reason it is not included:

wf.participant

https://www.w3.org/2005/01/wf/flow#partcipant just does not seem to be defined. That means you have two options:

  1. Not use it, since it’s technically not part of that vocabulary.
  2. Use the URL directly. The values from rdf-namespaces are just URLs, so you could just use 'https://www.w3.org/2005/01/wf/flow#partcipant' where you’d use wf.participant instead.

dc.created

Could it be that you’d want dct.created (so dct instead of dc) instead? Because DCMI: DCMI Metadata Terms doesn’t point to anything either.

rdf.nil

This is interesting. This property is defined at http://www.w3.org/1999/02/22-rdf-syntax-ns#nil, but it’s defined as being an rdf:List rather than an rdfs:Class or rdf:Property, for instance, which is why rdf-namespaces doesn’t include it - because it’s not technically a type, but a value (specifically, an -the- empty list). As a workaround, here too you can use the full URL ('http://www.w3.org/1999/02/22-rdf-syntax-ns#nil') instead of rdf.nil.

Which reminds me: the earlier code snipped I posted probably also needs:

  toolList.setRef(rdf.type, rdf.List);

(I’ve updated it now.)

Thxs for your help but rdf.List does not fix.
I’ve created a mashlib issue https://github.com/solid/mashlib/issues/92