diff --git a/build/MTConnect.NET-SysML-Import/CSharp/TemplateRenderer.cs b/build/MTConnect.NET-SysML-Import/CSharp/TemplateRenderer.cs
index 8c8d17c1..643d4bc5 100644
--- a/build/MTConnect.NET-SysML-Import/CSharp/TemplateRenderer.cs
+++ b/build/MTConnect.NET-SysML-Import/CSharp/TemplateRenderer.cs
@@ -111,7 +111,12 @@ public static void Render(MTConnectModel mtconnectModel, string outputPath)
//case "Devices.Configurations.CriticalityType": ((EnumModel)template).Values.Add(new MTConnectEnumValueModel { Name = "NOT_SPECIFIED" }); break;
case "Assets.Asset": ((ClassModel)template).IsPartial = true; break;
- case "Assets.ComponentConfigurationParameters.ComponentConfigurationParameter": ((ClassModel)template).IsPartial = true; break;
+ case "Assets.ComponentConfigurationParameters.ComponentConfigurationParameters":
+ ((ClassModel)template).IsPartial = true;
+ ((ClassModel)template).Id += "Asset";
+ ((ClassModel)template).Name += "Asset";
+ if (((ClassModel)template).ParentName != null && ((ClassModel)template).ParentName != "Asset") ((ClassModel)template).ParentName += "Asset";
+ break;
case "Assets.CuttingTools.CuttingTool":
((ClassModel)template).IsPartial = true;
((ClassModel)template).Id += "Asset";
@@ -130,9 +135,36 @@ public static void Render(MTConnectModel mtconnectModel, string outputPath)
((ClassModel)template).IsPartial = true;
((ClassModel)template).IsAbstract = false;
break;
- case "Assets.Files.File": ((ClassModel)template).IsPartial = true; break;
- case "Assets.QIF.QIFDocument": ((ClassModel)template).IsPartial = true; break;
- case "Assets.RawMaterials.RawMaterial": ((ClassModel)template).IsPartial = true; break;
+ case "Assets.Files.File":
+ ((ClassModel)template).IsPartial = true;
+ ((ClassModel)template).Id += "Asset";
+ ((ClassModel)template).Name += "Asset";
+ if (((ClassModel)template).ParentName != null && ((ClassModel)template).ParentName != "Asset") ((ClassModel)template).ParentName += "Asset";
+ break;
+ case "Assets.Files.FileArchetype":
+ ((ClassModel)template).IsPartial = true;
+ ((ClassModel)template).Id += "Asset";
+ ((ClassModel)template).Name += "Asset";
+ if (((ClassModel)template).ParentName != null && ((ClassModel)template).ParentName != "Asset") ((ClassModel)template).ParentName += "Asset";
+ break;
+ case "Assets.Files.AbstractFile":
+ ((ClassModel)template).IsPartial = true;
+ ((ClassModel)template).Id += "Asset";
+ ((ClassModel)template).Name += "Asset";
+ if (((ClassModel)template).ParentName != null && ((ClassModel)template).ParentName != "Asset") ((ClassModel)template).ParentName += "Asset";
+ break;
+ case "Assets.QIF.QIFDocumentWrapper":
+ ((ClassModel)template).IsPartial = true;
+ ((ClassModel)template).Id += "Asset";
+ ((ClassModel)template).Name += "Asset";
+ if (((ClassModel)template).ParentName != null && ((ClassModel)template).ParentName != "Asset") ((ClassModel)template).ParentName += "Asset";
+ break;
+ case "Assets.RawMaterials.RawMaterial":
+ ((ClassModel)template).IsPartial = true;
+ ((ClassModel)template).Id += "Asset";
+ ((ClassModel)template).Name += "Asset";
+ if (((ClassModel)template).ParentName != null && ((ClassModel)template).ParentName != "Asset") ((ClassModel)template).ParentName += "Asset";
+ break;
}
templates.Add(template);
diff --git a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/ComponentConfigurationParametersAsset.cs b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/ComponentConfigurationParametersAsset.cs
deleted file mode 100644
index 8709644c..00000000
--- a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/ComponentConfigurationParametersAsset.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-using System;
-using System.Collections.Generic;
-using System.Text.Json.Serialization;
-using System.Xml.Serialization;
-
-namespace MTConnect.Assets.ComponentConfigurationParameters
-{
- ///
- /// Set of parameters that govern the functionality of the related Component
- ///
- [XmlRoot("ComponentConfigurationParameters")]
- public class ComponentConfigurationParametersAsset : Asset
- {
- public const string TypeId = "ComponentConfigurationParameters";
-
-
- ///
- /// Destinations organizes one or more Destination elements.
- ///
- [XmlArray("ParameterSets")]
- [XmlArrayItem("ParameterSet", typeof(ParameterSet))]
- [JsonPropertyName("parameterSets")]
- public List ParameterSets { get; set; }
-
- [XmlIgnore]
- public bool ParameterSetsSpecified => !ParameterSets.IsNullOrEmpty();
-
-
- public ComponentConfigurationParametersAsset()
- {
- Type = TypeId;
- }
-
-
- protected override IAsset OnProcess(Version mtconnectVersion)
- {
- if (mtconnectVersion != null && mtconnectVersion >= MTConnectVersions.Version22)
- {
- return this;
- }
-
- return null;
- }
-
- public override AssetValidationResult IsValid(Version mtconnectVersion)
- {
- var message = "";
- var result = true;
-
- if (ParameterSets.IsNullOrEmpty())
- {
- message = "At least one ParameterSet is Required";
- result = false;
- }
-
- return new AssetValidationResult(result, message);
- }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/ComponentConfigurationParameters.g.cs b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/ComponentConfigurationParametersAsset.g.cs
similarity index 87%
rename from src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/ComponentConfigurationParameters.g.cs
rename to src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/ComponentConfigurationParametersAsset.g.cs
index 4633bdfa..ecf42651 100644
--- a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/ComponentConfigurationParameters.g.cs
+++ b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/ComponentConfigurationParametersAsset.g.cs
@@ -8,7 +8,7 @@ namespace MTConnect.Assets.ComponentConfigurationParameters
///
/// Set of parameters that govern the functionality of the related Component.
///
- public class ComponentConfigurationParameters : Asset, IComponentConfigurationParameters
+ public partial class ComponentConfigurationParametersAsset : Asset, IComponentConfigurationParametersAsset
{
public new const string DescriptionText = "Set of parameters that govern the functionality of the related Component.";
diff --git a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ComponentConfigurationParametersDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/ComponentConfigurationParametersAssetDescriptions.g.cs
similarity index 85%
rename from src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ComponentConfigurationParametersDescriptions.g.cs
rename to src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/ComponentConfigurationParametersAssetDescriptions.g.cs
index a530a2ef..518c90ba 100644
--- a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ComponentConfigurationParametersDescriptions.g.cs
+++ b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/ComponentConfigurationParametersAssetDescriptions.g.cs
@@ -3,7 +3,7 @@
namespace MTConnect.Assets.ComponentConfigurationParameters
{
- public static class ComponentConfigurationParametersDescriptions
+ public static class ComponentConfigurationParametersAssetDescriptions
{
///
/// Set of parameters defining the configuration of a Component.
diff --git a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/ComponentConfigurationParametersDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/ComponentConfigurationParametersDescriptions.g.cs
deleted file mode 100644
index a530a2ef..00000000
--- a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/ComponentConfigurationParametersDescriptions.g.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.ComponentConfigurationParameters
-{
- public static class ComponentConfigurationParametersDescriptions
- {
- ///
- /// Set of parameters defining the configuration of a Component.
- ///
- public const string ParameterSets = "Set of parameters defining the configuration of a Component.";
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/IComponentConfigurationParameters.g.cs b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/IComponentConfigurationParameters.g.cs
deleted file mode 100644
index d475661b..00000000
--- a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/IComponentConfigurationParameters.g.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.ComponentConfigurationParameters
-{
- ///
- /// Set of parameters that govern the functionality of the related Component.
- ///
- public interface IComponentConfigurationParameters : IAsset
- {
- ///
- /// Set of parameters defining the configuration of a Component.
- ///
- System.Collections.Generic.IEnumerable ParameterSets { get; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/IComponentConfigurationParameters.g.cs b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/IComponentConfigurationParametersAsset.g.cs
similarity index 88%
rename from src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/IComponentConfigurationParameters.g.cs
rename to src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/IComponentConfigurationParametersAsset.g.cs
index d475661b..248fc24a 100644
--- a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/IComponentConfigurationParameters.g.cs
+++ b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/IComponentConfigurationParametersAsset.g.cs
@@ -6,7 +6,7 @@ namespace MTConnect.Assets.ComponentConfigurationParameters
///
/// Set of parameters that govern the functionality of the related Component.
///
- public interface IComponentConfigurationParameters : IAsset
+ public partial interface IComponentConfigurationParametersAsset : IAsset
{
///
/// Set of parameters defining the configuration of a Component.
diff --git a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ComponentConfigurationParameters.g.cs b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ComponentConfigurationParameters.g.cs
deleted file mode 100644
index 4633bdfa..00000000
--- a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ComponentConfigurationParameters.g.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-// MTConnect SysML v2.2 : UML ID = _19_0_3_68e0225_1678197202508_829668_17803
-
-namespace MTConnect.Assets.ComponentConfigurationParameters
-{
- ///
- /// Set of parameters that govern the functionality of the related Component.
- ///
- public class ComponentConfigurationParameters : Asset, IComponentConfigurationParameters
- {
- public new const string DescriptionText = "Set of parameters that govern the functionality of the related Component.";
-
-
- ///
- /// Set of parameters defining the configuration of a Component.
- ///
- public System.Collections.Generic.IEnumerable ParameterSets { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/IParameter.g.cs b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/IParameter.g.cs
deleted file mode 100644
index 6f5b1a3e..00000000
--- a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/IParameter.g.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.ComponentConfigurationParameters
-{
- ///
- /// Property defining a configuration of a Component.
- ///
- public interface IParameter
- {
- ///
- /// Internal identifier, register, or address.
- ///
- string Identifier { get; }
-
- ///
- /// Maximum allowed value.
- ///
- string Maximum { get; }
-
- ///
- /// Minimal allowed value.
- ///
- string Minimum { get; }
-
- ///
- /// Descriptive name.
- ///
- string Name { get; }
-
- ///
- /// Nominal value.
- ///
- string Nominal { get; }
-
- ///
- /// Engineering units.units **SHOULD** be SI or MTConnect Units (See UnitEnum).
- ///
- string Units { get; }
-
- ///
- /// Configured value.
- ///
- string Value { get; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/IParameterSet.g.cs b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/IParameterSet.g.cs
deleted file mode 100644
index cf9f752a..00000000
--- a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/IParameterSet.g.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.ComponentConfigurationParameters
-{
- ///
- /// Set of parameters defining the configuration of a Component.
- ///
- public interface IParameterSet
- {
- ///
- /// Name of the parameter set if more than one exists.
- ///
- string Name { get; }
-
- ///
- /// Property defining a configuration of a Component.
- ///
- System.Collections.Generic.IEnumerable Parameters { get; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/Parameter.cs b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/Parameter.cs
deleted file mode 100644
index 90a275f8..00000000
--- a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/Parameter.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-using System.Text.Json.Serialization;
-using System.Xml;
-using System.Xml.Serialization;
-
-namespace MTConnect.Assets.ComponentConfigurationParameters
-{
- ///
- /// Property defining a configuration of a Component
- ///
- public class Parameter
- {
- ///
- /// Internal identifier, register, or address.
- ///
- [XmlAttribute("identifier")]
- [JsonPropertyName("identifier")]
- public string Identifier { get; set; }
-
- ///
- /// Descriptive name.
- ///
- [XmlAttribute("name")]
- [JsonPropertyName("name")]
- public string Name { get; set; }
-
- ///
- /// Minimal allowed value.
- ///
- [XmlAttribute("minimum")]
- [JsonPropertyName("minimum")]
- public string Minimum { get; set; }
-
- ///
- /// Maximum allowed value.
- ///
- [XmlAttribute("maximum")]
- [JsonPropertyName("maximum")]
- public string Maximum { get; set; }
-
- ///
- /// Nominal value.
- ///
- [XmlAttribute("nominal")]
- [JsonPropertyName("nominal")]
- public string Nominal { get; set; }
-
- ///
- /// Configured value.
- ///
- [XmlAttribute("value")]
- [JsonPropertyName("value")]
- public string Value { get; set; }
-
- ///
- /// Engineering units. Units SHOULD be SI or MTConnect Units(See UnitEnum).
- ///
- [XmlAttribute("units")]
- [JsonPropertyName("units")]
- public string Units { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/Parameter.g.cs b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/Parameter.g.cs
deleted file mode 100644
index cc586cf1..00000000
--- a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/Parameter.g.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-// MTConnect SysML v2.2 : UML ID = _19_0_3_68e0225_1678197371649_500788_17992
-
-namespace MTConnect.Assets.ComponentConfigurationParameters
-{
- ///
- /// Property defining a configuration of a Component.
- ///
- public class Parameter : IParameter
- {
- public const string DescriptionText = "Property defining a configuration of a Component.";
-
-
- ///
- /// Internal identifier, register, or address.
- ///
- public string Identifier { get; set; }
-
- ///
- /// Maximum allowed value.
- ///
- public string Maximum { get; set; }
-
- ///
- /// Minimal allowed value.
- ///
- public string Minimum { get; set; }
-
- ///
- /// Descriptive name.
- ///
- public string Name { get; set; }
-
- ///
- /// Nominal value.
- ///
- public string Nominal { get; set; }
-
- ///
- /// Engineering units.units **SHOULD** be SI or MTConnect Units (See UnitEnum).
- ///
- public string Units { get; set; }
-
- ///
- /// Configured value.
- ///
- public string Value { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ParameterDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ParameterDescriptions.g.cs
deleted file mode 100644
index c11688d4..00000000
--- a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ParameterDescriptions.g.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.ComponentConfigurationParameters
-{
- public static class ParameterDescriptions
- {
- ///
- /// Internal identifier, register, or address.
- ///
- public const string Identifier = "Internal identifier, register, or address.";
-
- ///
- /// Maximum allowed value.
- ///
- public const string Maximum = "Maximum allowed value.";
-
- ///
- /// Minimal allowed value.
- ///
- public const string Minimum = "Minimal allowed value.";
-
- ///
- /// Descriptive name.
- ///
- public const string Name = "Descriptive name.";
-
- ///
- /// Nominal value.
- ///
- public const string Nominal = "Nominal value.";
-
- ///
- /// Engineering units.units **SHOULD** be SI or MTConnect Units (See UnitEnum).
- ///
- public const string Units = "Engineering units.units **SHOULD** be SI or MTConnect Units (See UnitEnum).";
-
- ///
- /// Configured value.
- ///
- public const string Value = "Configured value.";
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ParameterSet.cs b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ParameterSet.cs
deleted file mode 100644
index e5fb5a59..00000000
--- a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ParameterSet.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-using System.Collections.Generic;
-using System.Text.Json.Serialization;
-using System.Xml;
-using System.Xml.Serialization;
-
-namespace MTConnect.Assets.ComponentConfigurationParameters
-{
- ///
- /// Set of parameters defining the configuration of a Component
- ///
- public class ParameterSet
- {
- ///
- /// Set of parameters defining the configuration of a Component
- ///
- [XmlAttribute("name")]
- [JsonPropertyName("name")]
- public string Name { get; set; }
-
- ///
- /// Destinations organizes one or more Destination elements.
- ///
- [XmlArray("Parameters")]
- [XmlArrayItem("Parameter", typeof(Parameter))]
- [JsonPropertyName("parameters")]
- public List Parameters { get; set; }
-
- [XmlIgnore]
- public bool ParametersSpecified => !Parameters.IsNullOrEmpty();
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ParameterSet.g.cs b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ParameterSet.g.cs
deleted file mode 100644
index 02088e9b..00000000
--- a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ParameterSet.g.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-// MTConnect SysML v2.2 : UML ID = _19_0_3_68e0225_1678197254209_96040_17915
-
-namespace MTConnect.Assets.ComponentConfigurationParameters
-{
- ///
- /// Set of parameters defining the configuration of a Component.
- ///
- public class ParameterSet : IParameterSet
- {
- public const string DescriptionText = "Set of parameters defining the configuration of a Component.";
-
-
- ///
- /// Name of the parameter set if more than one exists.
- ///
- public string Name { get; set; }
-
- ///
- /// Property defining a configuration of a Component.
- ///
- public System.Collections.Generic.IEnumerable Parameters { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ParameterSetDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ParameterSetDescriptions.g.cs
deleted file mode 100644
index e3d407eb..00000000
--- a/src/MTConnect.NET-Common/Assets/ComponentConfigurationParameters/old/ParameterSetDescriptions.g.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.ComponentConfigurationParameters
-{
- public static class ParameterSetDescriptions
- {
- ///
- /// Name of the parameter set if more than one exists.
- ///
- public const string Name = "Name of the parameter set if more than one exists.";
-
- ///
- /// Property defining a configuration of a Component.
- ///
- public const string Parameters = "Property defining a configuration of a Component.";
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/AbstractFileAsset.cs b/src/MTConnect.NET-Common/Assets/Files/AbstractFileAsset.cs
deleted file mode 100644
index dc07439c..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/AbstractFileAsset.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-using System;
-using System.Collections.Generic;
-using System.Text.Json.Serialization;
-using System.Xml;
-using System.Xml.Serialization;
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// An AbstractFile is an abstract Asset type model that contains the common properties of the File and FileArchetype types.
- ///
- [XmlRoot("AbstractFile")]
- public abstract class AbstractFileAsset : Asset where T : IAsset
- {
- ///
- /// The name of the file
- ///
- [XmlAttribute("name")]
- [JsonPropertyName("name")]
- public string Name { get; set; }
-
- ///
- /// The mime type of the file.
- ///
- [XmlAttribute("mediaType")]
- [JsonPropertyName("mediaType")]
- public string MediaType { get; set; }
-
- ///
- /// The category of application that will use this file.
- ///
- [XmlAttribute("applicationCategory")]
- [JsonPropertyName("applicationCategory")]
- public ApplicationCategory ApplicationCategory { get; set; }
-
- ///
- /// The type of application that will use this file.
- ///
- [XmlAttribute("applicationType")]
- [JsonPropertyName("applicationType")]
- public ApplicationType ApplicationType { get; set; }
-
- ///
- /// FileProperties organizes one or more FileProperty entities for Files.
- ///
- [XmlArray("FileProperties")]
- [XmlArrayItem("FileProperty", typeof(FileProperty))]
- [JsonPropertyName("fileProperties")]
- public List FileProperties { get; set; }
-
- [XmlIgnore]
- [JsonIgnore]
- public bool FilePropertiesSpecified => !FileProperties.IsNullOrEmpty();
-
- ///
- /// FileComments organizes one or more FileComment entities for Files.
- ///
- [XmlArray("FileComments")]
- [XmlArrayItem("FileComment", typeof(FileComment))]
- [JsonPropertyName("fileComments")]
- public List FileComments { get; set; }
-
- [XmlIgnore]
- [JsonIgnore]
- public bool FileCommentsSpecified => !FileComments.IsNullOrEmpty();
-
-
- protected override IAsset OnProcess(Version mtconnectVersion)
- {
- if (mtconnectVersion != null && mtconnectVersion >= MTConnectVersions.Version17)
- {
- return this;
- }
-
- return null;
- }
-
- public override AssetValidationResult IsValid(Version mtconnectVersion)
- {
- var message = "";
- var result = true;
-
- if (string.IsNullOrEmpty(Name))
- {
- message = "Name property is Required";
- result = false;
- }
- else if (string.IsNullOrEmpty(MediaType))
- {
- message = "MediaType property is Required";
- result = false;
- }
-
- return new AssetValidationResult(result, message);
- }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/AbstractFile.g.cs b/src/MTConnect.NET-Common/Assets/Files/AbstractFileAsset.g.cs
similarity index 95%
rename from src/MTConnect.NET-Common/Assets/Files/AbstractFile.g.cs
rename to src/MTConnect.NET-Common/Assets/Files/AbstractFileAsset.g.cs
index 66a2677f..6447cee6 100644
--- a/src/MTConnect.NET-Common/Assets/Files/AbstractFile.g.cs
+++ b/src/MTConnect.NET-Common/Assets/Files/AbstractFileAsset.g.cs
@@ -8,7 +8,7 @@ namespace MTConnect.Assets.Files
///
/// Abstract Asset that contains the common properties of the File and FileArchetype types.
///
- public abstract class AbstractFile : Asset, IAbstractFile
+ public abstract partial class AbstractFileAsset : Asset, IAbstractFileAsset
{
public new const string DescriptionText = "Abstract Asset that contains the common properties of the File and FileArchetype types.";
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/AbstractFileDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/Files/AbstractFileAssetDescriptions.g.cs
similarity index 79%
rename from src/MTConnect.NET-Common/Assets/Files/old/AbstractFileDescriptions.g.cs
rename to src/MTConnect.NET-Common/Assets/Files/AbstractFileAssetDescriptions.g.cs
index 602b42d8..c10af58d 100644
--- a/src/MTConnect.NET-Common/Assets/Files/old/AbstractFileDescriptions.g.cs
+++ b/src/MTConnect.NET-Common/Assets/Files/AbstractFileAssetDescriptions.g.cs
@@ -3,7 +3,7 @@
namespace MTConnect.Assets.Files
{
- public static class AbstractFileDescriptions
+ public static class AbstractFileAssetDescriptions
{
///
/// Category of application that will use this file.
@@ -18,12 +18,12 @@ public static class AbstractFileDescriptions
///
/// Remark or interpretation for human interpretation associated with a File or FileArchetype.
///
- public const string FileComment = "Remark or interpretation for human interpretation associated with a File or FileArchetype.";
+ public const string FileComments = "Remark or interpretation for human interpretation associated with a File or FileArchetype.";
///
/// Key-value pair providing additional metadata about a File.
///
- public const string FileProperty = "Key-value pair providing additional metadata about a File.";
+ public const string FileProperties = "Key-value pair providing additional metadata about a File.";
///
/// Mime type of the file.
diff --git a/src/MTConnect.NET-Common/Assets/Files/FileArchetypeAsset.cs b/src/MTConnect.NET-Common/Assets/Files/FileArchetypeAsset.cs
deleted file mode 100644
index 525f54c2..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/FileArchetypeAsset.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// FileArchetype Asset is an AbstractFile providing information common to all versions of a file.
- ///
- public class FileArchetypeAsset : AbstractFileAsset { }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/FileArchetype.g.cs b/src/MTConnect.NET-Common/Assets/Files/FileArchetypeAsset.g.cs
similarity index 85%
rename from src/MTConnect.NET-Common/Assets/Files/FileArchetype.g.cs
rename to src/MTConnect.NET-Common/Assets/Files/FileArchetypeAsset.g.cs
index b5046584..f3d31d1d 100644
--- a/src/MTConnect.NET-Common/Assets/Files/FileArchetype.g.cs
+++ b/src/MTConnect.NET-Common/Assets/Files/FileArchetypeAsset.g.cs
@@ -8,7 +8,7 @@ namespace MTConnect.Assets.Files
///
/// AbstractFile type that provides information common to all versions of a file.
///
- public class FileArchetype : AbstractFile, IFileArchetype
+ public partial class FileArchetypeAsset : AbstractFileAsset, IFileArchetypeAsset
{
public new const string DescriptionText = "AbstractFile type that provides information common to all versions of a file.";
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileArchetypeDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/Files/FileArchetypeAssetDescriptions.g.cs
similarity index 76%
rename from src/MTConnect.NET-Common/Assets/Files/old/FileArchetypeDescriptions.g.cs
rename to src/MTConnect.NET-Common/Assets/Files/FileArchetypeAssetDescriptions.g.cs
index 4289da05..2ff5a2d4 100644
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileArchetypeDescriptions.g.cs
+++ b/src/MTConnect.NET-Common/Assets/Files/FileArchetypeAssetDescriptions.g.cs
@@ -3,7 +3,7 @@
namespace MTConnect.Assets.Files
{
- public static class FileArchetypeDescriptions
+ public static class FileArchetypeAssetDescriptions
{
}
}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/File.g.cs b/src/MTConnect.NET-Common/Assets/Files/FileAsset.g.cs
similarity index 93%
rename from src/MTConnect.NET-Common/Assets/Files/File.g.cs
rename to src/MTConnect.NET-Common/Assets/Files/FileAsset.g.cs
index 6a3c96d9..7ab9555b 100644
--- a/src/MTConnect.NET-Common/Assets/Files/File.g.cs
+++ b/src/MTConnect.NET-Common/Assets/Files/FileAsset.g.cs
@@ -8,7 +8,7 @@ namespace MTConnect.Assets.Files
///
/// AbstractFile type that provides information about the File instance and its URL.
///
- public partial class File : AbstractFile, IFile
+ public partial class FileAsset : AbstractFileAsset, IFileAsset
{
public new const string DescriptionText = "AbstractFile type that provides information about the File instance and its URL.";
@@ -31,7 +31,7 @@ public partial class File : AbstractFile, IFile
///
/// Time the file was modified.
///
- public System.DateTime ModificationTime { get; set; }
+ public System.DateTime? ModificationTime { get; set; }
///
/// Public key used to verify the signature.
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/Files/FileAssetDescriptions.g.cs
similarity index 85%
rename from src/MTConnect.NET-Common/Assets/Files/old/FileDescriptions.g.cs
rename to src/MTConnect.NET-Common/Assets/Files/FileAssetDescriptions.g.cs
index 585633ec..86d4c029 100644
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileDescriptions.g.cs
+++ b/src/MTConnect.NET-Common/Assets/Files/FileAssetDescriptions.g.cs
@@ -3,7 +3,7 @@
namespace MTConnect.Assets.Files
{
- public static class FileDescriptions
+ public static class FileAssetDescriptions
{
///
/// Time the file was created.
@@ -13,12 +13,12 @@ public static class FileDescriptions
///
/// Reference to the target Device for this File.
///
- public const string Destination = "Reference to the target Device for this File.";
+ public const string Destinations = "Reference to the target Device for this File.";
///
- /// Url reference to the file location.
+ /// URL reference to the file location.
///
- public const string Location = "Url reference to the file location.";
+ public const string Location = "URL reference to the file location.";
///
/// Time the file was modified.
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/IAbstractFile.g.cs b/src/MTConnect.NET-Common/Assets/Files/IAbstractFileAsset.g.cs
similarity index 71%
rename from src/MTConnect.NET-Common/Assets/Files/old/IAbstractFile.g.cs
rename to src/MTConnect.NET-Common/Assets/Files/IAbstractFileAsset.g.cs
index 739cc48b..f31bdeee 100644
--- a/src/MTConnect.NET-Common/Assets/Files/old/IAbstractFile.g.cs
+++ b/src/MTConnect.NET-Common/Assets/Files/IAbstractFileAsset.g.cs
@@ -6,27 +6,27 @@ namespace MTConnect.Assets.Files
///
/// Abstract Asset that contains the common properties of the File and FileArchetype types.
///
- public interface IAbstractFile : IAsset
+ public partial interface IAbstractFileAsset : IAsset
{
///
/// Category of application that will use this file.
///
- ApplicationCategory ApplicationCategory { get; }
+ MTConnect.Assets.Files.ApplicationCategory ApplicationCategory { get; }
///
/// Type of application that will use this file.
///
- ApplicationType ApplicationType { get; }
+ MTConnect.Assets.Files.ApplicationType ApplicationType { get; }
///
/// Remark or interpretation for human interpretation associated with a File or FileArchetype.
///
- MTConnect.Assets.Files.IFileComment FileComment { get; }
+ System.Collections.Generic.IEnumerable FileComments { get; }
///
/// Key-value pair providing additional metadata about a File.
///
- MTConnect.Assets.Files.IFileProperty FileProperty { get; }
+ System.Collections.Generic.IEnumerable FileProperties { get; }
///
/// Mime type of the file.
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/IFileArchetype.g.cs b/src/MTConnect.NET-Common/Assets/Files/IFileArchetypeAsset.g.cs
similarity index 63%
rename from src/MTConnect.NET-Common/Assets/Files/old/IFileArchetype.g.cs
rename to src/MTConnect.NET-Common/Assets/Files/IFileArchetypeAsset.g.cs
index 686abf8b..7785cc64 100644
--- a/src/MTConnect.NET-Common/Assets/Files/old/IFileArchetype.g.cs
+++ b/src/MTConnect.NET-Common/Assets/Files/IFileArchetypeAsset.g.cs
@@ -4,9 +4,9 @@
namespace MTConnect.Assets.Files
{
///
- /// Abstractfile type that provides information common to all versions of a file.
+ /// AbstractFile type that provides information common to all versions of a file.
///
- public interface IFileArchetype : IAbstractFile
+ public partial interface IFileArchetypeAsset : IAbstractFileAsset
{
}
}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/IFile.g.cs b/src/MTConnect.NET-Common/Assets/Files/IFileAsset.g.cs
similarity index 93%
rename from src/MTConnect.NET-Common/Assets/Files/IFile.g.cs
rename to src/MTConnect.NET-Common/Assets/Files/IFileAsset.g.cs
index 63e3e17a..7d1f4738 100644
--- a/src/MTConnect.NET-Common/Assets/Files/IFile.g.cs
+++ b/src/MTConnect.NET-Common/Assets/Files/IFileAsset.g.cs
@@ -6,7 +6,7 @@ namespace MTConnect.Assets.Files
///
/// AbstractFile type that provides information about the File instance and its URL.
///
- public partial interface IFile : IAbstractFile
+ public partial interface IFileAsset : IAbstractFileAsset
{
///
/// Time the file was created.
@@ -26,7 +26,7 @@ public partial interface IFile : IAbstractFile
///
/// Time the file was modified.
///
- System.DateTime ModificationTime { get; }
+ System.DateTime? ModificationTime { get; }
///
/// Public key used to verify the signature.
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/AbstractFile.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/AbstractFile.g.cs
deleted file mode 100644
index da23b144..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/AbstractFile.g.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-// MTConnect SysML v2.2 : UML ID = _19_0_3_45f01b9_1589825445428_505818_673
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// Abstract Asset that contains the common properties of the File and FileArchetype types.
- ///
- public abstract class AbstractFile : Asset, IAbstractFile
- {
- public new const string DescriptionText = "Abstract Asset that contains the common properties of the File and FileArchetype types.";
-
-
- ///
- /// Category of application that will use this file.
- ///
- public ApplicationCategory ApplicationCategory { get; set; }
-
- ///
- /// Type of application that will use this file.
- ///
- public ApplicationType ApplicationType { get; set; }
-
- ///
- /// Remark or interpretation for human interpretation associated with a File or FileArchetype.
- ///
- public MTConnect.Assets.Files.IFileComment FileComment { get; set; }
-
- ///
- /// Key-value pair providing additional metadata about a File.
- ///
- public MTConnect.Assets.Files.IFileProperty FileProperty { get; set; }
-
- ///
- /// Mime type of the file.
- ///
- public string MediaType { get; set; }
-
- ///
- /// Name of the file.
- ///
- public string Name { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/ApplicationCategory.cs b/src/MTConnect.NET-Common/Assets/Files/old/ApplicationCategory.cs
deleted file mode 100644
index ed1ae634..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/ApplicationCategory.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.Files
-{
- public enum ApplicationCategory
- {
- ///
- /// Files regarding the fully assembled product.
- ///
- ASSEMBLY,
-
- ///
- /// Device related files.
- ///
- DEVICE,
-
- ///
- /// Files relating to the handling of material.
- ///
- HANDLING,
-
- ///
- /// File relating to equipment maintenance.
- ///
- MAINTENANCE,
-
- ///
- /// Files relating to a part
- ///
- PART,
-
- ///
- /// Files related to the manufacturing process.
- ///
- PROCESS,
-
- ///
- /// Files related to the quality inspection.
- ///
- INSPECTION,
-
- ///
- /// Files related to the quality inspection.
- ///
- SETUP
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/ApplicationType.cs b/src/MTConnect.NET-Common/Assets/Files/old/ApplicationType.cs
deleted file mode 100644
index 78bc8a3a..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/ApplicationType.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.Files
-{
- public enum ApplicationType
- {
- ///
- /// Computer aided design files or drawings.
- ///
- DESIGN,
-
- ///
- /// Generic data.
- ///
- DATA,
-
- ///
- /// Documentation regarding a category of file.
- ///
- DOCUMENTATION,
-
- ///
- /// User instructions regarding the execution of a task.
- ///
- INSTRUCTIONS,
-
- ///
- /// The data related to the history of a machine or process.
- ///
- LOG,
-
- ///
- /// Machine instructions to perform a process.
- ///
- PRODUCTION_PROGRAM
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/Destination.cs b/src/MTConnect.NET-Common/Assets/Files/old/Destination.cs
deleted file mode 100644
index 69e877c6..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/Destination.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-using System.Text.Json.Serialization;
-using System.Xml;
-using System.Xml.Serialization;
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// The Destination is a reference to the target Device for this File.
- ///
- public class Destination
- {
- ///
- /// uuid of the target device or application.
- ///
- [XmlAttribute("deviceUuid")]
- [JsonPropertyName("deviceUuid")]
- public string DeviceUuid { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/File.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/File.g.cs
deleted file mode 100644
index 8565908c..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/File.g.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-// MTConnect SysML v2.2 : UML ID = _19_0_3_45f01b9_1589825359572_789274_577
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// Abstractfile type that provides information about the File instance and its URL.
- ///
- public class File : AbstractFile, IFile
- {
- public new const string DescriptionText = "Abstractfile type that provides information about the File instance and its URL.";
-
-
- ///
- /// Time the file was created.
- ///
- public System.DateTime CreationTime { get; set; }
-
- ///
- /// Reference to the target Device for this File.
- ///
- public string Destination { get; set; }
-
- ///
- /// Url reference to the file location.
- ///
- public MTConnect.Assets.Files.IFileLocation Location { get; set; }
-
- ///
- /// Time the file was modified.
- ///
- public System.DateTime ModificationTime { get; set; }
-
- ///
- /// Public key used to verify the signature.
- ///
- public string PublicKey { get; set; }
-
- ///
- /// Secure hash of the file.
- ///
- public string Signature { get; set; }
-
- ///
- /// Size of the file in bytes.
- ///
- public int Size { get; set; }
-
- ///
- /// State of the file.
- ///
- public MTConnect.Assets.Files.FileState State { get; set; }
-
- ///
- /// Version identifier of the file.
- ///
- public string VersionId { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileArchetype.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/FileArchetype.g.cs
deleted file mode 100644
index fedf80af..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileArchetype.g.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-// MTConnect SysML v2.2 : UML ID = _19_0_3_45f01b9_1589825369611_93186_622
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// Abstractfile type that provides information common to all versions of a file.
- ///
- public class FileArchetype : AbstractFile, IFileArchetype
- {
- public new const string DescriptionText = "Abstractfile type that provides information common to all versions of a file.";
-
-
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileAsset.cs b/src/MTConnect.NET-Common/Assets/Files/old/FileAsset.cs
deleted file mode 100644
index 721e87fa..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileAsset.cs
+++ /dev/null
@@ -1,171 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-using System;
-using System.Collections.Generic;
-using System.Text.Json.Serialization;
-using System.Xml;
-using System.Xml.Serialization;
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// The File Asset is an AbstractFile with information about the File instance and its URL.
- ///
- [XmlRoot("File")]
- public class FileAsset : AbstractFileAsset
- {
- public const string TypeId = "File";
-
-
- ///
- /// The size of the file in bytes.
- ///
- [XmlAttribute("size")]
- [JsonPropertyName("size")]
- public int Size { get; set; }
-
- ///
- /// The version identifier of the file.
- ///
- [XmlAttribute("versionId")]
- [JsonPropertyName("versionId")]
- public string VersionId { get; set; }
-
- ///
- /// The state of the file.
- ///
- [XmlAttribute("state")]
- [JsonPropertyName("state")]
- public FileState State { get; set; }
-
- ///
- /// The URL reference to the file location.
- ///
- [XmlElement("FileLocation")]
- [JsonPropertyName("fileLocation")]
- public FileLocation FileLocation { get; set; }
-
- ///
- /// A secure hash of the file.
- ///
- [XmlElement("Signature")]
- [JsonPropertyName("signature")]
- public string Signature { get; set; }
-
- ///
- /// The public key used to verify the signature.
- ///
- [XmlElement("PublicKey")]
- [JsonPropertyName("publicKey")]
- public string PublicKey { get; set; }
-
- ///
- /// Destinations organizes one or more Destination elements.
- ///
- [XmlArray("Destinations")]
- [XmlArrayItem("Destination", typeof(Destination))]
- [JsonPropertyName("destinations")]
- public List Destinations { get; set; }
-
- [XmlIgnore]
- public bool DestinationsSpecified => !Destinations.IsNullOrEmpty();
-
- ///
- /// The time the file was created.
- ///
- [XmlElement("CreationTime")]
- [JsonPropertyName("creationTime")]
- public DateTime CreationTime { get; set; }
-
- [XmlIgnore]
- public bool CreationTimeSpecified => CreationTime > DateTime.MinValue;
-
- ///
- /// The time the file was modified.
- ///
- [XmlElement("ModificationTime")]
- [JsonPropertyName("modificationTime")]
- public DateTime ModificationTime { get; set; }
-
- [XmlIgnore]
- public bool ModificationTimeSpecified => ModificationTime > DateTime.MinValue;
-
-
- public FileAsset()
- {
- Type = TypeId;
- }
-
-
- protected override IAsset OnProcess(Version mtconnectVersion)
- {
- if (Size <= 0) return null;
- if (string.IsNullOrEmpty(VersionId)) return null;
-
- return base.Process(mtconnectVersion);
- }
-
- public override AssetValidationResult IsValid(Version mtconnectVersion)
- {
- var baseResult = base.IsValid(mtconnectVersion);
- var message = baseResult.Message;
- var result = baseResult.IsValid;
-
- if (baseResult.IsValid)
- {
- if (Size <= 0)
- {
- message = "Size property is Required and must be greater than 0";
- result = false;
- }
- else if (string.IsNullOrEmpty(VersionId))
- {
- message = "VersionId property is Required";
- result = false;
- }
- else if (CreationTime <= DateTime.MinValue)
- {
- message = "CreationTime property is Required";
- result = false;
- }
- else if (FileLocation == null)
- {
- message = "FileLocation is Required";
- result = false;
- }
- else
- {
- if (string.IsNullOrEmpty(FileLocation.Href))
- {
- message = "FileLocation Href property is Required";
- result = false;
- }
- }
- }
-
- return new AssetValidationResult(result, message);
- }
-
- public override string GenerateHash()
- {
- return GenerateHash(this);
- }
-
- public static string GenerateHash(FileAsset asset)
- {
- if (asset != null)
- {
- var ids = new List();
-
- ids.Add(ObjectExtensions.GetHashPropertyString(asset).ToSHA1Hash());
-
- // Need to include CuttingItems
-
- return StringFunctions.ToSHA1Hash(ids.ToArray());
- }
-
- return null;
- }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileComment.cs b/src/MTConnect.NET-Common/Assets/Files/old/FileComment.cs
deleted file mode 100644
index 1851f69e..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileComment.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-using System;
-using System.Text.Json.Serialization;
-using System.Xml;
-using System.Xml.Serialization;
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// A remark or interpretation for human interpretation associated with a File or FileArchetype.
- ///
- public class FileComment
- {
- ///
- /// The time the comment was made.
- ///
- [XmlAttribute("timestamp")]
- [JsonPropertyName("timestamp")]
- public DateTime Timestamp { get; set; }
-
- [XmlText]
- [JsonPropertyName("value")]
- public string Value { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileComment.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/FileComment.g.cs
deleted file mode 100644
index 7399a20a..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileComment.g.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-// MTConnect SysML v2.2 : UML ID = _19_0_3_68e0225_1605276197212_1938_196
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// Remark or interpretation for human interpretation associated with a File or FileArchetype.
- ///
- public class FileComment : IFileComment
- {
- public const string DescriptionText = "Remark or interpretation for human interpretation associated with a File or FileArchetype.";
-
-
- ///
- /// Time the comment was made.
- ///
- public System.DateTime Timestamp { get; set; }
-
- ///
- /// Text of the comment about the file.
- ///
- public string Value { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileCommentDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/FileCommentDescriptions.g.cs
deleted file mode 100644
index aa65a5df..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileCommentDescriptions.g.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.Files
-{
- public static class FileCommentDescriptions
- {
- ///
- /// Time the comment was made.
- ///
- public const string Timestamp = "Time the comment was made.";
-
- ///
- /// Text of the comment about the file.
- ///
- public const string Value = "Text of the comment about the file.";
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileLocation.cs b/src/MTConnect.NET-Common/Assets/Files/old/FileLocation.cs
deleted file mode 100644
index e8d7c6b7..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileLocation.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-using System.Text.Json.Serialization;
-using System.Xml;
-using System.Xml.Serialization;
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// The URL reference to the file location.
- ///
- public class FileLocation
- {
- ///
- /// A URL reference to the file.
- ///
- [XmlAttribute("href")]
- [JsonPropertyName("href")]
- public string Href { get; set; }
-
- ///
- /// The type of href for the xlink href type. MUST be locator referring to a URL.
- ///
- [XmlAttribute("xLinkType")]
- [JsonPropertyName("xLinkType")]
- public string xLinkType { get; set; }
-
-
- public FileLocation() { }
-
- public FileLocation(string href)
- {
- Href = href;
- }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileLocation.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/FileLocation.g.cs
deleted file mode 100644
index b6b654fc..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileLocation.g.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-// MTConnect SysML v2.2 : UML ID = _19_0_3_68e0225_1605277122154_664309_406
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// Url reference to the file location.
- ///
- public class FileLocation : IFileLocation
- {
- public const string DescriptionText = "Url reference to the file location.";
-
-
- ///
- /// Url reference to the file.`href` is of type `xlink:href` from the W3C XLink specification.
- ///
- public string Href { get; set; }
-
- ///
- /// Type of href for the xlink href type. **MUST** be `locator` referring to a URL.
- ///
- public string XLinkType { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileLocationDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/FileLocationDescriptions.g.cs
deleted file mode 100644
index 392296ea..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileLocationDescriptions.g.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.Files
-{
- public static class FileLocationDescriptions
- {
- ///
- /// Url reference to the file.`href` is of type `xlink:href` from the W3C XLink specification.
- ///
- public const string Href = "Url reference to the file.`href` is of type `xlink:href` from the W3C XLink specification.";
-
- ///
- /// Type of href for the xlink href type. **MUST** be `locator` referring to a URL.
- ///
- public const string XLinkType = "Type of href for the xlink href type. **MUST** be `locator` referring to a URL.";
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileProperty.cs b/src/MTConnect.NET-Common/Assets/Files/old/FileProperty.cs
deleted file mode 100644
index 72a3e578..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileProperty.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-using System.Text.Json.Serialization;
-using System.Xml;
-using System.Xml.Serialization;
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// A key-value pair providing additional metadata about a File.
- ///
- public class FileProperty
- {
- ///
- /// The name of the FileProperty
- ///
- [XmlAttribute("name")]
- [JsonPropertyName("name")]
- public string Name { get; set; }
-
- [XmlText]
- [JsonPropertyName("value")]
- public string Value { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileProperty.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/FileProperty.g.cs
deleted file mode 100644
index 02f39ca4..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileProperty.g.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-// MTConnect SysML v2.2 : UML ID = _19_0_3_45f01b9_1589825710107_976904_827
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// Key-value pair providing additional metadata about a File.
- ///
- public class FileProperty : IFileProperty
- {
- public const string DescriptionText = "Key-value pair providing additional metadata about a File.";
-
-
- ///
- /// Name of the FileProperty.
- ///
- public string Name { get; set; }
-
- ///
- /// The value of the FileProperty.
- ///
- public string Value { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FilePropertyDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/FilePropertyDescriptions.g.cs
deleted file mode 100644
index 3ed64e86..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/FilePropertyDescriptions.g.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.Files
-{
- public static class FilePropertyDescriptions
- {
- ///
- /// Name of the FileProperty.
- ///
- public const string Name = "Name of the FileProperty.";
-
- ///
- /// The value of the FileProperty.
- ///
- public const string Value = "The value of the FileProperty.";
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileState.cs b/src/MTConnect.NET-Common/Assets/Files/old/FileState.cs
deleted file mode 100644
index 1214f5fd..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileState.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.Files
-{
- public enum FileState
- {
- ///
- /// Used for processes other than production or otherwise defined.
- ///
- EXPERIMENTAL,
-
- ///
- /// Used for production processes.
- ///
- PRODUCTION,
-
- ///
- /// The content is modified from PRODUCTION or EXPERIMENTAL.
- ///
- REVISION
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileState.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/FileState.g.cs
deleted file mode 100644
index fe0b3fc3..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileState.g.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.Files
-{
- public enum FileState
- {
- ///
- /// Used for processes other than production or otherwise defined.
- ///
- EXPERIMENTAL,
-
- ///
- /// Used for production processes.
- ///
- PRODUCTION,
-
- ///
- /// Content is modified from `PRODUCTION` or `EXPERIMENTAL`.
- ///
- REVISION
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileStateDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/FileStateDescriptions.g.cs
deleted file mode 100644
index b0331a6c..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileStateDescriptions.g.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.Files
-{
- public static class FileStateDescriptions
- {
- ///
- /// Used for processes other than production or otherwise defined.
- ///
- public const string EXPERIMENTAL = "Used for processes other than production or otherwise defined.";
-
- ///
- /// Used for production processes.
- ///
- public const string PRODUCTION = "Used for production processes.";
-
- ///
- /// Content is modified from `PRODUCTION` or `EXPERIMENTAL`.
- ///
- public const string REVISION = "Content is modified from `PRODUCTION` or `EXPERIMENTAL`.";
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileStateEnum.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/FileStateEnum.g.cs
deleted file mode 100644
index c3594f08..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileStateEnum.g.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.Files
-{
- public enum FileStateEnum
- {
- ///
- /// Used for processes other than production or otherwise defined.
- ///
- Experimental,
-
- ///
- /// Used for production processes.
- ///
- Production,
-
- ///
- /// Content is modified from `PRODUCTION` or `EXPERIMENTAL`.
- ///
- Revision
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/FileStateEnumDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/FileStateEnumDescriptions.g.cs
deleted file mode 100644
index 4b7f6936..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/FileStateEnumDescriptions.g.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.Files
-{
- public static class FileStateEnumDescriptions
- {
- ///
- /// Used for processes other than production or otherwise defined.
- ///
- public const string Experimental = "Used for processes other than production or otherwise defined.";,
-
- ///
- /// Used for production processes.
- ///
- public const string Production = "Used for production processes.";,
-
- ///
- /// Content is modified from `PRODUCTION` or `EXPERIMENTAL`.
- ///
- public const string Revision = "Content is modified from `PRODUCTION` or `EXPERIMENTAL`.";
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/IFile.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/IFile.g.cs
deleted file mode 100644
index be912792..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/IFile.g.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// Abstractfile type that provides information about the File instance and its URL.
- ///
- public interface IFile : IAbstractFile
- {
- ///
- /// Time the file was created.
- ///
- System.DateTime CreationTime { get; }
-
- ///
- /// Reference to the target Device for this File.
- ///
- string Destination { get; }
-
- ///
- /// Url reference to the file location.
- ///
- MTConnect.Assets.Files.IFileLocation Location { get; }
-
- ///
- /// Time the file was modified.
- ///
- System.DateTime ModificationTime { get; }
-
- ///
- /// Public key used to verify the signature.
- ///
- string PublicKey { get; }
-
- ///
- /// Secure hash of the file.
- ///
- string Signature { get; }
-
- ///
- /// Size of the file in bytes.
- ///
- int Size { get; }
-
- ///
- /// State of the file.
- ///
- MTConnect.Assets.Files.FileState State { get; }
-
- ///
- /// Version identifier of the file.
- ///
- string VersionId { get; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/IFileComment.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/IFileComment.g.cs
deleted file mode 100644
index 20433287..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/IFileComment.g.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// Remark or interpretation for human interpretation associated with a File or FileArchetype.
- ///
- public interface IFileComment
- {
- ///
- /// Time the comment was made.
- ///
- System.DateTime Timestamp { get; }
-
- ///
- /// Text of the comment about the file.
- ///
- string Value { get; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/IFileLocation.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/IFileLocation.g.cs
deleted file mode 100644
index d7525005..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/IFileLocation.g.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// Url reference to the file location.
- ///
- public interface IFileLocation
- {
- ///
- /// Url reference to the file.`href` is of type `xlink:href` from the W3C XLink specification.
- ///
- string Href { get; }
-
- ///
- /// Type of href for the xlink href type. **MUST** be `locator` referring to a URL.
- ///
- string XLinkType { get; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/Files/old/IFileProperty.g.cs b/src/MTConnect.NET-Common/Assets/Files/old/IFileProperty.g.cs
deleted file mode 100644
index 820161a1..00000000
--- a/src/MTConnect.NET-Common/Assets/Files/old/IFileProperty.g.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.Files
-{
- ///
- /// Key-value pair providing additional metadata about a File.
- ///
- public interface IFileProperty
- {
- ///
- /// Name of the FileProperty.
- ///
- string Name { get; }
-
- ///
- /// The value of the FileProperty.
- ///
- string Value { get; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/QIF/IQIFDocument.g.cs b/src/MTConnect.NET-Common/Assets/QIF/IQIFDocument.g.cs
index d192b8e8..a067bce7 100644
--- a/src/MTConnect.NET-Common/Assets/QIF/IQIFDocument.g.cs
+++ b/src/MTConnect.NET-Common/Assets/QIF/IQIFDocument.g.cs
@@ -6,7 +6,7 @@ namespace MTConnect.Assets.QIF
///
/// QIF Document as given by the QIF standard.
///
- public partial interface IQIFDocument
+ public interface IQIFDocument
{
}
}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/QIF/IQIFDocumentWrapper.g.cs b/src/MTConnect.NET-Common/Assets/QIF/IQIFDocumentWrapperAsset.g.cs
similarity index 90%
rename from src/MTConnect.NET-Common/Assets/QIF/IQIFDocumentWrapper.g.cs
rename to src/MTConnect.NET-Common/Assets/QIF/IQIFDocumentWrapperAsset.g.cs
index 0396b84b..abb26a9e 100644
--- a/src/MTConnect.NET-Common/Assets/QIF/IQIFDocumentWrapper.g.cs
+++ b/src/MTConnect.NET-Common/Assets/QIF/IQIFDocumentWrapperAsset.g.cs
@@ -6,7 +6,7 @@ namespace MTConnect.Assets.QIF
///
/// Asset that carries the QIF Document.
///
- public interface IQIFDocumentWrapper : IAsset
+ public partial interface IQIFDocumentWrapperAsset : IAsset
{
///
/// QIF Document as given by the QIF standard.
diff --git a/src/MTConnect.NET-Common/Assets/QIF/QIFDocument.g.cs b/src/MTConnect.NET-Common/Assets/QIF/QIFDocument.g.cs
index 17ccfbce..6c83f177 100644
--- a/src/MTConnect.NET-Common/Assets/QIF/QIFDocument.g.cs
+++ b/src/MTConnect.NET-Common/Assets/QIF/QIFDocument.g.cs
@@ -8,7 +8,7 @@ namespace MTConnect.Assets.QIF
///
/// QIF Document as given by the QIF standard.
///
- public partial class QIFDocument : IQIFDocument
+ public class QIFDocument : IQIFDocument
{
public const string DescriptionText = "QIF Document as given by the QIF standard.";
diff --git a/src/MTConnect.NET-Common/Assets/QIF/QIFDocumentWrapperAsset.cs b/src/MTConnect.NET-Common/Assets/QIF/QIFDocumentWrapperAsset.cs
deleted file mode 100644
index ed8c7d54..00000000
--- a/src/MTConnect.NET-Common/Assets/QIF/QIFDocumentWrapperAsset.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-using System;
-using System.Text.Json.Serialization;
-using System.Xml;
-using System.Xml.Serialization;
-
-namespace MTConnect.Assets.QIF
-{
- ///
- /// QIFDocumentWrapper is an Asset that carries the Quality Information Framework (QIF) Document.
- ///
- [XmlRoot("QIFDocumentWrapper")]
- public class QIFDocumentWrapperAsset : Asset
- {
- public const string TypeId = "QIFDocumentWrapper";
-
-
- ///
- /// The contained QIF Document type as defined in the QIF Standard.
- ///
- [XmlAttribute("qifDocumentType")]
- [JsonPropertyName("qifDocumentType")]
- public string QifDocumentType { get; set; }
-
- ///
- /// The QIF Document as defined by the QIF standard.
- ///
- [XmlElement("qifDocument")]
- [JsonPropertyName("qifDocument")]
- public string QifDocument { get; set; }
-
-
- protected override IAsset OnProcess(Version mtconnectVersion)
- {
- if (mtconnectVersion != null && mtconnectVersion >= MTConnectVersions.Version18)
- {
- return this;
- }
-
- return null;
- }
-
- public override AssetValidationResult IsValid(Version mtconnectVersion)
- {
- var message = "";
- var result = true;
-
- if (string.IsNullOrEmpty(QifDocument))
- {
- message = "QIFDocument is Required";
- result = false;
- }
-
- return new AssetValidationResult(result, message);
- }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/QIF/QIFDocumentWrapper.g.cs b/src/MTConnect.NET-Common/Assets/QIF/QIFDocumentWrapperAsset.g.cs
similarity index 90%
rename from src/MTConnect.NET-Common/Assets/QIF/QIFDocumentWrapper.g.cs
rename to src/MTConnect.NET-Common/Assets/QIF/QIFDocumentWrapperAsset.g.cs
index 75df9458..5cfb55cc 100644
--- a/src/MTConnect.NET-Common/Assets/QIF/QIFDocumentWrapper.g.cs
+++ b/src/MTConnect.NET-Common/Assets/QIF/QIFDocumentWrapperAsset.g.cs
@@ -8,7 +8,7 @@ namespace MTConnect.Assets.QIF
///
/// Asset that carries the QIF Document.
///
- public class QIFDocumentWrapper : Asset, IQIFDocumentWrapper
+ public partial class QIFDocumentWrapperAsset : Asset, IQIFDocumentWrapperAsset
{
public new const string DescriptionText = "Asset that carries the QIF Document.";
diff --git a/src/MTConnect.NET-Common/Assets/QIF/QIFDocumentWrapperDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/QIF/QIFDocumentWrapperAssetDescriptions.g.cs
similarity index 90%
rename from src/MTConnect.NET-Common/Assets/QIF/QIFDocumentWrapperDescriptions.g.cs
rename to src/MTConnect.NET-Common/Assets/QIF/QIFDocumentWrapperAssetDescriptions.g.cs
index 19a9da86..fab4ffec 100644
--- a/src/MTConnect.NET-Common/Assets/QIF/QIFDocumentWrapperDescriptions.g.cs
+++ b/src/MTConnect.NET-Common/Assets/QIF/QIFDocumentWrapperAssetDescriptions.g.cs
@@ -3,7 +3,7 @@
namespace MTConnect.Assets.QIF
{
- public static class QIFDocumentWrapperDescriptions
+ public static class QIFDocumentWrapperAssetDescriptions
{
///
/// QIF Document as given by the QIF standard.
diff --git a/src/MTConnect.NET-Common/Assets/QIF/old/IQIFDocument.g.cs b/src/MTConnect.NET-Common/Assets/QIF/old/IQIFDocument.g.cs
deleted file mode 100644
index ae7eec58..00000000
--- a/src/MTConnect.NET-Common/Assets/QIF/old/IQIFDocument.g.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.QIF
-{
- ///
- /// Qif Document as given by the QIF standard.
- ///
- public interface IQIFDocument
- {
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/QIF/old/IQIFDocumentWrapper.g.cs b/src/MTConnect.NET-Common/Assets/QIF/old/IQIFDocumentWrapper.g.cs
deleted file mode 100644
index 24491560..00000000
--- a/src/MTConnect.NET-Common/Assets/QIF/old/IQIFDocumentWrapper.g.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.QIF
-{
- ///
- /// Asset that carries the QIF Document.
- ///
- public interface IQIFDocumentWrapper : IAsset
- {
- ///
- /// Qif Document as given by the QIF standard.
- ///
- MTConnect.Assets.QIF.IQIFDocument QIFDocument { get; }
-
- ///
- /// Contained QIF Document type as defined in the QIF Standard.
- ///
- MTConnect.Assets.QIF.QIFDocumentType QifDocumentType { get; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocument.g.cs b/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocument.g.cs
deleted file mode 100644
index 1f757766..00000000
--- a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocument.g.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-// MTConnect SysML v2.2 : UML ID = _19_0_3_68e0225_1622119794339_346750_1858
-
-namespace MTConnect.Assets.QIF
-{
- ///
- /// Qif Document as given by the QIF standard.
- ///
- public class QIFDocument : IQIFDocument
- {
- public const string DescriptionText = "Qif Document as given by the QIF standard.";
-
-
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentDescriptions.g.cs
deleted file mode 100644
index e9aa491a..00000000
--- a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentDescriptions.g.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.QIF
-{
- public static class QIFDocumentDescriptions
- {
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentType.cs b/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentType.cs
deleted file mode 100644
index f0b980fc..00000000
--- a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentType.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.QIF
-{
- public enum QIFDocumentType
- {
- MEASUREMENT_RESOURCE,
- PLAN,
- PRODUCT,
- RESULTS,
- RULES,
- STATISTICS
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentType.g.cs b/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentType.g.cs
deleted file mode 100644
index c3864153..00000000
--- a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentType.g.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.QIF
-{
- public enum QIFDocumentType
- {
- ///
- ///
- ///
- MEASUREMENT_RESOURCE,
-
- ///
- ///
- ///
- PLAN,
-
- ///
- ///
- ///
- PRODUCT,
-
- ///
- ///
- ///
- RESULTS,
-
- ///
- ///
- ///
- RULES,
-
- ///
- ///
- ///
- STATISTICS
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentTypeDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentTypeDescriptions.g.cs
deleted file mode 100644
index 012e7314..00000000
--- a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentTypeDescriptions.g.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.QIF
-{
- public static class QIFDocumentTypeDescriptions
- {
- ///
- ///
- ///
- public const string MEASUREMENT_RESOURCE = "";
-
- ///
- ///
- ///
- public const string PLAN = "";
-
- ///
- ///
- ///
- public const string PRODUCT = "";
-
- ///
- ///
- ///
- public const string RESULTS = "";
-
- ///
- ///
- ///
- public const string RULES = "";
-
- ///
- ///
- ///
- public const string STATISTICS = "";
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentTypeEnum.g.cs b/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentTypeEnum.g.cs
deleted file mode 100644
index caeff1d4..00000000
--- a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentTypeEnum.g.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.QIF
-{
- public enum QIFDocumentTypeEnum
- {
- ///
- ///
- ///
- MeasurementResource,
-
- ///
- ///
- ///
- Plan,
-
- ///
- ///
- ///
- Product,
-
- ///
- ///
- ///
- Results,
-
- ///
- ///
- ///
- Rules,
-
- ///
- ///
- ///
- Statistics
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentTypeEnumDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentTypeEnumDescriptions.g.cs
deleted file mode 100644
index 52fbfb65..00000000
--- a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentTypeEnumDescriptions.g.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.QIF
-{
- public static class QIFDocumentTypeEnumDescriptions
- {
- ///
- ///
- ///
- public const string MeasurementResource = "";,
-
- ///
- ///
- ///
- public const string Plan = "";,
-
- ///
- ///
- ///
- public const string Product = "";,
-
- ///
- ///
- ///
- public const string Results = "";,
-
- ///
- ///
- ///
- public const string Rules = "";,
-
- ///
- ///
- ///
- public const string Statistics = "";
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentWrapper.g.cs b/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentWrapper.g.cs
deleted file mode 100644
index 694295e3..00000000
--- a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentWrapper.g.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-// MTConnect SysML v2.2 : UML ID = _19_0_3_68e0225_1622119541205_751450_1761
-
-namespace MTConnect.Assets.QIF
-{
- ///
- /// Asset that carries the QIF Document.
- ///
- public class QIFDocumentWrapper : Asset, IQIFDocumentWrapper
- {
- public new const string DescriptionText = "Asset that carries the QIF Document.";
-
-
- ///
- /// Qif Document as given by the QIF standard.
- ///
- public MTConnect.Assets.QIF.IQIFDocument QIFDocument { get; set; }
-
- ///
- /// Contained QIF Document type as defined in the QIF Standard.
- ///
- public MTConnect.Assets.QIF.QIFDocumentType QifDocumentType { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentWrapperDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentWrapperDescriptions.g.cs
deleted file mode 100644
index 34a14f2a..00000000
--- a/src/MTConnect.NET-Common/Assets/QIF/old/QIFDocumentWrapperDescriptions.g.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.QIF
-{
- public static class QIFDocumentWrapperDescriptions
- {
- ///
- /// Qif Document as given by the QIF standard.
- ///
- public const string QIFDocument = "Qif Document as given by the QIF standard.";
-
- ///
- /// Contained QIF Document type as defined in the QIF Standard.
- ///
- public const string QifDocumentType = "Contained QIF Document type as defined in the QIF Standard.";
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/RawMaterials/IRawMaterial.g.cs b/src/MTConnect.NET-Common/Assets/RawMaterials/IRawMaterialAsset.g.cs
similarity index 98%
rename from src/MTConnect.NET-Common/Assets/RawMaterials/IRawMaterial.g.cs
rename to src/MTConnect.NET-Common/Assets/RawMaterials/IRawMaterialAsset.g.cs
index 3e79e983..b1e34147 100644
--- a/src/MTConnect.NET-Common/Assets/RawMaterials/IRawMaterial.g.cs
+++ b/src/MTConnect.NET-Common/Assets/RawMaterials/IRawMaterialAsset.g.cs
@@ -6,7 +6,7 @@ namespace MTConnect.Assets.RawMaterials
///
/// Asset that represents raw material.
///
- public partial interface IRawMaterial : IAsset
+ public partial interface IRawMaterialAsset : IAsset
{
///
/// Type of container holding the raw material. Examples: `Pallet`, `Canister`, `Cartridge`, `Tank`, `Bin`, `Roll`, and `Spool`.
diff --git a/src/MTConnect.NET-Common/Assets/RawMaterials/RawMaterialAsset.cs b/src/MTConnect.NET-Common/Assets/RawMaterials/RawMaterialAsset.cs
deleted file mode 100644
index 40ee044a..00000000
--- a/src/MTConnect.NET-Common/Assets/RawMaterials/RawMaterialAsset.cs
+++ /dev/null
@@ -1,183 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-using System;
-using System.Text.Json.Serialization;
-using System.Xml;
-using System.Xml.Serialization;
-
-namespace MTConnect.Assets.RawMaterials
-{
- ///
- /// Raw material represents the source of material for immediate use and sources of material that may or may not be used during the manufacturing process.
- ///
- [XmlRoot("RawMaterial")]
- public class RawMaterialAsset : Asset
- {
- public const string TypeId = "RawMaterial";
-
-
- ///
- /// The raw material name.
- /// Examples: Container1 and AcrylicContainer
- ///
- [XmlAttribute("name")]
- [JsonPropertyName("name")]
- public string Name { get; set; }
-
- ///
- /// The type of container holding the raw material.
- /// Examples: Pallet, Canister, Cartridge, Tank, Bin, Roll, and Spool.
- ///
- [XmlAttribute("containerType")]
- [JsonPropertyName("containerType")]
- public string ContainerType { get; set; }
-
- ///
- /// The ISO process type supported by this raw material.
- /// Examples include: VAT_POLYMERIZATION,
- /// BINDER_JETTING,
- /// MATERIAL_EXTRUSION,
- /// MATERIAL_JETTING,
- /// SHEET_LAMINATION,
- /// POWDER_BED_FUSION, or
- /// DIRECTED_ENERGY_DEPOSITION.
- ///
- [XmlAttribute("processKind")]
- [JsonPropertyName("processKind")]
- public string ProcessKind { get; set; }
-
- ///
- /// The serial number of the raw material.
- ///
- [XmlAttribute("serialNumber")]
- [JsonPropertyName("serialNumber")]
- public string SerialNumber { get; set; }
-
- ///
- /// The form of the raw material.
- /// The value MUST be BAR, SHEET, BLOCK,
- /// CASTING, POWDER, LIQUID, GEL,
- /// FILAMENT, or GAS.
- ///
- [XmlElement("Form")]
- [JsonPropertyName("form")]
- public string Form { get; set; }
-
- ///
- /// Material has existing usable volume.
- ///
- [XmlElement("HasMaterial")]
- [JsonPropertyName("hasMaterial")]
- public bool HasMaterial { get; set; }
-
- ///
- /// The date the raw material was created.
- ///
- [XmlElement("ManufacturingDate")]
- [JsonPropertyName("manufacturingDate")]
- public DateTime ManufacturingDate { get; set; }
-
- ///
- /// The date raw material was first used.
- ///
- [XmlElement("FirstUseDate")]
- [JsonPropertyName("firstUseDate")]
- public DateTime FirstUseDate { get; set; }
-
- ///
- /// The date raw material was last used.
- ///
- [XmlElement("LastUseDate")]
- [JsonPropertyName("lastUseDate")]
- public DateTime LastUseDate { get; set; }
-
- ///
- /// The amount of material initially placed in raw material when manufactured.
- ///
- [XmlElement("InitialVolume")]
- [JsonPropertyName("initialVolume")]
- public double InitialVolume { get; set; }
-
- ///
- /// The dimension of material initially placed in raw material when manufactured.
- ///
- [XmlElement("InitialDimension")]
- [JsonPropertyName("initialDimension")]
- public string InitialDimension { get; set; }
-
- ///
- /// The quantity of material initially placed in raw material when manufactured.
- ///
- [XmlElement("InitialQuantity")]
- [JsonPropertyName("initialQuantity")]
- public int InitialQuantity { get; set; }
-
- ///
- /// The amount of material currently in raw material.
- ///
- [XmlElement("CurrentVolume")]
- [JsonPropertyName("currentVolume")]
- public double CurrentVolume { get; set; }
-
- ///
- /// The dimension of material currently in raw material.
- ///
- [XmlElement("CurrentDimension")]
- [JsonPropertyName("currentDimension")]
- public string CurrentDimension { get; set; }
-
- ///
- /// The quantity of material currently in raw material.
- ///
- [XmlElement("CurrentQuantity")]
- [JsonPropertyName("currentQuantity")]
- public int CurrentQuantity { get; set; }
-
- ///
- /// Material used as the raw material.
- ///
- [XmlElement("Material")]
- [JsonPropertyName("material")]
- public Material Material { get; set; }
-
-
- public RawMaterialAsset()
- {
- Type = TypeId;
- }
-
-
- protected override IAsset OnProcess(Version mtconnectVersion)
- {
- if (mtconnectVersion != null && mtconnectVersion >= MTConnectVersions.Version18)
- {
- return this;
- }
-
- return null;
- }
-
- public override AssetValidationResult IsValid(Version mtconnectVersion)
- {
- var message = "";
- var result = true;
-
- if (string.IsNullOrEmpty(Form))
- {
- message = "Form property is Required";
- result = false;
- }
- else
- {
- if (Material != null && string.IsNullOrEmpty(Material.Type))
- {
- message = "Material Type property is Required";
- result = false;
- }
- }
-
- return new AssetValidationResult(result, message);
- }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/RawMaterials/RawMaterial.g.cs b/src/MTConnect.NET-Common/Assets/RawMaterials/RawMaterialAsset.g.cs
similarity index 98%
rename from src/MTConnect.NET-Common/Assets/RawMaterials/RawMaterial.g.cs
rename to src/MTConnect.NET-Common/Assets/RawMaterials/RawMaterialAsset.g.cs
index 04fc782d..235d71e6 100644
--- a/src/MTConnect.NET-Common/Assets/RawMaterials/RawMaterial.g.cs
+++ b/src/MTConnect.NET-Common/Assets/RawMaterials/RawMaterialAsset.g.cs
@@ -8,7 +8,7 @@ namespace MTConnect.Assets.RawMaterials
///
/// Asset that represents raw material.
///
- public partial class RawMaterial : Asset, IRawMaterial
+ public partial class RawMaterialAsset : Asset, IRawMaterialAsset
{
public new const string DescriptionText = "Asset that represents raw material.";
diff --git a/src/MTConnect.NET-Common/Assets/RawMaterials/RawMaterialDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/RawMaterials/RawMaterialAssetDescriptions.g.cs
similarity index 98%
rename from src/MTConnect.NET-Common/Assets/RawMaterials/RawMaterialDescriptions.g.cs
rename to src/MTConnect.NET-Common/Assets/RawMaterials/RawMaterialAssetDescriptions.g.cs
index 43b0bcb0..e816728c 100644
--- a/src/MTConnect.NET-Common/Assets/RawMaterials/RawMaterialDescriptions.g.cs
+++ b/src/MTConnect.NET-Common/Assets/RawMaterials/RawMaterialAssetDescriptions.g.cs
@@ -3,7 +3,7 @@
namespace MTConnect.Assets.RawMaterials
{
- public static class RawMaterialDescriptions
+ public static class RawMaterialAssetDescriptions
{
///
/// Type of container holding the raw material. Examples: `Pallet`, `Canister`, `Cartridge`, `Tank`, `Bin`, `Roll`, and `Spool`.
diff --git a/src/MTConnect.NET-Common/Assets/RawMaterials/old/Form.g.cs b/src/MTConnect.NET-Common/Assets/RawMaterials/old/Form.g.cs
deleted file mode 100644
index 869c34ac..00000000
--- a/src/MTConnect.NET-Common/Assets/RawMaterials/old/Form.g.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.RawMaterials
-{
- public enum Form
- {
- ///
- ///
- ///
- BAR,
-
- ///
- ///
- ///
- BLOCK,
-
- ///
- ///
- ///
- CASTING,
-
- ///
- ///
- ///
- FILAMENT,
-
- ///
- ///
- ///
- GAS,
-
- ///
- ///
- ///
- GEL,
-
- ///
- ///
- ///
- LIQUID,
-
- ///
- ///
- ///
- POWDER,
-
- ///
- ///
- ///
- SHEET
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/RawMaterials/old/FormDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/RawMaterials/old/FormDescriptions.g.cs
deleted file mode 100644
index 5ce6866d..00000000
--- a/src/MTConnect.NET-Common/Assets/RawMaterials/old/FormDescriptions.g.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.RawMaterials
-{
- public static class FormDescriptions
- {
- ///
- ///
- ///
- public const string BAR = "";
-
- ///
- ///
- ///
- public const string BLOCK = "";
-
- ///
- ///
- ///
- public const string CASTING = "";
-
- ///
- ///
- ///
- public const string FILAMENT = "";
-
- ///
- ///
- ///
- public const string GAS = "";
-
- ///
- ///
- ///
- public const string GEL = "";
-
- ///
- ///
- ///
- public const string LIQUID = "";
-
- ///
- ///
- ///
- public const string POWDER = "";
-
- ///
- ///
- ///
- public const string SHEET = "";
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/RawMaterials/old/FormEnum.g.cs b/src/MTConnect.NET-Common/Assets/RawMaterials/old/FormEnum.g.cs
deleted file mode 100644
index 2d7e5f8a..00000000
--- a/src/MTConnect.NET-Common/Assets/RawMaterials/old/FormEnum.g.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.RawMaterials
-{
- public enum FormEnum
- {
- ///
- ///
- ///
- Bar,
-
- ///
- ///
- ///
- Block,
-
- ///
- ///
- ///
- Casting,
-
- ///
- ///
- ///
- Filament,
-
- ///
- ///
- ///
- Gas,
-
- ///
- ///
- ///
- Gel,
-
- ///
- ///
- ///
- Liquid,
-
- ///
- ///
- ///
- Powder,
-
- ///
- ///
- ///
- Sheet
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/RawMaterials/old/FormEnumDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/RawMaterials/old/FormEnumDescriptions.g.cs
deleted file mode 100644
index b64dbe3e..00000000
--- a/src/MTConnect.NET-Common/Assets/RawMaterials/old/FormEnumDescriptions.g.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.RawMaterials
-{
- public static class FormEnumDescriptions
- {
- ///
- ///
- ///
- public const string Bar = "";,
-
- ///
- ///
- ///
- public const string Block = "";,
-
- ///
- ///
- ///
- public const string Casting = "";,
-
- ///
- ///
- ///
- public const string Filament = "";,
-
- ///
- ///
- ///
- public const string Gas = "";,
-
- ///
- ///
- ///
- public const string Gel = "";,
-
- ///
- ///
- ///
- public const string Liquid = "";,
-
- ///
- ///
- ///
- public const string Powder = "";,
-
- ///
- ///
- ///
- public const string Sheet = "";
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/RawMaterials/old/IMaterial.g.cs b/src/MTConnect.NET-Common/Assets/RawMaterials/old/IMaterial.g.cs
deleted file mode 100644
index b740392f..00000000
--- a/src/MTConnect.NET-Common/Assets/RawMaterials/old/IMaterial.g.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.RawMaterials
-{
- ///
- /// Material used as the RawMaterial.
- ///
- public interface IMaterial
- {
- ///
- /// Unique identifier for the material.
- ///
- string Id { get; }
-
- ///
- /// Manufacturer's lot code of the material.
- ///
- string Lot { get; }
-
- ///
- /// Name of the material manufacturer.
- ///
- string Manufacturer { get; }
-
- ///
- /// Lot code of the raw feed stock for the material, from the feed stock manufacturer.
- ///
- string ManufacturingCode { get; }
-
- ///
- /// Manufacturing date of the material from the material manufacturer.
- ///
- System.DateTime ManufacturingDate { get; }
-
- ///
- /// Astm standard code that the material complies with.
- ///
- string MaterialCode { get; }
-
- ///
- /// Name of the material. Examples: `ULTM9085`, `ABS`, `4140`.
- ///
- string Name { get; }
-
- ///
- /// Type of material. Examples: `Metal`, `Polymer`, `Wood`, `4140`, `Recycled`, `Prestine` and `Used`.
- ///
- string Type { get; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/RawMaterials/old/IRawMaterial.g.cs b/src/MTConnect.NET-Common/Assets/RawMaterials/old/IRawMaterial.g.cs
deleted file mode 100644
index 21359936..00000000
--- a/src/MTConnect.NET-Common/Assets/RawMaterials/old/IRawMaterial.g.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.RawMaterials
-{
- ///
- /// Asset that represents raw material.
- ///
- public interface IRawMaterial : IAsset
- {
- ///
- /// Type of container holding the raw material. Examples: `Pallet`, `Canister`, `Cartridge`, `Tank`, `Bin`, `Roll`, and `Spool`.
- ///
- string ContainerType { get; }
-
- ///
- /// Dimension of material currently in raw material.
- ///
- System.Collections.Generic.IEnumerable CurrentDimensions { get; }
-
- ///
- /// Quantity of material currently in raw material.
- ///
- int CurrentQuantity { get; }
-
- ///
- /// Amount of material currently in raw material.
- ///
- string CurrentVolume { get; }
-
- ///
- /// Date raw material was first used.
- ///
- System.DateTime FirstUseDate { get; }
-
- ///
- /// Form of the raw material.
- ///
- MTConnect.Assets.RawMaterials.Form Form { get; }
-
- ///
- /// Material has existing usable volume.
- ///
- bool HasMaterial { get; }
-
- ///
- /// Dimension of material initially placed in raw material when manufactured.
- ///
- System.Collections.Generic.IEnumerable InitialDimensions { get; }
-
- ///
- /// Quantity of material initially placed in raw material when manufactured.
- ///
- int InitialQuantity { get; }
-
- ///
- /// Amount of material initially placed in raw material when manufactured.
- ///
- string InitialVolume { get; }
-
- ///
- /// Date raw material was last used.
- ///
- System.DateTime LastUseDate { get; }
-
- ///
- /// Date the raw material was created.
- ///
- System.DateTime ManufacturingDate { get; }
-
- ///
- /// Material used as the RawMaterial.
- ///
- MTConnect.Assets.RawMaterials.IMaterial Material { get; }
-
- ///
- /// Name of the raw material.Examples: `Container1` and `AcrylicContainer`.
- ///
- string Name { get; }
-
- ///
- /// Iso process type supported by this raw material. Examples include: `VAT_POLYMERIZATION`, `BINDER_JETTING`, `MATERIAL_EXTRUSION`, `MATERIAL_JETTING`, `SHEET_LAMINATION`, `POWDER_BED_FUSION` and `DIRECTED_ENERGY_DEPOSITION`.
- ///
- string ProcessKind { get; }
-
- ///
- /// Serial number of the raw material.
- ///
- string SerialNumber { get; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/RawMaterials/old/Material.cs b/src/MTConnect.NET-Common/Assets/RawMaterials/old/Material.cs
deleted file mode 100644
index 8d82025a..00000000
--- a/src/MTConnect.NET-Common/Assets/RawMaterials/old/Material.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-using System;
-using System.Text.Json.Serialization;
-using System.Xml;
-using System.Xml.Serialization;
-
-namespace MTConnect.Assets.RawMaterials
-{
- ///
- /// Material used as the raw material.
- ///
- public class Material
- {
- ///
- /// The unique identifier for the material.
- ///
- [XmlAttribute("id")]
- [JsonPropertyName("id")]
- public string Id { get; set; }
-
- ///
- /// The name of the material.
- /// Examples: ULTM9085, ABS, 4140.
- ///
- [XmlAttribute("name")]
- [JsonPropertyName("name")]
- public string Name { get; set; }
-
- ///
- /// The type of material.
- /// Examples: Metal, Polymer, Wood, 4140, Recycled, Prestine and Used.
- ///
- [XmlAttribute("type")]
- [JsonPropertyName("type")]
- public string Type { get; set; }
-
- ///
- /// The manufacturer’s lot code of the material.
- ///
- [XmlElement("Lot")]
- [JsonPropertyName("lot")]
- public string Lot { get; set; }
-
- ///
- /// The name of the material manufacturer.
- ///
- [XmlElement("Manufacturer")]
- [JsonPropertyName("manufacturer")]
- public string Manufacturer { get; set; }
-
- ///
- /// The manufacturing date of the material from the material manufacturer.
- ///
- [XmlElement("ManufacturingDate")]
- [JsonPropertyName("manufacturingDate")]
- public DateTime ManufacturingDate { get; set; }
-
- ///
- /// The lot code of the raw feed stock for the material, from the feed stock manufacturer.
- ///
- [XmlElement("ManufacturingCode")]
- [JsonPropertyName("manufacturingCode")]
- public string ManufacturingCode { get; set; }
-
- ///
- /// The ASTM standard code that the material complies with.
- ///
- [XmlElement("MaterialCode")]
- [JsonPropertyName("materialCode")]
- public string MaterialCode { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/RawMaterials/old/Material.g.cs b/src/MTConnect.NET-Common/Assets/RawMaterials/old/Material.g.cs
deleted file mode 100644
index f35b0720..00000000
--- a/src/MTConnect.NET-Common/Assets/RawMaterials/old/Material.g.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-// MTConnect SysML v2.2 : UML ID = _19_0_3_68e0225_1618831557881_852871_420
-
-namespace MTConnect.Assets.RawMaterials
-{
- ///
- /// Material used as the RawMaterial.
- ///
- public class Material : IMaterial
- {
- public const string DescriptionText = "Material used as the RawMaterial.";
-
-
- ///
- /// Unique identifier for the material.
- ///
- public string Id { get; set; }
-
- ///
- /// Manufacturer's lot code of the material.
- ///
- public string Lot { get; set; }
-
- ///
- /// Name of the material manufacturer.
- ///
- public string Manufacturer { get; set; }
-
- ///
- /// Lot code of the raw feed stock for the material, from the feed stock manufacturer.
- ///
- public string ManufacturingCode { get; set; }
-
- ///
- /// Manufacturing date of the material from the material manufacturer.
- ///
- public System.DateTime ManufacturingDate { get; set; }
-
- ///
- /// Astm standard code that the material complies with.
- ///
- public string MaterialCode { get; set; }
-
- ///
- /// Name of the material. Examples: `ULTM9085`, `ABS`, `4140`.
- ///
- public string Name { get; set; }
-
- ///
- /// Type of material. Examples: `Metal`, `Polymer`, `Wood`, `4140`, `Recycled`, `Prestine` and `Used`.
- ///
- public string Type { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/RawMaterials/old/MaterialDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/RawMaterials/old/MaterialDescriptions.g.cs
deleted file mode 100644
index cd14c2cc..00000000
--- a/src/MTConnect.NET-Common/Assets/RawMaterials/old/MaterialDescriptions.g.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.RawMaterials
-{
- public static class MaterialDescriptions
- {
- ///
- /// Unique identifier for the material.
- ///
- public const string Id = "Unique identifier for the material.";
-
- ///
- /// Manufacturer's lot code of the material.
- ///
- public const string Lot = "Manufacturer's lot code of the material.";
-
- ///
- /// Name of the material manufacturer.
- ///
- public const string Manufacturer = "Name of the material manufacturer.";
-
- ///
- /// Lot code of the raw feed stock for the material, from the feed stock manufacturer.
- ///
- public const string ManufacturingCode = "Lot code of the raw feed stock for the material, from the feed stock manufacturer.";
-
- ///
- /// Manufacturing date of the material from the material manufacturer.
- ///
- public const string ManufacturingDate = "Manufacturing date of the material from the material manufacturer.";
-
- ///
- /// Astm standard code that the material complies with.
- ///
- public const string MaterialCode = "Astm standard code that the material complies with.";
-
- ///
- /// Name of the material. Examples: `ULTM9085`, `ABS`, `4140`.
- ///
- public const string Name = "Name of the material. Examples: `ULTM9085`, `ABS`, `4140`.";
-
- ///
- /// Type of material. Examples: `Metal`, `Polymer`, `Wood`, `4140`, `Recycled`, `Prestine` and `Used`.
- ///
- public const string Type = "Type of material. Examples: `Metal`, `Polymer`, `Wood`, `4140`, `Recycled`, `Prestine` and `Used`.";
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/RawMaterials/old/RawMaterial.g.cs b/src/MTConnect.NET-Common/Assets/RawMaterials/old/RawMaterial.g.cs
deleted file mode 100644
index 84aef9c2..00000000
--- a/src/MTConnect.NET-Common/Assets/RawMaterials/old/RawMaterial.g.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-// MTConnect SysML v2.2 : UML ID = _19_0_3_68e0225_1618829902716_470188_214
-
-namespace MTConnect.Assets.RawMaterials
-{
- ///
- /// Asset that represents raw material.
- ///
- public class RawMaterial : Asset, IRawMaterial
- {
- public new const string DescriptionText = "Asset that represents raw material.";
-
-
- ///
- /// Type of container holding the raw material. Examples: `Pallet`, `Canister`, `Cartridge`, `Tank`, `Bin`, `Roll`, and `Spool`.
- ///
- public string ContainerType { get; set; }
-
- ///
- /// Dimension of material currently in raw material.
- ///
- public System.Collections.Generic.IEnumerable CurrentDimensions { get; set; }
-
- ///
- /// Quantity of material currently in raw material.
- ///
- public int CurrentQuantity { get; set; }
-
- ///
- /// Amount of material currently in raw material.
- ///
- public string CurrentVolume { get; set; }
-
- ///
- /// Date raw material was first used.
- ///
- public System.DateTime FirstUseDate { get; set; }
-
- ///
- /// Form of the raw material.
- ///
- public MTConnect.Assets.RawMaterials.Form Form { get; set; }
-
- ///
- /// Material has existing usable volume.
- ///
- public bool HasMaterial { get; set; }
-
- ///
- /// Dimension of material initially placed in raw material when manufactured.
- ///
- public System.Collections.Generic.IEnumerable InitialDimensions { get; set; }
-
- ///
- /// Quantity of material initially placed in raw material when manufactured.
- ///
- public int InitialQuantity { get; set; }
-
- ///
- /// Amount of material initially placed in raw material when manufactured.
- ///
- public string InitialVolume { get; set; }
-
- ///
- /// Date raw material was last used.
- ///
- public System.DateTime LastUseDate { get; set; }
-
- ///
- /// Date the raw material was created.
- ///
- public System.DateTime ManufacturingDate { get; set; }
-
- ///
- /// Material used as the RawMaterial.
- ///
- public MTConnect.Assets.RawMaterials.IMaterial Material { get; set; }
-
- ///
- /// Name of the raw material.Examples: `Container1` and `AcrylicContainer`.
- ///
- public string Name { get; set; }
-
- ///
- /// Iso process type supported by this raw material. Examples include: `VAT_POLYMERIZATION`, `BINDER_JETTING`, `MATERIAL_EXTRUSION`, `MATERIAL_JETTING`, `SHEET_LAMINATION`, `POWDER_BED_FUSION` and `DIRECTED_ENERGY_DEPOSITION`.
- ///
- public string ProcessKind { get; set; }
-
- ///
- /// Serial number of the raw material.
- ///
- public string SerialNumber { get; set; }
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/Assets/RawMaterials/old/RawMaterialDescriptions.g.cs b/src/MTConnect.NET-Common/Assets/RawMaterials/old/RawMaterialDescriptions.g.cs
deleted file mode 100644
index 4f0e3e29..00000000
--- a/src/MTConnect.NET-Common/Assets/RawMaterials/old/RawMaterialDescriptions.g.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
-// TrakHound Inc. licenses this file to you under the MIT license.
-
-namespace MTConnect.Assets.RawMaterials
-{
- public static class RawMaterialDescriptions
- {
- ///
- /// Type of container holding the raw material. Examples: `Pallet`, `Canister`, `Cartridge`, `Tank`, `Bin`, `Roll`, and `Spool`.
- ///
- public const string ContainerType = "Type of container holding the raw material. Examples: `Pallet`, `Canister`, `Cartridge`, `Tank`, `Bin`, `Roll`, and `Spool`.";
-
- ///
- /// Dimension of material currently in raw material.
- ///
- public const string CurrentDimensions = "Dimension of material currently in raw material.";
-
- ///
- /// Quantity of material currently in raw material.
- ///
- public const string CurrentQuantity = "Quantity of material currently in raw material.";
-
- ///
- /// Amount of material currently in raw material.
- ///
- public const string CurrentVolume = "Amount of material currently in raw material.";
-
- ///
- /// Date raw material was first used.
- ///
- public const string FirstUseDate = "Date raw material was first used.";
-
- ///
- /// Form of the raw material.
- ///
- public const string Form = "Form of the raw material.";
-
- ///
- /// Material has existing usable volume.
- ///
- public const string HasMaterial = "Material has existing usable volume.";
-
- ///
- /// Dimension of material initially placed in raw material when manufactured.
- ///
- public const string InitialDimensions = "Dimension of material initially placed in raw material when manufactured.";
-
- ///
- /// Quantity of material initially placed in raw material when manufactured.
- ///
- public const string InitialQuantity = "Quantity of material initially placed in raw material when manufactured.";
-
- ///
- /// Amount of material initially placed in raw material when manufactured.
- ///
- public const string InitialVolume = "Amount of material initially placed in raw material when manufactured.";
-
- ///
- /// Date raw material was last used.
- ///
- public const string LastUseDate = "Date raw material was last used.";
-
- ///
- /// Date the raw material was created.
- ///
- public const string ManufacturingDate = "Date the raw material was created.";
-
- ///
- /// Material used as the RawMaterial.
- ///
- public const string Material = "Material used as the RawMaterial.";
-
- ///
- /// Name of the raw material.Examples: `Container1` and `AcrylicContainer`.
- ///
- public const string Name = "Name of the raw material.Examples: `Container1` and `AcrylicContainer`.";
-
- ///
- /// Iso process type supported by this raw material. Examples include: `VAT_POLYMERIZATION`, `BINDER_JETTING`, `MATERIAL_EXTRUSION`, `MATERIAL_JETTING`, `SHEET_LAMINATION`, `POWDER_BED_FUSION` and `DIRECTED_ENERGY_DEPOSITION`.
- ///
- public const string ProcessKind = "Iso process type supported by this raw material. Examples include: `VAT_POLYMERIZATION`, `BINDER_JETTING`, `MATERIAL_EXTRUSION`, `MATERIAL_JETTING`, `SHEET_LAMINATION`, `POWDER_BED_FUSION` and `DIRECTED_ENERGY_DEPOSITION`.";
-
- ///
- /// Serial number of the raw material.
- ///
- public const string SerialNumber = "Serial number of the raw material.";
- }
-}
\ No newline at end of file
diff --git a/src/MTConnect.NET-Common/MTConnect.NET-Common.csproj b/src/MTConnect.NET-Common/MTConnect.NET-Common.csproj
index 288bb9d1..86f8de48 100644
--- a/src/MTConnect.NET-Common/MTConnect.NET-Common.csproj
+++ b/src/MTConnect.NET-Common/MTConnect.NET-Common.csproj
@@ -106,136 +106,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -249,6 +123,8 @@
+
+
diff --git a/src/MTConnect.NET-SysML/ModelHelper.cs b/src/MTConnect.NET-SysML/ModelHelper.cs
index cddf8085..23dad86c 100644
--- a/src/MTConnect.NET-SysML/ModelHelper.cs
+++ b/src/MTConnect.NET-SysML/ModelHelper.cs
@@ -489,6 +489,8 @@ public static bool IsOptional(XmiDocument xmiDocument, string id)
case "EAID_320E255E_EDA1_49b8_928D_8A87BE90CF06": return true; // Assets.CuttingTools.ReconditionCount.MaximumCount
case "_19_0_3_68e0225_1636115275525_86177_53": return true; // Assets.CuttingTools.ReconditionCount.Value
+
+ case "_19_0_3_68e0225_1605276845966_494050_370": return true; // Assets.Files.File.ModificationTime
}
return false;
diff --git a/src/MTConnect.NET-XML/Assets/Files/XmlAbstractFileAsset.cs b/src/MTConnect.NET-XML/Assets/Files/XmlAbstractFileAsset.cs
new file mode 100644
index 00000000..656563ef
--- /dev/null
+++ b/src/MTConnect.NET-XML/Assets/Files/XmlAbstractFileAsset.cs
@@ -0,0 +1,29 @@
+// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
+// TrakHound Inc. licenses this file to you under the MIT license.
+
+using System.Collections.Generic;
+using System.Xml.Serialization;
+
+namespace MTConnect.Assets.Xml.Files
+{
+ public abstract class XmlAbstractFileAsset
+ {
+ [XmlAttribute("name")]
+ public string Name { get; set; }
+
+ [XmlAttribute("mediaType")]
+ public string MediaType { get; set; }
+
+ [XmlAttribute("applicationCategory")]
+ public string ApplicationCategory { get; set; }
+
+ [XmlAttribute("applicationType")]
+ public string ApplicationType { get; set; }
+
+ [XmlElement("FileProperties")]
+ public List FileProperties { get; set; }
+
+ [XmlElement("FileComments")]
+ public List FileComments { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/MTConnect.NET-XML/Assets/Files/XmlDestination.cs b/src/MTConnect.NET-XML/Assets/Files/XmlDestination.cs
new file mode 100644
index 00000000..fcda79f3
--- /dev/null
+++ b/src/MTConnect.NET-XML/Assets/Files/XmlDestination.cs
@@ -0,0 +1,41 @@
+// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
+// TrakHound Inc. licenses this file to you under the MIT license.
+
+using MTConnect.Assets.Files;
+using System.Collections.Generic;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace MTConnect.Assets.Xml.Files
+{
+ public class XmlDestination
+ {
+ [XmlAttribute("deviceUuid")]
+ public string DeviceUuid { get; set; }
+
+
+ public IDestination ToDestination()
+ {
+ var destination = new Destination();
+ destination.DeviceUuid = DeviceUuid;
+ return destination;
+ }
+
+ public static void WriteXml(XmlWriter writer, IEnumerable destinations)
+ {
+ if (!destinations.IsNullOrEmpty())
+ {
+ writer.WriteStartElement("Destinations");
+
+ foreach (var destination in destinations)
+ {
+ writer.WriteStartElement("Destination");
+ writer.WriteAttributeString("deviceUuid", destination.DeviceUuid);
+ writer.WriteEndElement();
+ }
+
+ writer.WriteEndElement();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/MTConnect.NET-XML/Assets/Files/XmlFileAsset.cs b/src/MTConnect.NET-XML/Assets/Files/XmlFileAsset.cs
new file mode 100644
index 00000000..2901c41a
--- /dev/null
+++ b/src/MTConnect.NET-XML/Assets/Files/XmlFileAsset.cs
@@ -0,0 +1,183 @@
+// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
+// TrakHound Inc. licenses this file to you under the MIT license.
+
+using MTConnect.Assets.Files;
+using System.Collections.Generic;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace MTConnect.Assets.Xml.Files
+{
+ public class XmlFileAsset : XmlAsset
+ {
+ [XmlAttribute("name")]
+ public string Name { get; set; }
+
+ [XmlAttribute("mediaType")]
+ public string MediaType { get; set; }
+
+ [XmlAttribute("applicationCategory")]
+ public string ApplicationCategory { get; set; }
+
+ [XmlAttribute("applicationType")]
+ public string ApplicationType { get; set; }
+
+ [XmlAttribute("FileProperties")]
+ public List FileProperties { get; set; }
+
+ [XmlAttribute("FileComments")]
+ public List FileComments { get; set; }
+
+
+ [XmlAttribute("size")]
+ public int Size { get; set; }
+
+ [XmlAttribute("versionId")]
+ public string VersionId { get; set; }
+
+ [XmlAttribute("state")]
+ public string State { get; set; }
+
+ [XmlElement("FileLocation")]
+ public XmlFileLocation FileLocation { get; set; }
+
+ [XmlElement("Signature")]
+ public string Signature { get; set; }
+
+ [XmlElement("PublicKey")]
+ public string PublicKey { get; set; }
+
+ [XmlElement("Destinations")]
+ public List Destinations { get; set; }
+
+ [XmlElement("CreationTime")]
+ public string CreationTime { get; set; }
+
+ [XmlElement("ModificationTime")]
+ public string ModificationTime { get; set; }
+
+
+ public IFileAsset ToFileAsset()
+ {
+ var asset = new FileAsset();
+
+ asset.AssetId = AssetId;
+ asset.Type = Type;
+ asset.Timestamp = Timestamp;
+ asset.DeviceUuid = DeviceUuid;
+ asset.Removed = Removed;
+
+ //if (Description != null) asset.Description = Description.ToDescription();
+
+ asset.Size = Size;
+ asset.VersionId = VersionId;
+ asset.State = State.ConvertEnum();
+ asset.Signature = Signature;
+ asset.PublicKey = PublicKey;
+ asset.CreationTime = CreationTime.ToDateTime();
+ asset.ModificationTime = ModificationTime.ToDateTime();
+ asset.Name = Name;
+ asset.MediaType = MediaType;
+ asset.ApplicationCategory = ApplicationCategory.ConvertEnum();
+ asset.ApplicationType = ApplicationType.ConvertEnum();
+
+ if (FileLocation != null) asset.Location = FileLocation.ToFileLocation();
+
+ // FileProperties
+ if (!FileProperties.IsNullOrEmpty())
+ {
+ var fileProperties = new List();
+ foreach (var fileProperty in FileProperties)
+ {
+ fileProperties.Add(fileProperty.ToFileProperty());
+ }
+ asset.FileProperties = fileProperties;
+ }
+
+ // FileComments
+ if (!FileComments.IsNullOrEmpty())
+ {
+ var fileComments = new List();
+ foreach (var fileComment in FileComments)
+ {
+ fileComments.Add(fileComment.ToFileComment());
+ }
+ asset.FileComments = fileComments;
+ }
+
+ // Destinations
+ if (!Destinations.IsNullOrEmpty())
+ {
+ var destinations = new List();
+ foreach (var destination in Destinations)
+ {
+ destinations.Add(destination.ToDestination());
+ }
+ asset.Destinations = destinations;
+ }
+
+ return asset;
+ }
+
+ public static void WriteXml(XmlWriter writer, IAsset asset)
+ {
+ if (asset != null)
+ {
+ var file = (IFileAsset)asset;
+
+ writer.WriteStartElement("File");
+
+ WriteCommonXml(writer, asset);
+
+ // Write Properties
+ writer.WriteAttributeString("name", file.Name);
+ writer.WriteAttributeString("mediaType", file.MediaType);
+ writer.WriteAttributeString("applicationCategory", file.ApplicationCategory.ToString());
+ writer.WriteAttributeString("applicationType", file.ApplicationType.ToString());
+
+ writer.WriteAttributeString("size", file.Size.ToString());
+ writer.WriteAttributeString("versionId", file.VersionId);
+ writer.WriteAttributeString("state", file.State.ToString());
+
+ // CreationTime
+ writer.WriteStartElement("CreationTime");
+ writer.WriteString(file.CreationTime.ToString("o"));
+ writer.WriteEndElement();
+
+ // ModificationTime
+ if (file.ModificationTime != null)
+ {
+ writer.WriteStartElement("ModificationTime");
+ writer.WriteString(file.ModificationTime?.ToString("o"));
+ writer.WriteEndElement();
+ }
+
+ // Write Location
+ if (file.Location != null)
+ {
+ XmlFileLocation.WriteXml(writer, file.Location);
+ }
+
+ // Write FileComments
+ if (!file.FileComments.IsNullOrEmpty())
+ {
+ XmlFileComment.WriteXml(writer, file.FileComments);
+ }
+
+ // Write FileProperties
+ if (!file.FileProperties.IsNullOrEmpty())
+ {
+ XmlFileProperty.WriteXml(writer, file.FileProperties);
+ }
+
+ // Write Destinations
+ if (!file.Destinations.IsNullOrEmpty())
+ {
+ XmlDestination.WriteXml(writer, file.Destinations);
+ }
+
+ writer.WriteEndElement();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/MTConnect.NET-XML/Assets/Files/XmlFileComment.cs b/src/MTConnect.NET-XML/Assets/Files/XmlFileComment.cs
new file mode 100644
index 00000000..59742141
--- /dev/null
+++ b/src/MTConnect.NET-XML/Assets/Files/XmlFileComment.cs
@@ -0,0 +1,47 @@
+// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
+// TrakHound Inc. licenses this file to you under the MIT license.
+
+using MTConnect.Assets.Files;
+using System;
+using System.Collections.Generic;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace MTConnect.Assets.Xml.Files
+{
+ public class XmlFileComment
+ {
+ [XmlAttribute("timestamp")]
+ public DateTime Timestamp { get; set; }
+
+ [XmlText]
+ public string Value { get; set; }
+
+
+ public IFileComment ToFileComment()
+ {
+ var fileComment = new FileComment();
+ fileComment.Timestamp = Timestamp;
+ fileComment.Value = Value;
+ return fileComment;
+ }
+
+ public static void WriteXml(XmlWriter writer, IEnumerable fileComments)
+ {
+ if (!fileComments.IsNullOrEmpty())
+ {
+ writer.WriteStartElement("FileComments");
+
+ foreach (var fileComment in fileComments)
+ {
+ writer.WriteStartElement("FileComment");
+ writer.WriteAttributeString("timestamp", fileComment.Timestamp.ToString("o"));
+ writer.WriteString(fileComment.Value);
+ writer.WriteEndElement();
+ }
+
+ writer.WriteEndElement();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/MTConnect.NET-XML/Assets/Files/XmlFileLocation.cs b/src/MTConnect.NET-XML/Assets/Files/XmlFileLocation.cs
new file mode 100644
index 00000000..80bc7c0f
--- /dev/null
+++ b/src/MTConnect.NET-XML/Assets/Files/XmlFileLocation.cs
@@ -0,0 +1,38 @@
+// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
+// TrakHound Inc. licenses this file to you under the MIT license.
+
+using MTConnect.Assets.Files;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace MTConnect.Assets.Xml.Files
+{
+ public class XmlFileLocation
+ {
+ [XmlAttribute("href")]
+ public string Href { get; set; }
+
+ [XmlAttribute("xLinkType")]
+ public string XLinkType { get; set; }
+
+
+ public IFileLocation ToFileLocation()
+ {
+ var fileLocation = new FileLocation();
+ fileLocation.Href = Href;
+ fileLocation.XLinkType = XLinkType;
+ return fileLocation;
+ }
+
+ public static void WriteXml(XmlWriter writer, IFileLocation fileLocation)
+ {
+ if (fileLocation != null)
+ {
+ writer.WriteStartElement("FileLocation");
+ writer.WriteAttributeString("href", fileLocation.Href);
+ if (!string.IsNullOrEmpty(fileLocation.XLinkType)) writer.WriteAttributeString("xlink:type", fileLocation.XLinkType);
+ writer.WriteEndElement();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/MTConnect.NET-XML/Assets/Files/XmlFileProperty.cs b/src/MTConnect.NET-XML/Assets/Files/XmlFileProperty.cs
new file mode 100644
index 00000000..66d99334
--- /dev/null
+++ b/src/MTConnect.NET-XML/Assets/Files/XmlFileProperty.cs
@@ -0,0 +1,46 @@
+// Copyright (c) 2023 TrakHound Inc., All Rights Reserved.
+// TrakHound Inc. licenses this file to you under the MIT license.
+
+using MTConnect.Assets.Files;
+using System.Collections.Generic;
+using System.Xml;
+using System.Xml.Serialization;
+
+namespace MTConnect.Assets.Xml.Files
+{
+ public class XmlFileProperty
+ {
+ [XmlAttribute("name")]
+ public string Name { get; set; }
+
+ [XmlText]
+ public string Value { get; set; }
+
+
+ public IFileProperty ToFileProperty()
+ {
+ var fileProperty = new FileProperty();
+ fileProperty.Name = Name;
+ fileProperty.Value = Value;
+ return fileProperty;
+ }
+
+ public static void WriteXml(XmlWriter writer, IEnumerable fileProperties)
+ {
+ if (!fileProperties.IsNullOrEmpty())
+ {
+ writer.WriteStartElement("FileProperties");
+
+ foreach (var fileProperty in fileProperties)
+ {
+ writer.WriteStartElement("FileProperty");
+ writer.WriteAttributeString("name", fileProperty.Name);
+ writer.WriteString(fileProperty.Value);
+ writer.WriteEndElement();
+ }
+
+ writer.WriteEndElement();
+ }
+ }
+ }
+}
\ No newline at end of file