@@ -161,35 +161,63 @@ export class AssetInterfaceDescriptionUtil {
161161 }
162162 }
163163
164+ const values = [
165+ {
166+ idShort : "title" ,
167+ valueType : "xs:string" ,
168+ value : td . title ,
169+ modelType : "Property" ,
170+ semanticId : this . createSemanticId ( "https://www.w3.org/2019/wot/td#title" ) ,
171+ } ,
172+ this . createEndpointMetadata ( td , protocol , aidID , submodelElementIdShort ) , // EndpointMetadata like base, security and securityDefinitions
173+ this . createInteractionMetadata ( td , protocol ) , // InteractionMetadata like properties, actions and events
174+ // Note: "ExternalDescriptor" should contain file values --> not applicable to TD
175+ /* {
176+ idShort: "ExternalDescriptor",
177+ semanticId: this.createSemanticId(
178+ "https://admin-shell.io/idta/AssetInterfacesDescription/1/0/ExternalDescriptor"
179+ ),
180+ // embeddedDataSpecifications ?
181+ value: [],
182+ modelType: "SubmodelElementCollection",
183+ }, */
184+ ] ;
185+ if ( td . created != null ) {
186+ values . push ( {
187+ idShort : "created" ,
188+ valueType : "xs:dateTime" ,
189+ value : td . created ,
190+ modelType : "Property" ,
191+ semanticId : this . createSemanticId ( "http://purl.org/dc/terms/created" ) ,
192+ } ) ;
193+ }
194+ if ( td . modified != null ) {
195+ values . push ( {
196+ idShort : "modified" ,
197+ valueType : "xs:dateTime" ,
198+ value : td . modified ,
199+ modelType : "Property" ,
200+ semanticId : this . createSemanticId ( "http://purl.org/dc/terms/modified" ) ,
201+ } ) ;
202+ }
203+ if ( td . support != null ) {
204+ values . push ( {
205+ idShort : "support" ,
206+ valueType : "xs:anyURI" ,
207+ value : td . support ,
208+ modelType : "Property" ,
209+ semanticId : this . createSemanticId ( "https://www.w3.org/2019/wot/td#supportContact" ) ,
210+ } ) ;
211+ }
212+
164213 const submdelElement = {
165214 idShort : submodelElementIdShort ,
166215 semanticId : this . createSemanticId (
167216 "https://admin-shell.io/idta/AssetInterfacesDescription/1/0/Interface"
168217 ) ,
169218 supplementalSemanticIds,
170219 // embeddedDataSpecifications needed?
171- value : [
172- {
173- idShort : "title" ,
174- valueType : "xs:string" ,
175- value : td . title ,
176- modelType : "Property" ,
177- semanticId : this . createSemanticId ( "https://www.w3.org/2019/wot/td#title" ) ,
178- } ,
179- // created, modified, support ?
180- this . createEndpointMetadata ( td , protocol , aidID , submodelElementIdShort ) , // EndpointMetadata like base, security and securityDefinitions
181- this . createInteractionMetadata ( td , protocol ) , // InteractionMetadata like properties, actions and events
182- // Note: "ExternalDescriptor" should contain file values --> not applicable to TD
183- /* {
184- idShort: "ExternalDescriptor",
185- semanticId: this.createSemanticId(
186- "https://admin-shell.io/idta/AssetInterfacesDescription/1/0/ExternalDescriptor"
187- ),
188- // embeddedDataSpecifications ?
189- value: [],
190- modelType: "SubmodelElementCollection",
191- }, */
192- ] ,
220+ value : values ,
193221 modelType : "SubmodelElementCollection" ,
194222 } ;
195223
0 commit comments