From 17c27b017a6015f02d1453a514df0e8bbdf87422 Mon Sep 17 00:00:00 2001 From: David Lemire Date: Wed, 16 Nov 2022 10:23:55 -0500 Subject: [PATCH 1/6] initial draft text for music lib example --- imjadn-v1.0-cn01.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/imjadn-v1.0-cn01.md b/imjadn-v1.0-cn01.md index 404bfc5..6e98a88 100644 --- a/imjadn-v1.0-cn01.md +++ b/imjadn-v1.0-cn01.md @@ -1395,6 +1395,45 @@ Possible example subjects: - SDO management system (similar to OASIS Kavi) - Music Database (artists, albums, songs, tracks, metadata, guest artists) +### 3.3.1 Example 1: A Digital Music Library + +This example shows a simple IM for a digital music library. The +model assumes that each track is stored as a file with its audio +in one of several formats. The library organizes tracks into +albums, which as associated with a UPC-A barcode (a 12-digit +number). The model is loosely based on the ID3 metadata used with +MP3 audio files. + +At the top level, the library is map of barcodes to albums. + +> insert top level JIDL: package, Library, Barcode + +Each album is then represented by a record of artist, title, +publication data, cover art and an array of individual audio +tracks. Multiple digital image formats are supported for the +cover art. + +> Insert JIDL: Album, Pubdata, Cover art, imageFormat + +Artists have a name and one or more associated instruments that +they perform on. + +> Insert JIDL: Artist, Instrument + +Each track is stored in a file, and has a track number within the +album, title, length, potentially "featured" artists, and the +audio data. Multiple digital audio formats are supported for +the audio content. + +> Insert JIDL: Track, Audio, Audio format + +The entity relationship diagram in Figure 3-10 illustrates how +the model components connect. The complete JIDL and JADN for the +model are presented in Appendix *X*. + +###### Figure 3-10 -- Music Library Example ERD +> image to be supplied + ------- # 4 Advanced Techniques From 63f00ebe85b0e71c90529b7684f23776a002c5a8 Mon Sep 17 00:00:00 2001 From: David Lemire Date: Wed, 16 Nov 2022 10:32:34 -0500 Subject: [PATCH 2/6] tune IM description text --- imjadn-v1.0-cn01.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/imjadn-v1.0-cn01.md b/imjadn-v1.0-cn01.md index 6e98a88..088c93a 100644 --- a/imjadn-v1.0-cn01.md +++ b/imjadn-v1.0-cn01.md @@ -1400,39 +1400,40 @@ Possible example subjects: This example shows a simple IM for a digital music library. The model assumes that each track is stored as a file with its audio in one of several formats. The library organizes tracks into -albums, which as associated with a UPC-A barcode (a 12-digit +albums, which are associated with a UPC-A barcode (a 12-digit number). The model is loosely based on the ID3 metadata used with MP3 audio files. At the top level, the library is map of barcodes to albums. -> insert top level JIDL: package, Library, Barcode +> insert top level JIDL: **package, Library, Barcode** Each album is then represented by a record of artist, title, publication data, cover art and an array of individual audio tracks. Multiple digital image formats are supported for the cover art. -> Insert JIDL: Album, Pubdata, Cover art, imageFormat +> Insert JIDL: **Album, Pubdata, Cover art, imageFormat** Artists have a name and one or more associated instruments that they perform on. -> Insert JIDL: Artist, Instrument +> Insert JIDL: **Artist, Instrument** Each track is stored in a file, and has a track number within the album, title, length, potentially "featured" artists, and the audio data. Multiple digital audio formats are supported for the audio content. -> Insert JIDL: Track, Audio, Audio format +> Insert JIDL: **Track, Audio, Audio format** The entity relationship diagram in Figure 3-10 illustrates how the model components connect. The complete JIDL and JADN for the model are presented in Appendix *X*. ###### Figure 3-10 -- Music Library Example ERD -> image to be supplied +> image to be supplied \ +> appendix content to be supplied ------- # 4 Advanced Techniques From 919bcc9910f81694cf7e7330051af607de9347f5 Mon Sep 17 00:00:00 2001 From: David Lemire Date: Tue, 6 Dec 2022 10:11:01 -0500 Subject: [PATCH 3/6] draft music library JIDL --- imjadn-v1.0-cn01.md | 74 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/imjadn-v1.0-cn01.md b/imjadn-v1.0-cn01.md index 088c93a..27699b6 100644 --- a/imjadn-v1.0-cn01.md +++ b/imjadn-v1.0-cn01.md @@ -1408,6 +1408,21 @@ At the top level, the library is map of barcodes to albums. > insert top level JIDL: **package, Library, Barcode** +``` + title: "Music Library" + package: "http://fake-audio.org/music-lib" + version: "1.0" + description: "This information model defines a library of audio tracks, organized by album" + license: "CC0-1.0" + exports: ["Library", "Album", "Track"] + + +// Top level of the library is a map of CDs by barcode +Library = MapOf(barcode, Album){1..*} + +Barcode = String /regex {%^\d{12}$%} // A UPC-A barcode is 12 digits +``` + Each album is then represented by a record of artist, title, publication data, cover art and an array of individual audio tracks. Multiple digital image formats are supported for the @@ -1415,11 +1430,51 @@ cover art. > Insert JIDL: **Album, Pubdata, Cover art, imageFormat** +``` +Album = Record // model for the album + 1 artist Artist // artist associated with this album + 2 title String // commonly known title for this album + 3 pub_data Publication-Data // metadata about album publication + 4 tracks ArrayOf(Track)[1..*] // individual track descriptions + 5 cover_art Cover-Art // cover art image for this album + +Publication-Data = Record // who and when of publication + 1 label String // name of record label + 2 rel_date String /date // and when did they let this drop + +Cover-Art = Record // pretty picture for the album + 1 i_format Image-Format // what type of image file? + 2 i_content Binary // the image data in the identified format + + +Image-Format = Enumerated extend // can only be one, but can extend list + 1 PNG + 2 JPG +``` + Artists have a name and one or more associated instruments that they perform on. > Insert JIDL: **Artist, Instrument** +``` +Artist = Record // interesting information about the performers + 1 artist_name String // who is this person + 2 instruments ArrayOf(Instrument)[1..*] // and what do they play + +Instrument = Enumerated extend // collection of instruments (non-exhaustive) + 1 vocals + 2 guitar + 3 bass + 4 drums + 5 keyboards + 6 percussion + 7 brass + 8 woodwinds + 9 harmonica +``` + + Each track is stored in a file, and has a track number within the album, title, length, potentially "featured" artists, and the audio data. Multiple digital audio formats are supported for @@ -1427,6 +1482,25 @@ the audio content. > Insert JIDL: **Track, Audio, Audio format** +``` +Track = Record // information about the individual audio tracks + 1 t_number Number // track sequence number + 2 title String // track title + 3 length String /time // length of track + 4 featured ArrayOf(Artist){0..*} // important guest performers + 5 audio Audio // the all important content + +Audio = Record // information about what gets played + 1 a_format Audio-Format // what type of audio file? + 2 a_content Binary // the audio data in the identified format + + +Audio-Format = Enumerated extend // can only be one, but can extend list + 1 MP3 + 2 OGG + 3 FLAC +``` + The entity relationship diagram in Figure 3-10 illustrates how the model components connect. The complete JIDL and JADN for the model are presented in Appendix *X*. From b20e0bd2ff352258e409b7621b6ee25aadab341d Mon Sep 17 00:00:00 2001 From: David Lemire Date: Tue, 6 Dec 2022 11:07:35 -0500 Subject: [PATCH 4/6] simplify exports --- imjadn-v1.0-cn01.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imjadn-v1.0-cn01.md b/imjadn-v1.0-cn01.md index 27699b6..a922914 100644 --- a/imjadn-v1.0-cn01.md +++ b/imjadn-v1.0-cn01.md @@ -1414,7 +1414,7 @@ At the top level, the library is map of barcodes to albums. version: "1.0" description: "This information model defines a library of audio tracks, organized by album" license: "CC0-1.0" - exports: ["Library", "Album", "Track"] + exports: ["Library"] // Top level of the library is a map of CDs by barcode From dfcf758bc191f46e7a01b0060c085212d227682d Mon Sep 17 00:00:00 2001 From: David Lemire Date: Tue, 6 Dec 2022 11:51:21 -0500 Subject: [PATCH 5/6] correct t_number type --- imjadn-v1.0-cn01.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imjadn-v1.0-cn01.md b/imjadn-v1.0-cn01.md index a922914..8c8ddea 100644 --- a/imjadn-v1.0-cn01.md +++ b/imjadn-v1.0-cn01.md @@ -1484,7 +1484,7 @@ the audio content. ``` Track = Record // information about the individual audio tracks - 1 t_number Number // track sequence number + 1 t_number Integer{0..*} // track sequence number 2 title String // track title 3 length String /time // length of track 4 featured ArrayOf(Artist){0..*} // important guest performers From d361f78618c92c1a6d64bfbdbdf864793ecba372 Mon Sep 17 00:00:00 2001 From: David Lemire Date: Tue, 6 Dec 2022 16:47:40 -0500 Subject: [PATCH 6/6] fix barcode regex spec in JIDL --- imjadn-v1.0-cn01.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imjadn-v1.0-cn01.md b/imjadn-v1.0-cn01.md index 8c8ddea..d98f107 100644 --- a/imjadn-v1.0-cn01.md +++ b/imjadn-v1.0-cn01.md @@ -1420,7 +1420,7 @@ At the top level, the library is map of barcodes to albums. // Top level of the library is a map of CDs by barcode Library = MapOf(barcode, Album){1..*} -Barcode = String /regex {%^\d{12}$%} // A UPC-A barcode is 12 digits +Barcode = String{pattern="^\d{12}$"} // A UPC-A barcode is 12 digits ``` Each album is then represented by a record of artist, title,