editdor
editdor copied to clipboard
Request new Title and ID in dialog to generate a TD out of a TM
Thing Descriptions being generated out of Thing Models are keeping the title
and id
of the model. But typically you'll want different values for both fields. It would be nice to have to optional text boxes to define them in the "Generated TD from TM" dialog.
The best way for initiating this is to use the placeholder concept. See the example here:

If you click on "Convert to TD" it will ask you to assign specific title and id for the TD instance.
But if your TM has both title
and id
(like in this example), then you'd have to replace them with PLACEHOLDERS on ediTDor. Therefore IMO that's only a workaround.
Just to avoid misunderstanding: The placeholder concept is a TM feature and not a specific ediTDor feature. Please see here.
Yes, I'm clear about that.
What I mean is that if my TM has title
and id
(what I would expect to clearly identify them) instead of placeholders, then those values need to be replaced with placeholders somewhere before letting ediTDor generate the TDs.
I think that we should not make such assumptions, especially about the title since it is not meant to be unique. All Siemens iQ500 Washing Machines can have the title Siemens iQ500 Washing Machine
that is displayed on a UI. In this case, the title for the TD can be already defined in the TM and never changed.
id
can be more up for discussion, i.e. whether it is allowed to conserve the id
in TM->TD process. A more fundamental question is whether a TM should have an id
. In the end, theoretically, id
is for a Thing and not for a TD nor TM (https://w3c.github.io/wot-thing-description/#thing). In the TM stage, there should not even be an id
unless there are placeholders, e.g. "id": "urn:dev:ops:32473-iq500wm-{{serial_number}}",
.
In any case, I would propose to move this discussion to the TD spec since editdor is not doing something wrong according to the TD spec.
@egekorkan you're right with the assumptions WRT title
. I see following options that might be valid use-cases and comply with the specification and should be somehow realizable with ediTDor:
- TM has a
title
different from that of the TDs. - TM doesn't have any
title
and a title with placeholders can be used to be replaced on TD generation. - TM has the same
title
as the generated TDs (pretty much what is mentioned in your comment or in the example I've mentioned above).
WRT the id
, IMO TMs should definitively have their own id
s different from those of the TDs. Having a TM id
with a placeholder would help differentiating it from the instantiated TDs, but would be somehow weird. IMO the way IDs are being used example I've mentioned above makes much more sense. And that's something ediTDor doesn't support as of now.