Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
timothee-haudebourg committed Apr 4, 2024
1 parent d98febc commit f2cac66
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion layouts/examples/simple_record.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "https://example.org/#SimpleRecord",
"type": "record",
"prefixes": { "tldr": "https://treeldr.org/layouts#" },
"prefixes": { "tldr": "https://treeldr.org/prelude#" },
"fields": {
"id": {
"intro": [],
Expand Down
2 changes: 1 addition & 1 deletion layouts/prelude/boolean.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"id": "https://treeldr.org/layouts#boolean",
"id": "https://treeldr.org/prelude#boolean",
"type": "boolean"
}
2 changes: 1 addition & 1 deletion layouts/prelude/i16.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "https://treeldr.org/layouts#i16",
"id": "https://treeldr.org/prelude#i16",
"type": "number",
"datatype": "http://www.w3.org/2001/XMLSchema#short"
}
2 changes: 1 addition & 1 deletion layouts/prelude/i32.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "https://treeldr.org/layouts#i32",
"id": "https://treeldr.org/prelude#i32",
"type": "number",
"datatype": "http://www.w3.org/2001/XMLSchema#int"
}
2 changes: 1 addition & 1 deletion layouts/prelude/i64.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "https://treeldr.org/layouts#i64",
"id": "https://treeldr.org/prelude#i64",
"type": "number",
"datatype": "http://www.w3.org/2001/XMLSchema#long"
}
2 changes: 1 addition & 1 deletion layouts/prelude/i8.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "https://treeldr.org/layouts#i8",
"id": "https://treeldr.org/prelude#i8",
"type": "number",
"datatype": "http://www.w3.org/2001/XMLSchema#byte"
}
2 changes: 1 addition & 1 deletion layouts/prelude/id.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"id": "https://treeldr.org/layouts#id",
"id": "https://treeldr.org/prelude#id",
"type": "id"
}
2 changes: 1 addition & 1 deletion layouts/prelude/string.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"id": "https://treeldr.org/layouts#string",
"id": "https://treeldr.org/prelude#string",
"type": "string"
}
2 changes: 1 addition & 1 deletion layouts/prelude/u16.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "https://treeldr.org/layouts#u16",
"id": "https://treeldr.org/prelude#u16",
"type": "number",
"datatype": "http://www.w3.org/2001/XMLSchema#unsignedShort"
}
2 changes: 1 addition & 1 deletion layouts/prelude/u32.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "https://treeldr.org/layouts#u32",
"id": "https://treeldr.org/prelude#u32",
"type": "number",
"datatype": "http://www.w3.org/2001/XMLSchema#unsignedInt"
}
2 changes: 1 addition & 1 deletion layouts/prelude/u64.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "https://treeldr.org/layouts#u64",
"id": "https://treeldr.org/prelude#u64",
"type": "number",
"datatype": "http://www.w3.org/2001/XMLSchema#unsignedLong"
}
2 changes: 1 addition & 1 deletion layouts/prelude/u8.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "https://treeldr.org/layouts#u8",
"id": "https://treeldr.org/prelude#u8",
"type": "number",
"datatype": "http://www.w3.org/2001/XMLSchema#unsignedByte"
}
2 changes: 1 addition & 1 deletion layouts/prelude/unit.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"id": "https://treeldr.org/layouts#unit",
"id": "https://treeldr.org/prelude#unit",
"type": "unit"
}
2 changes: 1 addition & 1 deletion layouts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ pub use value::{Literal, TypedLiteral, TypedValue, Value};
/// let mut builder = abs::Builder::new();
/// let layout: abs::syntax::Layout = serde_json::from_value(json!({
/// "type": "record",
/// "prefixes": { "tldr": "https://treeldr.org/layouts#" },
/// "prefixes": { "tldr": "https://treeldr.org/prelude#" },
/// "fields": {
/// "name": {
/// "value": "tldr:string", // This layout is defined in the prelude.
Expand Down
24 changes: 12 additions & 12 deletions layouts/src/preset.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
use iref::Iri;
use static_iref::iri;

const ID_LAYOUT: &Iri = iri!("https://treeldr.org/layouts#id");
const UNIT_LAYOUT: &Iri = iri!("https://treeldr.org/layouts#unit");
const BOOLEAN_LAYOUT: &Iri = iri!("https://treeldr.org/layouts#boolean");
const U8_LAYOUT: &Iri = iri!("https://treeldr.org/layouts#u8");
const U16_LAYOUT: &Iri = iri!("https://treeldr.org/layouts#u16");
const U32_LAYOUT: &Iri = iri!("https://treeldr.org/layouts#u32");
const U64_LAYOUT: &Iri = iri!("https://treeldr.org/layouts#u64");
const I8_LAYOUT: &Iri = iri!("https://treeldr.org/layouts#i8");
const I16_LAYOUT: &Iri = iri!("https://treeldr.org/layouts#i16");
const I32_LAYOUT: &Iri = iri!("https://treeldr.org/layouts#i32");
const I64_LAYOUT: &Iri = iri!("https://treeldr.org/layouts#i64");
const STRING_LAYOUT: &Iri = iri!("https://treeldr.org/layouts#string");
const ID_LAYOUT: &Iri = iri!("https://treeldr.org/prelude#id");
const UNIT_LAYOUT: &Iri = iri!("https://treeldr.org/prelude#unit");
const BOOLEAN_LAYOUT: &Iri = iri!("https://treeldr.org/prelude#boolean");
const U8_LAYOUT: &Iri = iri!("https://treeldr.org/prelude#u8");
const U16_LAYOUT: &Iri = iri!("https://treeldr.org/prelude#u16");
const U32_LAYOUT: &Iri = iri!("https://treeldr.org/prelude#u32");
const U64_LAYOUT: &Iri = iri!("https://treeldr.org/prelude#u64");
const I8_LAYOUT: &Iri = iri!("https://treeldr.org/prelude#i8");
const I16_LAYOUT: &Iri = iri!("https://treeldr.org/prelude#i16");
const I32_LAYOUT: &Iri = iri!("https://treeldr.org/prelude#i32");
const I64_LAYOUT: &Iri = iri!("https://treeldr.org/prelude#i64");
const STRING_LAYOUT: &Iri = iri!("https://treeldr.org/prelude#string");

pub enum PresetLayout {
Id,
Expand Down

0 comments on commit f2cac66

Please sign in to comment.