diff --git a/docs/ro-crate-structure.png b/docs/ro-crate-structure.png new file mode 100644 index 0000000..c1cde1b Binary files /dev/null and b/docs/ro-crate-structure.png differ diff --git a/ro-crate-metadata.json b/ro-crate-metadata.json new file mode 100644 index 0000000..05aac98 --- /dev/null +++ b/ro-crate-metadata.json @@ -0,0 +1,31 @@ +{ + "@context": "https://w3id.org/ro/crate/1.1/context", + "@graph": [ + { + "@id": "ro-crate-metadata.json", + "@type": "CreativeWork", + "conformsTo": { + "@id": "https://w3id.org/ro/crate/1.1" + }, + "about": { + "@id": "./" + } + }, + { + "@id": "./", + "@type": "Dataset", + "datePublished": "2024-02-23T14:38:51.132463984+00:00", + "license": { + "@id": "https://creativecommons.org/licenses/by-nc/4.0/deed.en" + } + }, + { + "@id": "data_entity.txt", + "@type": "File" + }, + { + "@id": "https://orcid.org/0000-0002-1825-0097", + "@type": "Person" + } + ] +} diff --git a/src/README.md b/src/README.md new file mode 100644 index 0000000..8d58f4f --- /dev/null +++ b/src/README.md @@ -0,0 +1,46 @@ +# Overview + +ro-crate-rs is a rust library that aims to provide a robust, portable +and scalable solution to dealing [RO-Crates](https://www.researchobject.org/ro-crate/1.1/) +within the varying software environments that are present across a +Synthetic Biology Laboratory stack (it's current focus). It enforces minimal +RO-Crate structure adherence through it's defined data types, but equally allows +the crate to be as expansive as needed. + +# Basic structure + +RO-Crates are based upon the JSON-LD (Javascript Object Notation for Linked Data Model), +using keys that have been defined in schema.org vocabularies, or other custom ontologies. In this library, +RO-Crates are deserialised directly into a `RoCrate` structure using `serde`. +The base Ro-Crate is formed out of a `struct RoCrate` containg a `@context` and a `@graph`. + +The `@context` object contains a value refering to either a: +- Reference Context +- Embedded Context +- Extended Context + +The `@graph` object is a `vector` containing other RO-Crate entity structures that are one of the following: +- Metadata Descriptor +- Root Data Entity +- Data Entity +- Contextual Entity + +Within the `@graph`, there can only be one Metadata Descriptor and Root Data Entity, whilst +there can be zero to many Data Entities or Contextual Entities + +Each entity structure consists of an `@id` (or `id` for struct field) and a `@type` +(or `type_` for struct field). For Metadata Descriptor and Root Data Entity, they +consist of other fields that have been determined to be a requirement by the +RO-Crate specification. + +Each entity structure also has a field called `dynamic_entity`, which allows the +population of any form of JSON-LD compatible value within the statically typed +requirements of rust. These, by default, are instantiated as `None`. + +Fig 1 is an example of a base RO-Crate: +![](../docs/ro-crate-structure.png "Basic RO-Crate structure") + + + + +