blob: 44e6f70a8089791d45726a8628ba73f14c5f7e6a [file] [log] [blame]
Constantin Ziesche857c7ab2020-02-25 11:24:51 +01001/*******************************************************************************
2* Copyright (c) 2020 Robert Bosch GmbH
3* Author: Constantin Ziesche (constantin.ziesche@bosch.com)
4*
5* This program and the accompanying materials are made available under the
6* terms of the Eclipse Public License 2.0 which is available at
7* http://www.eclipse.org/legal/epl-2.0
8*
9* SPDX-License-Identifier: EPL-2.0
10*******************************************************************************/
11using BaSyx.Models.Core.Common;
12using Newtonsoft.Json;
13using System.Xml.Serialization;
14
15namespace BaSyx.Models.Export
16{
17
18 public class EnvironmentReferable_V1_0
19 {
20 [JsonProperty("idShort", Order = -6)]
21 [XmlElement("idShort")]
22 public string IdShort { get; set; }
23
24 [JsonProperty("category", Order = -5)]
25 [XmlElement("category")]
26 public string Category { get; set; }
27
28 [JsonProperty("description", Order = -4)]
29 [XmlArray("description")]
30 [XmlArrayItem("langString")]
31 public LangStringSet Description { get; set; }
32
33 [JsonProperty("parent", Order = -3)]
34 [XmlElement("parent")]
35 public string Parent { get; set; }
Constantin Ziesche02817f12020-08-04 21:40:43 +020036
37 public bool ShouldSerializeDescription()
38 {
39 if (Description == null || Description.Count == 0)
40 return false;
41 else
42 return true;
43 }
Constantin Ziesche857c7ab2020-02-25 11:24:51 +010044 }
45}