Skip to content

Turtle Examples for Module 2

Steven Folsom edited this page Jul 7, 2020 · 1 revision

Exercise Open any text editor. Using Turtle create both the most verbose and terse set of triples for the following information: “Steven is facilitating this workshop, and you and a colleague are participants.”

Verbose Styled Person-Oriented Turtle

_:Steven _:facilitatorOf _:LD4Workshop2020 .

_:You _:attended _:LD4Workshop2020 .

_:AColleague _:attended _:LD4Workshop2020 .

Note that each assertion is a separate stand alone triple. Also, the same node is used for the workshop. The same property is used for 'attending', and a separate property for 'facilitating'.

Compact Styled Workshop-Oriented Turtle

_:LD4Workshop2020 _:hasFacilitator _:Steven ; _:hasAttendee _:You , _:AColleague .

In this example, we see multiple built-in Turtle syntax abbreviations in use. There is one subject (:LD4Workshop2020) that never repeats. Instead, after asserting the facilitator (_:hasFacilitator _:Steven) we can continue to make assertions about the workshop by switching properties using a semicolon. Notice also how :hasAttendee has multiple values (:You , _:AColleague) using the comma.

Clone this wiki locally