diff --git a/Extractor/Nodes/UAReferenceType.cs b/Extractor/Nodes/UAReferenceType.cs index 508a38a5..124fe25f 100644 --- a/Extractor/Nodes/UAReferenceType.cs +++ b/Extractor/Nodes/UAReferenceType.cs @@ -27,6 +27,7 @@ namespace Cognite.OpcUa.Nodes public class ReferenceTypeAttributes : BaseNodeAttributes { public string? InverseName { get; set; } + public bool IsAbstract { get; set; } public ReferenceTypeAttributes() : base(NodeClass.ReferenceType) { } @@ -34,6 +35,7 @@ public ReferenceTypeAttributes() : base(NodeClass.ReferenceType) public override IEnumerable GetAttributeSet(FullConfig config) { yield return Attributes.InverseName; + yield return Attributes.IsAbstract; foreach (var attr in base.GetAttributeSet(config)) yield return attr; } @@ -44,6 +46,9 @@ public override void LoadAttribute(DataValue value, uint attributeId, TypeManage case Attributes.InverseName: InverseName = value.GetValue(null)?.Text; break; + case Attributes.IsAbstract: + IsAbstract = value.GetValue(false); + break; default: base.LoadAttribute(value, attributeId, typeManager); break; @@ -53,6 +58,7 @@ public override void LoadAttribute(DataValue value, uint attributeId, TypeManage public void LoadFromNodeState(ReferenceTypeState state) { InverseName = state.InverseName?.Text; + IsAbstract = state.IsAbstract; LoadFromBaseNodeState(state); } } diff --git a/Extractor/Pushers/FDM/BaseDataModelDefinitions.cs b/Extractor/Pushers/FDM/BaseDataModelDefinitions.cs index 44e90498..2740cddc 100644 --- a/Extractor/Pushers/FDM/BaseDataModelDefinitions.cs +++ b/Extractor/Pushers/FDM/BaseDataModelDefinitions.cs @@ -279,6 +279,13 @@ public static ContainerCreate ReferenceType(string space) UsedFor = UsedFor.node, Properties = new Dictionary { + { "IsAbstract", new ContainerPropertyDefinition + { + Type = BasePropertyType.Create(PropertyTypeVariant.boolean), + Nullable = false, + Name = "IsAbstract", + DefaultValue = new RawPropertyValue(false) + } }, { "InverseName", new ContainerPropertyDefinition { Type = BasePropertyType.Text(), diff --git a/Extractor/Pushers/FDM/InstanceBuilder.cs b/Extractor/Pushers/FDM/InstanceBuilder.cs index f123fd22..0979b6af 100644 --- a/Extractor/Pushers/FDM/InstanceBuilder.cs +++ b/Extractor/Pushers/FDM/InstanceBuilder.cs @@ -541,10 +541,13 @@ class ReferenceTypeData [JsonPropertyName("InverseName")] [JsonIgnore(Condition = JsonIgnoreCondition.Never)] public string? InverseName { get; } + [JsonPropertyName("IsAbstract")] + public bool IsAbstract { get; } public ReferenceTypeData(UAReferenceType node) { InverseName = node.FullAttributes.InverseName; + IsAbstract = node.FullAttributes.IsAbstract; } } diff --git a/Extractor/Pushers/FDM/TypeMetadata.cs b/Extractor/Pushers/FDM/TypeMetadata.cs index cf592fd4..ce4af078 100644 --- a/Extractor/Pushers/FDM/TypeMetadata.cs +++ b/Extractor/Pushers/FDM/TypeMetadata.cs @@ -18,6 +18,8 @@ public class PropertyNode public string? ReferenceType { get; set; } public string? DisplayName { get; set; } public string? ExternalId { get; set; } + public string? Description { get; set; } + public bool IsTimeseries { get; set; } } diff --git a/Extractor/Pushers/FDM/Types/NodeTypes.cs b/Extractor/Pushers/FDM/Types/NodeTypes.cs index 43e379be..df63a651 100644 --- a/Extractor/Pushers/FDM/Types/NodeTypes.cs +++ b/Extractor/Pushers/FDM/Types/NodeTypes.cs @@ -57,7 +57,9 @@ public TypeMetadata GetTypeMetadata() IsMandatory = pair.mandatory, ReferenceType = pair.reference.Type.Id.ToString(), DisplayName = pair.node.Name ?? "", - ExternalId = FDMUtils.SanitizeExternalId(pair.node.Name ?? "") + ExternalId = FDMUtils.SanitizeExternalId(pair.node.Name ?? ""), + IsTimeseries = !pair.node.IsRawProperty && pair.node.NodeClass == NodeClass.Variable, + Description = pair.node.Attributes.Description }; if (pair.node is UAVariable nVar)