Subject: Re: [Asdf] Composing sdfThings

From: Michael Koster <[email-masked]>
Date: Tue, 13 Apr 2021 09:09:30 -0700

Here is the updated outlet strip example, including suggestions from Carsten to add some common functions.

https://github.com/one-data-model/exploratory/blob/master/sdfThing/sdfthing-outletstrip.sdf.json <https://github.com/one-data-model/exploratory/blob/master/sdfThing/sdfthing-outletstrip.sdf.json>

To specify a fixed number of instances, I set minItems and maxItems to the same value.

Best regards,

Michael

> On Mar 31, 2021, at 11:44 AM, Ari Keränen <ari.keranen=[email-masked]> wrote:
> 
> Here's another strawman, based on Carsten's example, of a potential design with array of sdfObjects:
> https://github.com/one-data-model/exploratory/blob/master/sdfThing/fridgemultifreezer.sdf.json
> 
> It uses new "minItems" and "maxItems" qualities (similar to JSO min/maxItems for array type) to define how many freezer Objects can there be in the Thing.
> 
> This seems like a reasonable design, but there are still open questions like how to address those objects. One option is to use JSON pointer array syntax, e.g., a pointer to the 7th freezer object could look like:
> #/sdfThing/FridgeMulti-freezer/sdfObject/freezer/6
> 
> However, given the definition is not an actual array (it's JSON object with two new qualities), something like additional processing steps on the model would need to be applied before the JSON pointers can be used as such.
> 
> Another question is whether we should have minItems quality or should we use only sdfRequired also here. Unless we want to invent new wildcard syntax for sdfRequired, seems that sdfRequired would need to have separate pointer for each required instance. That could result in excessively large sdfRequired blocks so minItems seems like a reasonable shorthand for that.
> 
> 
> Cheers,
> Ari
> 
> On 29.3.2021, 19.13, "ASDF" <[email-masked]> wrote:
>> 
>> After today’s OneDM discussion, I put together a quick strawman that shows how to put together a fridge-freezer out of two refrigeration components.
>> 
>> https://github.com/one-data-model/exploratory/blob/master/sdfThing/fridgefreezer.sdf.json
>> 
>> This demonstrate static named composition.
>> It does not show how to do Ari’s use case of numbered composition (an array of sdfThings or sdfObjects in an sdfThing).
>> It also doesn’t demonstrate dynamic composition.
>> 
>> Grüße, Carsten
>> 
> 
> -- 
> ASDF mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/asdf