Implemented Details of Asset Administration Shell 2.0.1
Fixed AAS-XML schema validation
Refactored versioning of AAS schemas
Packages updated
diff --git a/sdks/dotnet/basyx-core/BaSyx.Models.Export/aas-spec-v1.0/EnvironmentSubmodel_V1_0.cs b/sdks/dotnet/basyx-core/BaSyx.Models.Export/aas-spec-v1.0/EnvironmentSubmodel_V1_0.cs
index 52dad0a..d37674e 100644
--- a/sdks/dotnet/basyx-core/BaSyx.Models.Export/aas-spec-v1.0/EnvironmentSubmodel_V1_0.cs
+++ b/sdks/dotnet/basyx-core/BaSyx.Models.Export/aas-spec-v1.0/EnvironmentSubmodel_V1_0.cs
@@ -19,14 +19,14 @@
{
public class EnvironmentSubmodel_V1_0 : EnvironmentIdentifiable_V1_0, IModelType
{
- [JsonProperty("semanticId")]
- [XmlElement("semanticId")]
- public EnvironmentReference_V1_0 SemanticId { get; set; }
-
[JsonProperty("kind")]
[XmlElement("kind")]
public ModelingKind Kind { get; set; }
+ [JsonProperty("semanticId")]
+ [XmlElement("semanticId")]
+ public EnvironmentReference_V1_0 SemanticId { get; set; }
+
[JsonProperty("constraints")]
[XmlArray("qualifier")]
[XmlArrayItem("qualifier")]
@@ -40,5 +40,29 @@
[JsonProperty("modelType")]
[XmlIgnore]
public ModelType ModelType => ModelType.Submodel;
+
+ public bool ShouldSerializeSemanticId()
+ {
+ if (SemanticId == null)
+ return false;
+ else
+ return true;
+ }
+
+ public bool ShouldSerializeQualifier()
+ {
+ if (Qualifier == null || Qualifier.Count == 0)
+ return false;
+ else
+ return true;
+ }
+
+ public bool ShouldSerializeSubmodelElements()
+ {
+ if (SubmodelElements == null || SubmodelElements.Count == 0)
+ return false;
+ else
+ return true;
+ }
}
}
\ No newline at end of file