Skip to content

Commit

Permalink
Updating readme for actual rust lib
Browse files Browse the repository at this point in the history
  • Loading branch information
mburridge96 committed Feb 23, 2024
1 parent c2f788e commit 8c45eaf
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
Binary file added docs/ro-crate-structure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions ro-crate-metadata.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
46 changes: 46 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -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")





0 comments on commit 8c45eaf

Please sign in to comment.