|
1 | 1 | --- |
2 | | -title: Describing the root entity |
3 | | -teaching: 4 |
4 | | -exercises: 4 |
| 2 | +title: Declaring the root folder |
| 3 | +teaching: 2 |
| 4 | +exercises: 1 |
5 | 5 | --- |
| 6 | + |
6 | 7 | :::::::::::::::::::::::::::::::::::::::: questions |
7 | | -- How can I describe the crate? |
8 | | -- How do I specify the license of the RO-Crate? |
| 8 | +- What is the root folder? |
9 | 9 | :::::::::::::::::::::::::::::::::::::::::::::::::: |
10 | 10 |
|
11 | 11 | :::::::::::::::::::::::::::::::::::::::: objectives |
12 | | -- Learn about required metadata for the RO-Crate Root |
13 | | -- Understand license identifiers using SPDX |
| 12 | +- Create a top-level entity that can list the parts of the crate |
14 | 13 | :::::::::::::::::::::::::::::::::::::::::::::::::: |
15 | 14 |
|
16 | | -## Describing the root entity |
17 | | - |
18 | | -When describing the [root entity](https://www.researchobject.org/ro-crate/specification/1.2/root-data-entity.html#direct-properties-of-the-root-data-entity), |
19 | | -the properties generally apply to the whole of the crate. |
20 | | -For instance it is a good idea to give a description of why these resources are gathered in a crate, |
21 | | -as well as giving the crate a name and license for FAIR reuse and citation. |
| 15 | +## RO-Crate Root |
22 | 16 |
|
23 | | -:::::::::::::::::::::::::::::::::::::::: challenge |
24 | | -## Add metadata to root entity |
| 17 | +First we'll add an entity to the `@graph` array, |
| 18 | +to describe the [RO-Crate Root](https://www.researchobject.org/ro-crate/specification/1.2/root-data-entity.html#direct-properties-of-the-root-data-entity): |
25 | 19 |
|
26 | | -Try to add the `name`, `description` and `datePublished` properties, |
27 | | -and for `license` as a cross-reference, |
28 | | -use [SPDX](https://spdx.org/licenses/) license list to find the identifier for Creative Commons Zero |
29 | | -or another license of your choice: |
30 | | - |
31 | | -::::::::::::::: solution |
32 | 20 | ```json |
33 | 21 | { |
34 | | - "@id": "./", |
35 | | - "@type": "Dataset", |
36 | | - "hasPart": [ ], |
37 | | - "name": "Example crate", |
38 | | - "description": "I created this example by following the tutorial", |
39 | | - "datePublished": "2023-05-22", |
40 | | - "license": { "@id": "http://spdx.org/licenses/CC0-1.0"} |
| 22 | + "@id": "./", |
| 23 | + "@type": "Dataset", |
| 24 | + "hasPart": [ |
| 25 | + |
| 26 | + ] |
41 | 27 | } |
42 | 28 | ``` |
43 | | -::::::::::::::::::::::::: |
44 | 29 |
|
45 | | -:::::::::::::::::::::::::::::::::::::::::::::::::: |
| 30 | +By convention, in RO-Crate the `@id` value of `./` means that this entity describes the folder in which the RO-Crate metadata file is located. The root data entity always has the `@type` value of `Dataset`, which is a [schema.org](https://schema.org/Dataset) type. |
| 31 | +This will be referenced from `ro-crate-metadata.json`, semantically marking the `crate1` folder as being the RO-Crate Root. |
46 | 32 |
|
47 | 33 |
|
48 | | -:::::::::::::::::::::::::::::::::::::::: callout |
49 | | -## License identifiers |
50 | | - |
51 | | -In the above solution, |
52 | | -the identifier for CC0-1.0 <http://spdx.org/licenses/CC0-1.0> is slightly |
53 | | -different from their listed web page URI <https://spdx.org/licenses/CC0-1.0.html> |
54 | | --- the former is chosen to align with [SPDX JSON-LD identifiers](https://github.com/spdx/license-list-data/tree/main/jsonld), |
55 | | -which unfortunately are not shown directly on their website as _permalinks_. |
56 | | -It is not a requirement in RO-Crate to use permalinks for `@id` of entities like licenses, |
57 | | -it is nevertheless best practice to propagate permalinks where known. |
| 34 | +:::::::::::::::::::::::::::::::::::::::: discussion |
| 35 | +## RO-Crates can be published on the Web |
| 36 | + |
| 37 | +This example is a folder-based RO-Crate stored on disk, |
| 38 | +and therefore absolute paths are avoided, |
| 39 | +e.g. in case the root folder is moved or archived as a ZIP file. |
| 40 | + |
| 41 | +If the crate is being served from a Web service, |
| 42 | +such as a data repository or database where files are not organized in folders, |
| 43 | +then the `@id` might be an absolute URI instead of `./` |
| 44 | +-- this is one reason why we point to the root entity from the metadata descriptor, |
| 45 | +as you will see in the next section. |
58 | 46 | :::::::::::::::::::::::::::::::::::::::::::::::::: |
59 | 47 |
|
60 | | -:::::::::::::::::::::::::::::::::::::::: discussion |
61 | | -## Choosing a license |
| 48 | +:::::::::::::::::::::::::::::::::::::::: challenge |
| 49 | +## Add an additional type |
| 50 | + |
| 51 | +1. Navigate the schema.org type list to find a subtype of `CreativeWork` that is suitable for a learning resource. |
| 52 | +2. Modify the root entity's `@type` to be an array. |
| 53 | +3. Add the type name for learning resource at the end of the array. |
62 | 54 |
|
63 | | -Choosing a license appropriate for your dataset can be non-trivial, |
64 | | -particularly if third-party data/software and multiple organizations are involved. |
65 | | -See [FAIR Cookbook on licensing](https://faircookbook.elixir-europe.org/content/recipes/reusability/ATI-licensing.html). |
66 | | -It is worth noting that an RO-Crate permits data entities to have a `license` different from the overall Crate license. |
67 | | -It is still recommended to choose an overall Crate license that can legally apply across all the content in the RO-Crate Root. |
| 55 | +::::::::::::::: solution |
| 56 | +```json |
| 57 | +{ |
| 58 | + "@id": "./", |
| 59 | + "@type": ["Dataset", "LearningResource"], |
| 60 | + "hasPart": [ |
| 61 | + {"@id": "data.csv"} |
| 62 | + ], |
| 63 | + "…": "…" |
| 64 | +} |
| 65 | +``` |
| 66 | +::::::::::::::::::::::::: |
68 | 67 | :::::::::::::::::::::::::::::::::::::::::::::::::: |
69 | 68 |
|
| 69 | +The root has several metadata properties that describe the RO-Crate as a whole, |
| 70 | +considering it as a Research Object of collected resources. |
| 71 | +In the next section we will cover the required and recommended properties of the root `./`. |
| 72 | + |
70 | 73 | :::::::::::::::::::::::::::::::::::::::: keypoints |
71 | | -- Name, description, date published and license are required for the RO-Crate Root |
72 | | -- RO-Crate allows multiple licenses for different parts |
| 74 | +- The RO-Crate Root is the top-level object of the RO-Crate |
| 75 | +- The root identifier is commonly just ./ for the current folder, but can be a URL |
| 76 | +- The root is always typed as a Dataset, but can have additional types |
73 | 77 | :::::::::::::::::::::::::::::::::::::::::::::::::: |
0 commit comments