2021-01-29 22:54:16 -08:00
|
|
|
|
using System.Xml.Serialization;
|
2020-09-02 12:19:12 -07:00
|
|
|
|
using Newtonsoft.Json;
|
2022-11-03 12:22:17 -07:00
|
|
|
|
using SabreTools.Core;
|
2020-08-23 22:23:55 -07:00
|
|
|
|
|
2021-02-02 10:23:43 -08:00
|
|
|
|
namespace SabreTools.DatItems.Formats
|
2016-09-19 18:04:24 -07:00
|
|
|
|
{
|
2019-01-08 17:40:12 -08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Represents generic archive files to be included in a set
|
|
|
|
|
|
/// </summary>
|
2020-09-08 10:12:41 -07:00
|
|
|
|
[JsonObject("archive"), XmlRoot("archive")]
|
2019-01-08 17:40:12 -08:00
|
|
|
|
public class Archive : DatItem
|
|
|
|
|
|
{
|
2020-09-02 12:19:12 -07:00
|
|
|
|
#region Fields
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Name of the item
|
|
|
|
|
|
/// </summary>
|
2022-11-03 12:22:17 -07:00
|
|
|
|
[JsonProperty("name"), XmlElement("name")]
|
2023-08-14 13:17:51 -04:00
|
|
|
|
public string? Name
|
|
|
|
|
|
{
|
2023-09-04 23:51:37 -04:00
|
|
|
|
get => _internal.ReadString(Models.Metadata.Archive.NameKey);
|
|
|
|
|
|
set => _internal[Models.Metadata.Archive.NameKey] = value;
|
2023-08-14 13:17:51 -04:00
|
|
|
|
}
|
2020-09-02 12:19:12 -07:00
|
|
|
|
|
2023-04-07 14:34:49 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Archive ID number
|
|
|
|
|
|
/// </summary>
|
2023-08-14 13:17:51 -04:00
|
|
|
|
/// <remarks>TODO: No-Intro database export only</remarks>
|
2023-04-07 14:34:49 -04:00
|
|
|
|
[JsonProperty("number"), XmlElement("number")]
|
2023-08-14 13:17:51 -04:00
|
|
|
|
public string? Number { get; set; }
|
2023-04-07 14:34:49 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-04-07 15:47:24 -04:00
|
|
|
|
/// Clone value
|
2023-04-07 14:34:49 -04:00
|
|
|
|
/// </summary>
|
2023-08-14 13:17:51 -04:00
|
|
|
|
/// <remarks>TODO: No-Intro database export only</remarks>
|
2023-04-07 14:34:49 -04:00
|
|
|
|
[JsonProperty("clone"), XmlElement("clone")]
|
2023-08-14 13:17:51 -04:00
|
|
|
|
public string? CloneValue { get; set; }
|
2023-04-07 14:34:49 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-04-07 15:47:24 -04:00
|
|
|
|
/// Regional parent value
|
2023-04-07 14:34:49 -04:00
|
|
|
|
/// </summary>
|
2023-08-14 13:17:51 -04:00
|
|
|
|
/// <remarks>TODO: No-Intro database export only</remarks>
|
2023-04-07 14:34:49 -04:00
|
|
|
|
[JsonProperty("regparent"), XmlElement("regparent")]
|
2023-08-14 13:17:51 -04:00
|
|
|
|
public string? RegParent { get; set; }
|
2023-04-07 14:34:49 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-04-07 15:47:24 -04:00
|
|
|
|
/// Region value
|
2023-04-07 14:34:49 -04:00
|
|
|
|
/// </summary>
|
2023-08-14 13:17:51 -04:00
|
|
|
|
/// <remarks>TODO: No-Intro database export only</remarks>
|
2023-04-07 14:34:49 -04:00
|
|
|
|
[JsonProperty("region"), XmlElement("region")]
|
2023-08-14 13:17:51 -04:00
|
|
|
|
public string? Region { get; set; }
|
2023-04-07 14:34:49 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-04-07 15:47:24 -04:00
|
|
|
|
/// Languages value
|
2023-04-07 14:34:49 -04:00
|
|
|
|
/// </summary>
|
2023-08-14 13:17:51 -04:00
|
|
|
|
/// <remarks>TODO: No-Intro database export only</remarks>
|
2023-04-07 14:34:49 -04:00
|
|
|
|
[JsonProperty("languages"), XmlElement("languages")]
|
2023-08-14 13:17:51 -04:00
|
|
|
|
public string? Languages { get; set; }
|
2023-04-07 14:34:49 -04:00
|
|
|
|
|
2023-04-07 15:47:24 -04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Development status value
|
|
|
|
|
|
/// </summary>
|
2023-08-14 13:17:51 -04:00
|
|
|
|
/// <remarks>TODO: No-Intro database export only</remarks>
|
2023-04-07 15:47:24 -04:00
|
|
|
|
[JsonProperty("devstatus"), XmlElement("devstatus")]
|
2023-08-14 13:17:51 -04:00
|
|
|
|
public string? DevStatus { get; set; }
|
2023-04-07 15:47:24 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Physical value
|
|
|
|
|
|
/// </summary>
|
2023-08-14 13:17:51 -04:00
|
|
|
|
/// <remarks>TODO: No-Intro database export only</remarks>
|
2023-04-07 15:47:24 -04:00
|
|
|
|
/// <remarks>TODO: Is this numeric or a flag?</remarks>
|
|
|
|
|
|
[JsonProperty("physical"), XmlElement("physical")]
|
2023-08-14 13:17:51 -04:00
|
|
|
|
public string? Physical { get; set; }
|
2023-04-07 15:47:24 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Complete value
|
|
|
|
|
|
/// </summary>
|
2023-08-14 13:17:51 -04:00
|
|
|
|
/// <remarks>TODO: No-Intro database export only</remarks>
|
2023-04-07 15:47:24 -04:00
|
|
|
|
/// <remarks>TODO: Is this numeric or a flag?</remarks>
|
|
|
|
|
|
[JsonProperty("complete"), XmlElement("complete")]
|
2023-08-14 13:17:51 -04:00
|
|
|
|
public string? Complete { get; set; }
|
2023-04-07 15:47:24 -04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Categories value
|
|
|
|
|
|
/// </summary>
|
2023-08-14 13:17:51 -04:00
|
|
|
|
/// <remarks>TODO: No-Intro database export only</remarks>
|
2023-04-07 15:47:24 -04:00
|
|
|
|
[JsonProperty("categories"), XmlElement("categories")]
|
2023-08-14 13:17:51 -04:00
|
|
|
|
public string? Categories { get; set; }
|
|
|
|
|
|
|
2020-09-02 12:19:12 -07:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Accessors
|
|
|
|
|
|
|
2020-12-13 14:01:16 -08:00
|
|
|
|
/// <inheritdoc/>
|
2023-08-14 13:17:51 -04:00
|
|
|
|
public override string? GetName() => Name;
|
2020-09-02 12:19:12 -07:00
|
|
|
|
|
2020-12-13 14:01:16 -08:00
|
|
|
|
/// <inheritdoc/>
|
2023-08-14 13:17:51 -04:00
|
|
|
|
public override void SetName(string? name) => Name = name;
|
2023-04-20 15:57:39 -04:00
|
|
|
|
|
2020-09-02 12:19:12 -07:00
|
|
|
|
#endregion
|
|
|
|
|
|
|
2019-01-08 17:40:12 -08:00
|
|
|
|
#region Constructors
|
2016-09-19 18:04:24 -07:00
|
|
|
|
|
2019-01-08 17:40:12 -08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Create a default, empty Archive object
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public Archive()
|
|
|
|
|
|
{
|
2023-09-04 23:51:37 -04:00
|
|
|
|
_internal = new Models.Metadata.Archive();
|
2023-08-15 01:38:01 -04:00
|
|
|
|
Machine = new Machine();
|
|
|
|
|
|
|
2020-08-20 13:17:14 -07:00
|
|
|
|
Name = string.Empty;
|
|
|
|
|
|
ItemType = ItemType.Archive;
|
2019-01-08 17:40:12 -08:00
|
|
|
|
}
|
2016-09-19 18:04:24 -07:00
|
|
|
|
|
2019-01-08 17:40:12 -08:00
|
|
|
|
#endregion
|
2016-09-19 18:04:24 -07:00
|
|
|
|
|
2019-01-08 17:40:12 -08:00
|
|
|
|
#region Cloning Methods
|
2017-01-09 14:37:41 -08:00
|
|
|
|
|
2022-11-03 12:22:17 -07:00
|
|
|
|
/// <inheritdoc/>
|
2019-01-08 17:40:12 -08:00
|
|
|
|
public override object Clone()
|
|
|
|
|
|
{
|
|
|
|
|
|
return new Archive()
|
|
|
|
|
|
{
|
|
|
|
|
|
ItemType = this.ItemType,
|
|
|
|
|
|
DupeType = this.DupeType,
|
2017-01-09 14:37:41 -08:00
|
|
|
|
|
2023-08-15 01:38:01 -04:00
|
|
|
|
Machine = this.Machine.Clone() as Machine ?? new Machine(),
|
2023-08-14 13:17:51 -04:00
|
|
|
|
Source = this.Source?.Clone() as Source,
|
2020-08-20 13:17:14 -07:00
|
|
|
|
Remove = this.Remove,
|
2020-09-03 13:01:33 -07:00
|
|
|
|
|
2023-09-04 23:51:37 -04:00
|
|
|
|
_internal = this._internal?.Clone() as Models.Metadata.Archive ?? new Models.Metadata.Archive(),
|
2019-01-08 17:40:12 -08:00
|
|
|
|
};
|
|
|
|
|
|
}
|
2017-01-09 14:37:41 -08:00
|
|
|
|
|
2019-01-08 17:40:12 -08:00
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
2016-09-19 18:04:24 -07:00
|
|
|
|
}
|