Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rules for combining information from info blocks #26

Open
cabo opened this issue Mar 11, 2021 · 4 comments
Open

Rules for combining information from info blocks #26

cabo opened this issue Mar 11, 2021 · 4 comments
Labels

Comments

@cabo
Copy link
Member

cabo commented Mar 11, 2021

(From IETF 110 ASDF WG meeting.)

@cabo cabo added the 1.next label Mar 11, 2021
@cabo
Copy link
Member Author

cabo commented Mar 11, 2021

We might need to create info blocks for sections or other partial components.

@nwidell
Copy link
Member

nwidell commented Mar 14, 2022

Needs more design
Info block is extensible - what is the special status of the four fields compared to other things. They are optional so we can decide to no longer use them - look have others have resolved this (e..g, YANG sem-ver, metadata, OPSAREA WG license info to YANG docs) - evolvability question
keep optional in SDF, mandatory in OneDM
let's test it as part of extension mechanism

@JKRhb
Copy link
Collaborator

JKRhb commented Apr 14, 2022

I am not sure if this is the right place to put it, but I recently discovered two use cases that are currently not covered by the info block which might relate to this issue (otherwise the comment could be moved to its own one).

The first use case concerns nested models that are supposed to be converted to SDF, where different levels contain different "info block information". One example could be two WoT Thing Models, where one TM acts as the other's submodel, and both have different licenses (see the two JSON listings below). If I see it correctly, there is currently no way to map this to SDF (my current solution is to only use the license from the top-level model).

{
    "@context": [
        "https://www.w3.org/2022/wot/td/v1.1"
    ],
    "@type": "tm:ThingModel",
    "title": "Top-level Thing Model",
    "links": [
        {
            "href": "https://example.com/license",
            "rel": "license"
        },
        {
            "href": "./submodel",
            "rel": "tm:submodel",
            "instanceName": "Submodel"
        }
    ]
}
{
    "@context": [
        "https://www.w3.org/2022/wot/td/v1.1"
    ],
    "@type": "tm:ThingModel",
    "title": "Submodel",
    "links": [
        {
            "href": "https://example.com/differentLicense",
            "rel": "license"
        }
    ]
}

Related to this is the case when you are referring to another SDF model with different info block information using sdfRef and create a "consolidated" model, dereferencing the referenced definitions. The licensing information from the other model would simply disappear in this case.

One possible solution I see for these two use cases is to add the info block to the common qualities, allowing you to override the top-level one when needed. A mapped SDF model of the TM examples above could then look like this:

{
    "info": {
        "license": "https://example.com/license"
    },
    "sdfThing": {
        "topLevelModel": {
            "label": "Top-level Thing Model",
            "sdfObject": {
                "Submodel": {
                    "label": "Submodel",
                    "info": {
                        "license": "https://example.com/differentLicense"
                    }
                }
            }
        }
    }
}

I think this could work well, I am looking forward to discuss this with you :)

@cabo
Copy link
Member Author

cabo commented Apr 14, 2022

I think generally combining models that have different licenses requires human intervention. As the result of that intervention, you will be able to state a single license of the combined model. (If not, it doesn't really make sense to combine them.)

There is a reason we put the info block into a header position (as opposed to burying it in the tree)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants