Extending ontology creates double properties
Closed this issue · 8 comments
Hi,
When I'm trying to extend the ontology according to the following scheme:
The properties are duplicated, which is of course not desired. Am I doing something wrong or is this a bug?
JSON-files:
{
"@id": "dtmi:org:auge:Building;1",
"@type": "Interface",
"description": {
"en": "Aug.e version of building."
},
"displayName": "Building",
"@context": "dtmi:dtdl:context;2",
"extends" : [
"dtmi:org:w3id:rec:Building;1",
"dtmi:org:auge:Space;1"
]
}
{
"@id": "dtmi:org:auge:Space;1",
"@type": "Interface",
"contents": [
{
"@type": "Property",
"description": {
"en": "The number of people who can fit in a Space."
},
"displayName": {
"en": "person capacity"
},
"name": "personCapacity",
"schema": "integer",
"writable": true
},
{
"@type": "Relationship",
"description": {
"en": "Generic property indicating which sensors that are configured or designed to observe some feature, system, phenomenon, etc. Inverse of: observes"
},
"displayName": {
"en": "observed by"
},
"name": "observedBy",
"target": "dtmi:org:brickschema:schema:Brick:Sensor;1"
},
{
"@type": "Relationship",
"description": {
"en": "Indicates that a Space or Asset is served by some Sensor/Actuator or other Asset. For example: an entrance room might be served by (e.g., covered by) some camera equipment, or a conference room served by a CO2 sensor. Note that Assets can also service one another, e.g., an air-treatment Asset might serve an air diffuser Asset. Inverse of: serves"
},
"displayName": {
"en": "served by"
},
"name": "servedBy"
}
],
"displayName": {
"en": "Aug.e Space"
},
"extends" : "dtmi:org:w3id:rec:Space;1",
"@context": "dtmi:dtdl:context;2"
}
{
"@id": "dtmi:org:w3id:rec:Building;1",
"@type": "Interface",
"description": {
"en": "A confined building structure."
},
"displayName": {
"en": "Building"
},
"extends": "dtmi:org:w3id:rec:Architecture;1",
"@context": [
"dtmi:dtdl:context;2"
]
}
Interesting. You should not be seeing double such properties/relationships, unless if you inherit doubly from top-level concepts in REC, which should be avoided (e.g., something inheriting from both Space + Asset), or if you have multiple versions of the same Interface loaded.
We did have an issue with a regression on the Space interface in GitHub (not in a released version, just the main branch of the repo) that I just now addressed. Could you see if the latest main branch works better?
Alternatively, if your graph content is not sensitive, you could export it from ADT Explorer and post it here, and I could dig into it. The ADT Explorer export will contain both the models used and the twins and relationships, so should give a good starting point
Hey Karl, thanks for the quick response, here you go:
This looks correct to me. I'll check in with the ADT Explorer team.
Thanks! Keep me posted.
@mwdhont-auge - I've observed this as well with my extensions. In my testing, editing either of the duplicated fields results in the value getting updated just fine. I interpreted this as a bug in the ADT Explorer.
cc: @hammar
Still have not heard back on this, but given that it's the end of the year and a lot of colleagues are out on vacation, it may take until early January until I have something to report. Will keep you posted here when I hear something.
Hi Karl,
Thanks for your feedback, keep us posted.
Best wishes for 2023,
Michiel
I'm following up on this, but as it seems to be an ADT Explorer issue as opposed to a RealEstateCore ontology issue, and as it is cosmetic, I'll be closing it here as out-of-scope