diff --git a/ContentApiCore/Controllers/api/ExampleApiController.cs b/ContentApiCore/Controllers/api/ExampleApiController.cs
index 9299776..40fab8a 100644
--- a/ContentApiCore/Controllers/api/ExampleApiController.cs
+++ b/ContentApiCore/Controllers/api/ExampleApiController.cs
@@ -20,6 +20,7 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+using ContentApiModels;
namespace ContentApiCore.Controllers.api
{
diff --git a/ContentApiCore/Controllers/other/JsonLDController.cs b/ContentApiCore/Controllers/other/JsonLDController.cs
index 1c6ffda..2d6bd73 100644
--- a/ContentApiCore/Controllers/other/JsonLDController.cs
+++ b/ContentApiCore/Controllers/other/JsonLDController.cs
@@ -17,6 +17,7 @@
using System.Text.Json;
using System.Threading.Tasks;
using OdhNotifier;
+using ContentApiModels;
namespace ContentApiCore.Controllers.api
{
diff --git a/ContentApiCore/Formatters/JsonLdOutputFormatter.cs b/ContentApiCore/Formatters/JsonLdOutputFormatter.cs
index 47cd191..28dd3b3 100644
--- a/ContentApiCore/Formatters/JsonLdOutputFormatter.cs
+++ b/ContentApiCore/Formatters/JsonLdOutputFormatter.cs
@@ -2,6 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
+using ContentApiModels;
using DataModel;
using Helper.JsonHelpers;
using Microsoft.AspNetCore.Http;
diff --git a/ContentApiCoreTests/IntegrationTests/ExampleApiControllerTests.cs b/ContentApiCoreTests/IntegrationTests/ExampleApiControllerTests.cs
index ad75ad6..650a91c 100644
--- a/ContentApiCoreTests/IntegrationTests/ExampleApiControllerTests.cs
+++ b/ContentApiCoreTests/IntegrationTests/ExampleApiControllerTests.cs
@@ -2,6 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
+using ContentApiModels;
using DataModel;
using Helper;
using Microsoft.AspNetCore.Mvc.Testing;
diff --git a/DataModel/DataModel.csproj b/ContentApiModels/ContentApiModels.csproj
similarity index 70%
rename from DataModel/DataModel.csproj
rename to ContentApiModels/ContentApiModels.csproj
index cd0de85..ede76dd 100644
--- a/DataModel/DataModel.csproj
+++ b/ContentApiModels/ContentApiModels.csproj
@@ -8,10 +8,8 @@
-
-
-
+
diff --git a/DataModel/entities/Example.cs b/ContentApiModels/Example.cs
similarity index 98%
rename from DataModel/entities/Example.cs
rename to ContentApiModels/Example.cs
index eb3b2be..9ceca35 100644
--- a/DataModel/entities/Example.cs
+++ b/ContentApiModels/Example.cs
@@ -2,6 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
+using DataModel;
using DataModel.Annotations;
using Swashbuckle.AspNetCore.Annotations;
using System;
@@ -10,7 +11,8 @@
using System.Text;
using System.Threading.Tasks;
-namespace DataModel
+namespace ContentApiModels
+
{
public class Example : IIdentifiable, IImportDateassigneable, IMappingAware, IHasLanguage, ISource, IActivateable, IMetaData, IPublishedOn, IDetailInfosAware, IGPSInfoAware, IImageGalleryAware, IShortName, IContactInfosAware, ILicenseInfo, IGPSPointsAware
{
diff --git a/DataModel/entities/Common.cs b/DataModel/entities/Common.cs
deleted file mode 100644
index 5609757..0000000
--- a/DataModel/entities/Common.cs
+++ /dev/null
@@ -1,573 +0,0 @@
-// SPDX-FileCopyrightText: NOI Techpark
-//
-// SPDX-License-Identifier: AGPL-3.0-or-later
-
-using Newtonsoft.Json;
-using System;
-using System.Collections.Generic;
-using Swashbuckle.AspNetCore.Annotations;
-using System.Linq;
-using System.ComponentModel.DataAnnotations;
-using Newtonsoft.Json.Converters;
-using DataModel.Annotations;
-using Swashbuckle.AspNetCore.SwaggerGen;
-using System.Diagnostics;
-using System.ComponentModel;
-using System.Net;
-
-namespace DataModel
-{
- #region Interfaces
-
- //Common Interfaces (shared between all Entities)
-
- public interface IIdentifiable
- {
- string Id { get; set; }
- }
-
- public interface IShortName
- {
- string? Shortname { get; set; }
- }
-
- public interface IMetaData
- {
- Metadata _Meta { get; set; }
- }
-
- public interface ILicenseInfo
- {
- LicenseInfo LicenseInfo { get; set; }
- }
-
- public interface ISource
- {
- [SwaggerSchema("Source of the Data")]
- string Source { get; set; }
- }
-
- public interface IImportDateassigneable
- {
- DateTime? FirstImport { get; set; }
- DateTime? LastChange { get; set; }
- }
-
- public interface IMappingAware
- {
- IDictionary> Mapping { get; set; }
- }
-
- public interface IActivateable
- {
- bool Active { get; set; }
- }
-
- public interface ILanguage
- {
- string? Language { get; set; }
- }
-
- public interface IHasLanguage
- {
- ICollection? HasLanguage { get; set; }
- }
-
- public interface IDetailInfosAware
- {
- IDictionary Detail { get; set; }
- }
-
- public interface IDetailInfos
- {
- string? Header { get; set; }
- string? IntroText { get; set; }
- string? BaseText { get; set; }
- string? Title { get; set; }
-
- string? MetaTitle { get; set; }
- string? MetaDesc { get; set; }
-
- string? AdditionalText { get; set; }
- string? GetThereText { get; set; }
- }
-
- public interface IContactInfos
- {
- string? Address { get; set; }
- string? City { get; set; }
- string? ZipCode { get; set; }
- string? CountryCode { get; set; }
- string? CountryName { get; set; }
- string? Surname { get; set; }
- string? Givenname { get; set; }
- string? NamePrefix { get; set; }
- string? Email { get; set; }
- string? Phonenumber { get; set; }
- string? Faxnumber { get; set; }
- string? Url { get; set; }
- string? Vat { get; set; }
- string? Tax { get; set; }
- }
-
- public interface IContactInfosAware
- {
- IDictionary ContactInfos { get; set; }
- }
-
- public interface IImageGallery
- {
- string? ImageName { get; set; }
- string? ImageUrl { get; set; }
- int? Width { get; set; }
- int? Height { get; set; }
- string? ImageSource { get; set; }
-
- IDictionary ImageTitle { get; set; }
- IDictionary ImageDesc { get; set; }
-
- bool? IsInGallery { get; set; }
- int? ListPosition { get; set; }
- DateTime? ValidFrom { get; set; }
- DateTime? ValidTo { get; set; }
- }
-
- public interface IImageGalleryAware
- {
- ICollection? ImageGallery { get; set; }
- }
-
- public interface IVideoItems
- {
- string? Name { get; set; }
- string? Url { get; set; }
- string? VideoSource { get; set; }
- string? VideoType { get; set; }
-
- string? StreamingSource { get; set; }
-
- string VideoTitle { get; set; }
- string VideoDesc { get; set; }
-
- bool? Active { get; set; }
- string? CopyRight { get; set; }
- string? License { get; set; }
- string? LicenseHolder { get; set; }
- }
-
- public interface IVideoItemsAware
- {
- IDictionary>? VideoItems { get; set; }
- }
-
- public interface IGpsInfo
- {
- string? Gpstype { get; set; }
- double Latitude { get; set; }
- double Longitude { get; set; }
- double? Altitude { get; set; }
- string? AltitudeUnitofMeasure { get; set; }
- }
-
- public interface IGPSInfoAware
- {
- ICollection GpsInfo { get; set; }
- }
-
- public interface IGPSPointsAware
- {
- IDictionary GpsPoints { get; }
- }
-
- public interface IGpsTrack
- {
- string? Id { get; set; }
- IDictionary GpxTrackDesc { get; set; }
- string? GpxTrackUrl { get; set; }
- string? Type { get; set; }
-
- string? Format { get; set; }
- }
-
- public interface IGpsPolygon
- {
- double Latitude { get; set; }
- double Longitude { get; set; }
- }
-
- public interface IGpsPolygonAware
- {
- ICollection? GpsPolygon { get; set; }
- }
-
- public interface IOperationSchedules
- {
- IDictionary OperationscheduleName { get; set; }
- //string OperationscheduleName { get; set; }
- DateTime Start { get; set; }
- DateTime Stop { get; set; }
- //bool? ClosedonPublicHolidays { get; set; }
-
- ICollection? OperationScheduleTime { get; set; }
- }
-
- public interface IOperationScheduleTime
- {
- TimeSpan Start { get; set; }
- TimeSpan End { get; set; }
- bool Monday { get; set; }
- bool Tuesday { get; set; }
- bool Wednesday { get; set; }
- bool Thursday { get; set; }
- bool Friday { get; set; }
- bool Saturday { get; set; }
- bool Sunday { get; set; }
- int State { get; set; }
- int Timecode { get; set; }
- }
-
- public interface ITags
- {
- IDictionary> Tags { get; set; }
- }
-
- public interface IPublishedOn
- {
- ICollection? PublishedOn { get; set; }
- }
-
- #endregion
-
- #region CommonInfos
-
- public class Metadata
- {
- public string Id { get; set; }
- [SwaggerEnum(new[] { "accommodation", "accommodationroom", "event", "odhactivitypoi", "measuringpoint", "webcam", "article", "venue", "eventshort", "experiencearea", "region", "metaregion", "tourismassociation", "municipality", "district", "area", "wineaward", "skiarea", "skiregion", "odhtag", "publisher", "tag", "weatherhistory", "weather", "weatherdistrict", "weatherforecast", "weatherrealtime", "snowreport", "odhmetadata", "package", "ltsactivity", "ltspoi", "ltsgastronomy" })]
- public string Type { get; set; }
- public DateTime? LastUpdate { get; set; }
- public string Source { get; set; }
- public bool Reduced { get; set; }
-
- public UpdateInfo? UpdateInfo { get; set; }
- }
-
- public class UpdateInfo
- {
- public string? UpdatedBy { get; set; }
-
- public string? UpdateSource { get; set; }
- }
-
- public class LicenseInfo
- {
- [SwaggerEnum(new[] { "CC0", "CC-BY", "Closed" })]
- public string? License { get; set; }
- public string? LicenseHolder { get; set; }
- public string? Author { get; set; }
- [SwaggerSchema(Description = "readonly field", ReadOnly = true)]
- public bool ClosedData { get; set; }
- }
-
- public class Publisher : IIdentifiable, IImportDateassigneable, ILicenseInfo
- {
- public LicenseInfo? LicenseInfo { get; set; }
-
- public Publisher()
- {
- Name = new Dictionary();
-
- //Mapping = new Dictionary>();
- }
-
- public string? Id { get; set; }
-
- public string Key { get; set; }
-
- public IDictionary Name { get; set; }
-
- public DateTime? FirstImport { get; set; }
- public DateTime? LastChange { get; set; }
-
- public string? Url { get; set; }
-
- //New fields to store Information on Push
- public ICollection? PushConfig { get; set; }
- }
-
- public class PushConfig
- {
- public ICollection? PathParam { get; set; }
-
- public string? BaseUrl { get; set; }
-
- public string? PushApiUrl
- {
- get
- {
- return String.Format("{0}/{1}", this.BaseUrl != null ? this.BaseUrl : "", String.Join("/", this.PathParam));
- }
- }
- }
-
- public class Source : IIdentifiable, IImportDateassigneable, ILicenseInfo
- {
- public LicenseInfo? LicenseInfo { get; set; }
-
- public Source()
- {
- Name = new Dictionary();
- Description = new Dictionary();
- }
-
- public string? Id { get; set; }
-
- public string Key { get; set; }
-
- public IDictionary Name { get; set; }
- public IDictionary Description { get; set; }
-
- public DateTime? FirstImport { get; set; }
- public DateTime? LastChange { get; set; }
-
- public string? Url { get; set; }
-
- [SwaggerSchema("Interfaces that are offered by the source")]
- public ICollection? Interfaces { get; set; }
-
- public ICollection Types { get; set; }
- }
-
- public class Detail : IDetailInfos, ILanguage
- {
- public string? Header { get; set; }
- //public string SiteHeader { get; set; }
- public string? SubHeader { get; set; }
- public string? IntroText { get; set; }
- public string? BaseText { get; set; }
- public string? Title { get; set; }
- //OLT
- //public string Alttext { get; set; }
- public string? AdditionalText { get; set; }
- //NEW
- public string? MetaTitle { get; set; }
- public string? MetaDesc { get; set; }
-
- public string? GetThereText { get; set; }
- public string? Language { get; set; }
-
- public ICollection? Keywords { get; set; }
-
- //New LTS Fields
- public string? ParkingInfo { get; set; }
- public string? PublicTransportationInfo { get; set; }
- public string? AuthorTip { get; set; }
- public string? SafetyInfo { get; set; }
- public string? EquipmentInfo { get; set; }
- }
-
- public class GpsInfo : IGpsInfo
- {
- //[DefaultValue("position")]
- //[JsonProperty(DefaultValueHandling = DefaultValueHandling.Populate)]
- [SwaggerEnum(new[] { "position", "viewpoint", "startingandarrivalpoint", "startingpoint", "arrivalpoint", "carparking", "halfwaypoint", "valleystationpoint", "middlestationpoint", "mountainstationpoint" })]
- public string? Gpstype { get; set; }
- public double Latitude { get; set; }
- public double Longitude { get; set; }
- public double? Altitude { get; set; }
- public string? AltitudeUnitofMeasure { get; set; }
- }
-
- public class GpsTrack : IGpsTrack
- {
- public GpsTrack()
- {
- GpxTrackDesc = new Dictionary();
- }
-
- public string? Id { get; set; }
- public IDictionary GpxTrackDesc { get; set; }
- public string? GpxTrackUrl { get; set; }
- public string? Type { get; set; }
- public string? Format { get; set; }
- }
-
- public class GpsPolygon : IGpsPolygon
- {
- public double Latitude { get; set; }
- public double Longitude { get; set; }
- }
-
- public class ImageGallery : IImageGallery
- {
- public ImageGallery()
- {
- ImageTitle = new Dictionary();
- ImageDesc = new Dictionary();
- ImageAltText = new Dictionary();
- }
-
- public string? ImageName { get; set; }
- public string? ImageUrl { get; set; }
- public int? Width { get; set; }
- public int? Height { get; set; }
- public string? ImageSource { get; set; }
-
- public IDictionary ImageTitle { get; set; }
- public IDictionary ImageDesc { get; set; }
- public IDictionary ImageAltText { get; set; }
-
- public bool? IsInGallery { get; set; }
- public int? ListPosition { get; set; }
- public DateTime? ValidFrom { get; set; }
- public DateTime? ValidTo { get; set; }
-
- //NEU
- public string? CopyRight { get; set; }
- public string? License { get; set; }
- public string? LicenseHolder { get; set; }
- public ICollection? ImageTags { get; set; }
- }
-
- public class VideoItems : IVideoItems
- {
- public string? Name { get; set; }
- public string? Url { get; set; }
- public string? VideoSource { get; set; }
- public string? VideoType { get; set; }
- public string? StreamingSource { get; set; }
- public string VideoTitle { get; set; }
- public string VideoDesc { get; set; }
- public bool? Active { get; set; }
- public string? CopyRight { get; set; }
- public string? License { get; set; }
- public string? LicenseHolder { get; set; }
- public string? Language { get; set; }
- public int? Width { get; set; }
- public int? Height { get; set; }
-
- //NEW
- public string? Definition { get; set; }
- public double? Duration { get; set; }
- public int? Resolution { get; set; }
- public int? Bitrate { get; set; }
- }
-
- public class ContactInfos : IContactInfos, ILanguage
- {
- [SwaggerSchema(Description = "Street Address")]
- public string? Address { get; set; }
-
- [SwaggerSchema(Description = "Region (Province / State / Departement / Canton etc...")]
- public string? Region { get; set; }
-
- [SwaggerSchema(Description = "Regioncode")]
- public string? RegionCode { get; set; }
-
- [SwaggerSchema(Description = "Area (Additional Area Name)")]
- public string? Area { get; set; }
- public string? City { get; set; }
- public string? ZipCode { get; set; }
- public string? CountryCode { get; set; }
- public string? CountryName { get; set; }
- public string? Surname { get; set; }
- public string? Givenname { get; set; }
- public string? NamePrefix { get; set; }
- public string? Email { get; set; }
- public string? Phonenumber { get; set; }
- public string? Faxnumber { get; set; }
- public string? Url { get; set; }
- public string? Language { get; set; }
- public string? CompanyName { get; set; }
- public string? Vat { get; set; }
- public string? Tax { get; set; }
- public string? LogoUrl { get; set; }
- }
-
- [SwaggerSchema("Wiki Article on Wiki Article")]
- public class OperationSchedule : IOperationSchedules
- {
- public OperationSchedule()
- {
- OperationscheduleName = new Dictionary();
- }
- public IDictionary OperationscheduleName { get; set; }
- public DateTime Start { get; set; }
- public DateTime Stop { get; set; }
- ///
- /// Type: 1 - Standard, 2 - Only day + month recurring (year not to consider) 3 - only month recurring (season: year and day not to consider)
- ///
- [SwaggerSchema("1 - Standard, 2 - Only day + month recurring (year not to consider) 3 - only month recurring (season: year and day not to consider), Wiki Article on Wiki Article")]
- public string? Type { get; set; }
-
- public ICollection? OperationScheduleTime { get; set; }
- }
-
- public class OperationScheduleTime : IOperationScheduleTime
- {
- public TimeSpan Start { get; set; }
- public TimeSpan End { get; set; }
- public bool Monday { get; set; }
- public bool Tuesday { get; set; }
- public bool Wednesday { get; set; }
- // Here for compatibility reasons
- [SwaggerDeprecated("Will be removed within 2023-12-31")]
- public bool Thuresday { get { return Thursday; } }
- public bool Thursday { get; set; }
- public bool Friday { get; set; }
- public bool Saturday { get; set; }
- public bool Sunday { get; set; }
- ///
- /// //1 = closed, 2 = open, 0 = undefined
- ///
- [SwaggerSchema("1 = closed, 2 = open, 0 = undefined, Wiki Article on Wiki Article")]
- public int State { get; set; }
-
- ///
- /// 1 = General Opening Time, 2 = time range for warm meals, 3 = time range for pizza, 4 = time range for snack’s
- ///
- [SwaggerSchema("1 = General Opening Time, 2 = time range for warm meals, 3 = time range for pizza, 4 = time range for snack’s, Wiki Article on Wiki Article")]
- public int Timecode { get; set; }
- }
-
- #endregion
-
-
- public class PushResponse
- {
- public string Id { get; set; }
- public string Publisher { get; set; }
- public DateTime Date { get; set; }
- public dynamic Result { get; set; }
-
- public PushObject? PushObject { get; set; }
- }
-
- public class PushObject
- {
- public string Id { get; set; }
-
- //Add the info for the pushed object
- public string Type { get; set; }
- }
-
- public class PushResult
- {
- public int? Messages { get; set; }
- public bool Success { get; set; }
- public string? Response { get; set; }
- public string? Error { get; set; }
-
- public static PushResult MergeMultipleFCMPushNotificationResponses(IEnumerable responses)
- {
- return new PushResult()
- {
- Messages = responses.Sum(x => x.Messages),
- Error = String.Join("|", responses.Select(x => x.Error)),
- Success = responses.Any(x => x.Success == true),
- Response = String.Join("|", responses.Select(x => x.Response))
- };
- }
- }
-
-}
diff --git a/DataModel/entities/CommonLinked.cs b/DataModel/entities/CommonLinked.cs
deleted file mode 100644
index 0587c75..0000000
--- a/DataModel/entities/CommonLinked.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-// SPDX-FileCopyrightText: NOI Techpark
-//
-// SPDX-License-Identifier: AGPL-3.0-or-later
-
-using DataModel.Annotations;
-using Swashbuckle.AspNetCore.Annotations;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.Linq;
-using System.Text;
-
-namespace DataModel
-{
- ///
- /// This class contains the classes used by Open Data Hub PG Instance with linked data
- ///
- #region Linked Sub Classes
-
- public class Tags
- {
- public string Id { get; set; }
-
- public string Source { get; set; }
- public string? Self
- {
- get
- {
- return "Tag/" + this.Id;
- }
- }
- }
-
- #endregion
-
- #region Linked Main Classes
-
- public class PublisherLinked : Publisher, IMetaData
- {
- public Metadata? _Meta { get; set; }
-
- [SwaggerSchema(Description = "generated field", ReadOnly = true)]
- public string? Self
- {
- get
- {
- return this.Id != null ? "Publisher/" + Uri.EscapeDataString(this.Id) : null;
- }
- }
- }
-
- public class SourceLinked : Source, IMetaData
- {
- public Metadata? _Meta { get; set; }
-
- [SwaggerSchema(Description = "generated field", ReadOnly = true)]
- public string? Self
- {
- get
- {
- return this.Id != null ? "Source/" + Uri.EscapeDataString(this.Id) : null;
- }
- }
- }
-
- #endregion
-}
diff --git a/DataModel/generic/Annotations.cs b/DataModel/generic/Annotations.cs
deleted file mode 100644
index 84613d8..0000000
--- a/DataModel/generic/Annotations.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-// SPDX-FileCopyrightText: NOI Techpark
-//
-// SPDX-License-Identifier: AGPL-3.0-or-later
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DataModel.Annotations
-{
- [AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter)]
- public class SwaggerDeprecatedAttribute : Attribute
- {
- public SwaggerDeprecatedAttribute(string? description = null, string? deprecationdate = null, string? removedafter = null)
- {
- Description = description;
-
- if(DateTime.TryParse(deprecationdate, out DateTime deprecationdatetemp))
- DeprecationDate = deprecationdatetemp;
- else
- DeprecationDate = null;
-
- if (DateTime.TryParse(removedafter, out DateTime removedaftertemp))
- RemovedAfter = removedaftertemp;
- else
- RemovedAfter = null;
- }
-
- public string Description { get; }
- public DateTime? DeprecationDate { get; }
- public DateTime? RemovedAfter { get; }
- }
-
- [AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter)]
- public class SwaggerEnumAttribute : Attribute
- {
- public SwaggerEnumAttribute(string[] enumValues)
- {
- EnumValues = enumValues;
- }
-
- public IEnumerable EnumValues { get; }
- }
-
- [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
- public class GetOnlyJsonPropertyAttribute : Attribute
- {
- }
-}
diff --git a/DataModel/generic/ApiResult.cs b/DataModel/generic/ApiResult.cs
deleted file mode 100644
index 5ab6b29..0000000
--- a/DataModel/generic/ApiResult.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-// SPDX-FileCopyrightText: NOI Techpark
-//
-// SPDX-License-Identifier: AGPL-3.0-or-later
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace DataModel
-{
- public class GenericResult
- {
- public string Message { get; set; }
- }
-
- public class GenericResultExtended : GenericResult
- {
- public string? Id { get; set; }
- }
-
- public class UnauthorizedResult
- {
- public string Message { get; set; }
- }
-}
diff --git a/DataModel/generic/FCMModels.cs b/DataModel/generic/FCMModels.cs
deleted file mode 100644
index e74154f..0000000
--- a/DataModel/generic/FCMModels.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// SPDX-FileCopyrightText: NOI Techpark
-//
-// SPDX-License-Identifier: AGPL-3.0-or-later
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DataModel
-{
- public class FCMModels
- {
- public string to { get; set; }
- public FCMNotification notification { get; set; }
- public dynamic data { get; set; }
- }
-
- public class FCMNotification
- {
- public string? title { get; set; }
- public string? body { get; set; }
- //public string? sound { get; set; }
- //public string? link { get; set; }
- //public string? icon { get; set; }
- }
-
- public class FCMessageV2
- {
- public FCMessageBodyV2 message { get; set; }
- }
-
- public class FCMessageBodyV2
- {
- public string topic { get; set; }
- public FCMNotification notification { get; set; }
- public dynamic data { get; set; }
- }
-}
diff --git a/DataModel/generic/GenericResults.cs b/DataModel/generic/GenericResults.cs
deleted file mode 100644
index 2b6a330..0000000
--- a/DataModel/generic/GenericResults.cs
+++ /dev/null
@@ -1,422 +0,0 @@
-// SPDX-FileCopyrightText: NOI Techpark
-//
-// SPDX-License-Identifier: AGPL-3.0-or-later
-
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Threading.Tasks;
-using System.Xml.Linq;
-
-namespace DataModel
-{
- public struct UpdateResult
- {
- public string operation { get; init; }
- public string updatetype { get; init; }
- public string otherinfo { get; init; }
- public string message { get; init; }
- public bool success { get; init; }
- public int? recordsmodified { get; init; }
-
- public int? updated { get; init; }
- public int? created { get; init; }
- public int? deleted { get; init; }
-
- public int? objectcompared { get; init; }
- public int? objectchanged { get; init; }
- public int? objectimagechanged { get; init; }
-
- public dynamic? objectchanges { get; init; }
- public string? objectchangestring { get; init; }
-
- //Push Infos
- public ICollection? pushchannels { get; init; }
-
- public IDictionary? pushed { get; init; }
-
- public int? error { get; init; }
-
- public string id { get; init; }
-
- public string exception { get; init; }
-
- public string stacktrace { get; init; }
-
- public string source { get; init; }
- }
-
- public struct UpdateDetail
- {
- //Crud
- public int? updated { get; init; }
- public int? created { get; init; }
- public int? deleted { get; init; }
-
- //Error
- public int? error { get; init; }
-
- //Comparision
- public int? comparedobjects { get; init; }
- public int? objectchanged { get; init; }
- public int? objectimagechanged { get; init; }
-
- public JToken? changes { get; init; }
-
- //Push Infos
- public ICollection? pushchannels { get; init; }
-
- public IDictionary? pushed { get; set; }
- }
-
-
- //TO CHECK if this could be unified
-
- public struct UpdateResultFailureQueue
- {
- public string operation { get; init; }
- public string updatetype { get; init; }
- public string otherinfo { get; init; }
- public string message { get; init; }
- public bool success { get; init; }
- public int? recordsmodified { get; init; }
-
- //Push Infos
- public ICollection? pushchannels { get; init; }
-
- public IDictionary>? pushed { get; init; }
-
- public int? error { get; init; }
-
- public string id { get; init; }
-
- public string exception { get; init; }
-
- public string stacktrace { get; init; }
-
- public string source { get; init; }
- }
-
-
- public struct UpdateDetailFailureQueue
- {
- //Error
- public int? error { get; init; }
-
- //Push Infos
- public ICollection? pushchannels { get; init; }
-
- public IDictionary>? pushed { get; set; }
- }
-
-
- public struct PGCRUDResult
- {
- public string id { get; init; }
-
- public string? odhtype { get; init; }
- public string operation { get; init; }
- public int? updated { get; init; }
- public int? created { get; init; }
- public int? deleted { get; init; }
-
- public int? error { get; init; }
-
- public string? errorreason { get; init; }
-
- public bool? compareobject { get; init; }
- public int? objectchanged { get; init; }
- public int? objectimagechanged { get; init; }
-
- public ICollection? pushchannels { get; init; }
-
- public JToken? changes { get; init; }
-
- public IDictionary? pushed { get; set; }
- }
-
- public struct JsonGenerationResult
- {
- public string operation { get; init; }
- public string type { get; init; }
- public string message { get; init; }
- public bool success { get; init; }
- public string exception { get; init; }
- }
-
- public class GenericResultsHelper
- {
- public static UpdateDetail MergeUpdateDetail(IEnumerable updatedetails)
- {
- int? updated = 0;
- int? created = 0;
- int? deleted = 0;
- int? error = 0;
- int? objectscompared = 0;
- int? objectchanged = 0;
- int? objectimagechanged = 0;
- List? channelstopush = new List();
-
- JToken? changes = null;
-
- IDictionary pushed = new Dictionary();
-
- foreach (var updatedetail in updatedetails)
- {
- objectscompared = updatedetail.comparedobjects + objectscompared;
-
- created = updatedetail.created + created;
- updated = updatedetail.updated + updated;
- deleted = updatedetail.deleted + deleted;
- error = updatedetail.error + error;
- if(updatedetail.objectchanged != null)
- objectchanged = updatedetail.objectchanged + objectchanged;
- if (updatedetail.objectimagechanged != null)
- objectimagechanged = updatedetail.objectimagechanged + objectimagechanged;
-
- if (updatedetail.changes != null)
- {
- if (changes == null)
- changes = updatedetail.changes;
- else
- changes.Append(updatedetail.changes);
- }
-
-
- if (updatedetail.pushchannels != null)
- {
- foreach (var pushchannel in updatedetail.pushchannels)
- {
- if (!channelstopush.Contains(pushchannel))
- channelstopush.Add(pushchannel);
- }
- }
-
- if (updatedetail.pushed != null)
- {
- foreach (var updatedetailpushed in updatedetail.pushed)
- pushed.TryAdd(updatedetailpushed.Key, updatedetailpushed.Value);
- }
- }
-
- return new UpdateDetail() { created = created, updated = updated, deleted = deleted, error = error, comparedobjects = objectscompared, objectchanged = objectchanged, objectimagechanged = objectimagechanged, pushchannels = channelstopush, pushed = pushed, changes = changes };
- }
-
- public static UpdateResult GetSuccessUpdateResult(string id, string source, string operation, string updatetype, string message, string otherinfo, UpdateDetail detail, bool createlog)
- {
- var result = new UpdateResult()
- {
- id = id,
- source = source,
- operation = operation,
- updatetype = updatetype,
- otherinfo = otherinfo,
- message = message,
- recordsmodified = (detail.created + detail.updated + detail.deleted),
- created = detail.created,
- updated = detail.updated,
- deleted = detail.deleted,
- objectcompared = detail.comparedobjects,
- objectchanged = detail.objectchanged,
- objectimagechanged = detail.objectimagechanged,
- //objectchanges = detail.changes != null ? JsonConvert.DeserializeObject(detail.changes.ToString(Formatting.None)) : null,
- objectchanges = null,
- objectchangestring = detail.changes != null ? detail.changes.ToString(Formatting.None) : null,
- pushchannels = detail.pushchannels,
- pushed = detail.pushed,
- error = detail.error,
- success = true,
- exception = null,
- stacktrace = null
- };
-
- if (createlog)
- Console.WriteLine(JsonConvert.SerializeObject(result));
-
- return result;
- }
-
- public static UpdateResult GetErrorUpdateResult(string id, string source, string operation, string updatetype, string message, string otherinfo, UpdateDetail detail, Exception ex, bool createlog)
- {
- var result = new UpdateResult()
- {
- id = id,
- source = source,
- operation = operation,
- updatetype = updatetype,
- otherinfo = otherinfo,
- message = message,
- recordsmodified = (detail.created + detail.updated + detail.deleted),
- created = detail.created,
- updated = detail.updated,
- deleted = detail.deleted,
- objectcompared = detail.comparedobjects,
- objectchanged = detail.objectchanged,
- objectimagechanged = detail.objectimagechanged,
- objectchanges = null,
- objectchangestring = null,
- pushchannels = detail.pushchannels,
- pushed = detail.pushed,
- error = detail.error,
- success = false,
- exception = ex.Message,
- stacktrace = ex.StackTrace
- };
-
- if (createlog)
- Console.WriteLine(JsonConvert.SerializeObject(result));
-
- return result;
- }
-
-
- public static UpdateResultFailureQueue GetSuccessUpdateResult(string id, string source, string operation, string updatetype, string message, string otherinfo, UpdateDetailFailureQueue detail, bool createlog)
- {
- var result = new UpdateResultFailureQueue()
- {
- id = id,
- source = source,
- operation = operation,
- updatetype = updatetype,
- otherinfo = otherinfo,
- message = message,
- recordsmodified = 0,
- pushchannels = detail.pushchannels,
- pushed = detail.pushed,
- error = detail.error,
- success = true,
- exception = null,
- stacktrace = null
- };
-
- if (createlog)
- Console.WriteLine(JsonConvert.SerializeObject(result));
-
- return result;
- }
-
- public static UpdateResultFailureQueue GetErrorUpdateResult(string id, string source, string operation, string updatetype, string message, string otherinfo, UpdateDetailFailureQueue detail, Exception ex, bool createlog)
- {
- var result = new UpdateResultFailureQueue()
- {
- id = id,
- source = source,
- operation = operation,
- updatetype = updatetype,
- otherinfo = otherinfo,
- message = message,
- recordsmodified = 0,
- pushchannels = detail.pushchannels,
- pushed = detail.pushed,
- error = detail.error,
- success = false,
- exception = ex.Message,
- stacktrace = ex.StackTrace
- };
-
- if (createlog)
- Console.WriteLine(JsonConvert.SerializeObject(result));
-
- return result;
- }
-
-
- public static JsonGenerationResult GetSuccessJsonGenerateResult(string operation, string type, string message, bool createlog)
- {
- var result = new JsonGenerationResult()
- {
- operation = operation,
- type = type,
- message = message,
- success = true,
- exception = null
- };
-
- if (createlog)
- Console.WriteLine(JsonConvert.SerializeObject(result));
-
- return result;
- }
-
- public static JsonGenerationResult GetErrorJsonGenerateResult(string operation, string type, string message, Exception ex, bool createlog)
- {
- var result = new JsonGenerationResult()
- {
- operation = operation,
- type = type,
- message = message,
- success = true,
- exception = ex.Message
- };
-
- if (createlog)
- Console.WriteLine(JsonConvert.SerializeObject(result));
-
- return result;
- }
-
- }
-
- #region Pushnotifications
-
- public class NotifyLog
- {
- public string message { get; set; }
- public string id { get; set; }
- public string origin { get; set; }
- public string destination { get; set; }
- public bool? imageupdate { get; set; }
- public bool? roomsupdate { get; set; }
- public string updatemode { get; set; }
-
- public string? response { get; set; }
-
- public string? exception { get; set; }
-
- public bool? success { get; set; }
- }
-
- public class NotifierFailureQueue
- {
- public string Id { get; set; }
- public bool? HasImageChanged { get; set; }
- public bool? Roomschanged { get; set; }
- public bool? IsDeleteOperation { get; set; }
- public string ItemId { get; set; }
- public string Type { get; set; }
- public string NotifyType { get; set; }
- public string Exception { get; set; }
- public string Status { get; set; }
- public string PushUrl { get; set; }
- public string Service { get; set; }
- public DateTime LastChange { get; set; }
- public Nullable RetryCount { get; set; }
- }
-
- public class NotifierResponse
- {
- public object? Response { get; set; }
- public HttpStatusCode HttpStatusCode { get; set; }
- public string Service { get; set; }
- public bool Success { get; set; }
- }
-
- public class IdmMarketPlacePushResponse
- {
- public string notificationId { get; set; }
- }
-
- public class EqualityResult
- {
- public bool isequal { get; set; }
- //public IList? operations {get;set;}
- public JToken? patch { get; set; }
- }
-
- #endregion
-}
diff --git a/DataModel/generic/GeoModels.cs b/DataModel/generic/GeoModels.cs
deleted file mode 100644
index 4ab722b..0000000
--- a/DataModel/generic/GeoModels.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-// SPDX-FileCopyrightText: NOI Techpark
-//
-// SPDX-License-Identifier: AGPL-3.0-or-later
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DataModel
-{
- public class GeoShapes
- {
- public int id { get; set; }
- public string country { get; set; }
- public int? code_rip { get; set; }
- public int? code_reg { get; set; }
- public int? code_prov { get; set; }
- public int? code_cm { get; set; }
- public int? code_uts { get; set; }
- public string? istatnumber { get; set; }
- public string? abbrev { get; set; }
- public string? type_uts { get; set; }
- public string? name { get; set; }
- public string? name_alternative { get; set; }
-
- public float shape_leng { get; set; }
- public float shape_area { get; set; }
-
- public string geom { get; set; }
- }
-}
diff --git a/DataModel/generic/JsonBData.cs b/DataModel/generic/JsonBData.cs
deleted file mode 100644
index 82a382c..0000000
--- a/DataModel/generic/JsonBData.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-// SPDX-FileCopyrightText: NOI Techpark
-//
-// SPDX-License-Identifier: AGPL-3.0-or-later
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace DataModel
-{
- public class JsonBData
- {
- public string? id { get; set; }
- public JsonRaw? data { get; set; }
- }
-
- public class JsonBDataDestinationData
- {
- public string? id { get; set; }
- public JsonRaw? data { get; set; }
- public JsonRaw? destinationdata { get; set; }
- }
-
- public class JsonBDataRaw
- {
- public string id { get; set; }
- public JsonRaw data { get; set; }
- public Int32 rawdataid { get; set; }
- }
-
- public interface IRawDataStore
- {
- string type { get; set; }
- string datasource { get; set; }
- string sourceinterface { get; set; }
- string sourceid { get; set; }
- string sourceurl { get; set; }
- DateTime importdate { get; set; }
- string license { get; set; }
- string rawformat { get; set; }
- }
-
- public class RawDataStore : IRawDataStore
- {
- public string type { get; set; }
- public string datasource { get; set; }
- public string sourceinterface { get; set; }
- public string sourceid { get; set; }
- public string sourceurl { get; set; }
- public DateTime importdate { get; set; }
-
- public string license { get; set; }
- public string rawformat { get; set; }
-
- public string raw { get; set; }
- }
-
- public class RawDataStoreWithId : RawDataStore
- {
- public int? id { get; set; }
- }
-
- public class RawDataStoreJson : RawDataStoreWithId
- {
- public RawDataStoreJson(RawDataStoreWithId rawdatastore)
- {
- this.id = rawdatastore.id;
- this.importdate = rawdatastore.importdate;
- this.datasource = rawdatastore.datasource;
- this.rawformat = rawdatastore.rawformat;
- this.sourceid = rawdatastore.sourceid;
- this.sourceinterface = rawdatastore.sourceinterface;
- this.sourceurl = rawdatastore.sourceurl;
- this.type = rawdatastore.type;
- this.license = rawdatastore.license;
-
- this.raw = new JsonRaw(rawdatastore.raw);
- }
-
- public new JsonRaw raw { get; set; }
- }
-
- public static class RawDataStoreExtensions
- {
- public static IRawDataStore UseJsonRaw(this RawDataStoreWithId rawdatastore)
- {
- if(rawdatastore.rawformat == "json")
- {
- return new RawDataStoreJson(rawdatastore);
- }
- else
- return rawdatastore;
- }
- }
-}
-
diff --git a/DataModel/generic/JsonRaw.cs b/DataModel/generic/JsonRaw.cs
deleted file mode 100644
index fe0ee06..0000000
--- a/DataModel/generic/JsonRaw.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-// SPDX-FileCopyrightText: NOI Techpark
-//
-// SPDX-License-Identifier: AGPL-3.0-or-later
-
-using Newtonsoft.Json;
-using Npgsql;
-using NpgsqlTypes;
-using System;
-using System.Collections.Generic;
-using System.Data;
-using System.Diagnostics;
-using System.Linq;
-using System.Text;
-using static Dapper.SqlMapper;
-
-namespace DataModel
-{
- public class JsonRawConverter : JsonConverter
- {
- public override void WriteJson(JsonWriter writer, JsonRaw? value, JsonSerializer serializer)
- {
- if (value != null)
- writer.WriteRawValue(value.Value);
- }
-
- public override JsonRaw ReadJson(JsonReader reader, Type objectType, JsonRaw? existingValue, bool hasExistingValue, JsonSerializer serializer)
- {
- string json = reader.ReadAsString();
- return new JsonRaw(json);
- }
- }
-
- [JsonConverter(typeof(JsonRawConverter))]
- public class JsonRaw : ICustomQueryParameter
- {
- public JsonRaw(string data)
- {
- Value = data;
- }
-
- public JsonRaw(object data)
- {
- Value = JsonConvert.SerializeObject(data);
- }
-
- public string Value { get; }
-
- public void AddParameter(IDbCommand command, string name)
- {
- var parameter = new NpgsqlParameter(name, NpgsqlDbType.Json);
- parameter.Value = Value;
- command.Parameters.Add(parameter);
- }
-
- public override string? ToString()
- {
- throw new InvalidOperationException("ToString on JsonRaw shouldn't be called, there is somewhere an implicit ToString() happening (maybe from a manual JSON serialization).");
- }
-
- public static explicit operator JsonRaw(string x) => new JsonRaw(x);
- }
-
- public class JsonRawUtils
- {
- public static IEnumerable ConvertObjectToJsonRaw(IEnumerable obj)
- {
- return obj.Select(x => new JsonRaw(x)).ToList();
- }
- }
-}
diff --git a/DataModel/generic/JsonResult.cs b/DataModel/generic/JsonResult.cs
deleted file mode 100644
index 1cdbe0c..0000000
--- a/DataModel/generic/JsonResult.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-// SPDX-FileCopyrightText: NOI Techpark
-//
-// SPDX-License-Identifier: AGPL-3.0-or-later
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Text.Json.Serialization;
-
-namespace DataModel
-{
- ///
- /// Marker interface
- ///
- public interface IResponse
- {
- public IEnumerable Items { get; }
- }
-
- public class JsonResult : IResponse
- {
- public uint TotalResults { get; set; }
- public uint TotalPages { get; set; }
- public uint CurrentPage { get; set; }
- public string? PreviousPage { get; set; }
- public string? NextPage { get; set; }
- public string? Seed { get; set; }
- public IEnumerable Items { get; set; } = Enumerable.Empty();
- }
-
- public class JsonResultWithOnlineResults : JsonResult
- {
- public int OnlineResults { get; set; }
- }
-
- public class JsonResultWithOnlineResultsAndResultId : JsonResultWithOnlineResults
- {
- public string? ResultId { get; set; }
- }
-
- public class JsonResultWithBookingInfo : JsonResultWithOnlineResultsAndResultId
- {
- public int AvailableOnline { get; set; }
- public int AvailableOnRequest { get; set; }
- public int AccommodationsRequested { get; set; }
- }
-
- public class JsonResultWithOnlineResultsAndResultIdLowercase : IResponse
- {
- public uint totalResults { get; set; }
- public uint totalPages { get; set; }
- public uint currentPage { get; set; }
- public string? previousPage { get; set; }
- public string? nextPage { get; set; }
- public string? seed { get; set; }
- public int onlineResults { get; set; }
- public string? resultId { get; set; }
- public IEnumerable items { get; set; } = Enumerable.Empty();
- [JsonIgnore]
- public IEnumerable Items => items;
- }
-
- public class SearchResult : IResponse
- {
- public uint totalResults { get; set; }
- public string? searchTerm { get; set; }
- public Dictionary detailedResults { get; set; } = new Dictionary();
- public IEnumerable Items { get; set; } = Enumerable.Empty();
- }
-
- #region Resultset
-
- //Generic Result für Paging
- public class Result
- {
- public int TotalResults { get; set; }
- public int TotalPages { get; set; }
- public int CurrentPage { get; set; }
- public Nullable OnlineResults { get; set; }
- public string? ResultId { get; set; }
- public string? Seed { get; set; }
-
- public ICollection? Items { get; set; }
- }
-
- public class ResultAsync
- {
- public int TotalResults { get; set; }
- public int TotalPages { get; set; }
- public int CurrentPage { get; set; }
- public Nullable OnlineResults { get; set; }
-
- public string? Seed { get; set; }
-
- public IList? Items { get; set; }
- }
-
- #endregion
-}
diff --git a/DataModel/generic/PushServerModels.cs b/DataModel/generic/PushServerModels.cs
deleted file mode 100644
index f1804c5..0000000
--- a/DataModel/generic/PushServerModels.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-// SPDX-FileCopyrightText: NOI Techpark
-//
-// SPDX-License-Identifier: AGPL-3.0-or-later
-
-using System.Collections.Generic;
-
-namespace DataModel
-{
- public class PushServerMessage
- {
- public PushServerMessage()
- {
-
- }
-
- public string? title { get; set; }
- public string? text { get; set; }
- public string? image { get; set; }
- public string video { get; set; }
- public PushServerDestination destination { get; set; }
- }
-
- public class PushServerDestination
- {
- public string group { get; set; }
- public string language { get; set; }
- }
-
- public class PushServerCustomMessage
- {
- public PushServerCustomMessage()
- {
- destination = new Dictionary>();
- }
-
- public string title { get; set; }
- public string text { get; set; }
-
- public PushServerCustom custom { get; set; }
- //public Dictionary image { get; set; }
- //public Dictionary video { get; set; }
- public Dictionary> destination { get; set; }
- }
-
- public class PushServerCustom
- {
- public string group { get; set; }
- public string listId { get; set; }
- public string listName { get; set; }
- public string listOwner { get; set; }
- }
-}
\ No newline at end of file
diff --git a/DataModel/helper/GpsConverter.cs b/DataModel/helper/GpsConverter.cs
deleted file mode 100644
index 446445d..0000000
--- a/DataModel/helper/GpsConverter.cs
+++ /dev/null
@@ -1,95 +0,0 @@
-// SPDX-FileCopyrightText: NOI Techpark
-//
-// SPDX-License-Identifier: AGPL-3.0-or-later
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace DataModel
-{
- public static class GpsConverter
- {
- public static IDictionary ToGpsPointsDictionary(this ICollection? gpsinfos, bool ltsactivitypoi = false)
- {
- //ODHActivityPoi should already pass
- if (!ltsactivitypoi)
- {
- if (gpsinfos != null && gpsinfos.Count > 0)
- {
- //If GPSInfo has GpsType = null or Empty --->
- if (gpsinfos.Any(x => String.IsNullOrEmpty(x.Gpstype)))
- {
- foreach (var gpsinfo in gpsinfos.Where(x => String.IsNullOrEmpty(x.Gpstype)))
- {
- gpsinfo.Gpstype = "position";
- }
- }
-
- //If GPSInfo has more GpsType = position ---> Grouped count is inferior to totalcount GpsPoints returns only first element.....
- if (gpsinfos.GroupBy(x => x.Gpstype).Count() < gpsinfos.Count)
- {
-
- return gpsinfos
- .DistinctBy(x => x.Gpstype)
- .Where(x => x.Gpstype != null)
- .ToDictionary(x => x.Gpstype!, x => x);
- }
- else
- {
- return gpsinfos
- .DistinctBy(x => x.Gpstype)
- .Where(x => x.Gpstype != null)
- .ToDictionary(x => x.Gpstype!, x => x);
- }
- }
- else
- return new Dictionary();
- }
- //For LTS POI & LTS Activity
- else
- {
- var gpspoints = new Dictionary();
- var positioncount = 0;
-
- if (gpsinfos != null)
- {
- foreach (var gpsinfo in gpsinfos)
- {
- string postionstr = "position";
-
- if (positioncount > 0)
- postionstr = postionstr + positioncount;
-
- if (gpsinfo.Gpstype == "Endpunkt" || gpsinfo.Gpstype == "Bergstation")
- gpspoints.Add("endposition", gpsinfo);
-
- if (gpsinfo.Gpstype == "position" || gpsinfo.Gpstype == "Standpunkt" || gpsinfo.Gpstype == "Startpunkt" || gpsinfo.Gpstype == "Start und Ziel" || gpsinfo.Gpstype == "Talstation")
- gpspoints.Add(postionstr, gpsinfo);
-
- positioncount = gpspoints.Where(x => x.Key.StartsWith("position")).Count();
- }
- }
-
- return gpspoints;
- }
- }
-
- public static ICollection ConvertGpsInfoOnRootToGpsInfoArray(this IGpsInfo gpsinfo)
- {
- if (gpsinfo.Latitude != 0 && gpsinfo.Longitude != 0)
- {
- return new List
- {
- new GpsInfo(){ Gpstype = "position", Altitude = gpsinfo.Altitude, AltitudeUnitofMeasure = gpsinfo.AltitudeUnitofMeasure, Latitude = gpsinfo.Latitude, Longitude = gpsinfo.Longitude }
- };
- }
- else
- {
- return null;
- }
- }
- }
-}
diff --git a/Helper/Generic/HasLanguageHelper.cs b/Helper/Generic/HasLanguageHelper.cs
index 416723a..fefdeb4 100644
--- a/Helper/Generic/HasLanguageHelper.cs
+++ b/Helper/Generic/HasLanguageHelper.cs
@@ -2,6 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
+using ContentApiModels;
using DataModel;
using System;
using System.Collections;
diff --git a/Helper/Generic/IdGenerator.cs b/Helper/Generic/IdGenerator.cs
index a2aa373..5171404 100644
--- a/Helper/Generic/IdGenerator.cs
+++ b/Helper/Generic/IdGenerator.cs
@@ -7,6 +7,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using ContentApiModels;
using DataModel;
namespace Helper
diff --git a/Helper/Generic/LicenseHelper.cs b/Helper/Generic/LicenseHelper.cs
index 566b617..658ae09 100644
--- a/Helper/Generic/LicenseHelper.cs
+++ b/Helper/Generic/LicenseHelper.cs
@@ -2,6 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
+using ContentApiModels;
using DataModel;
using System;
using System.Collections.Generic;
diff --git a/Helper/Generic/MetaInfoHelper.cs b/Helper/Generic/MetaInfoHelper.cs
index b4745a7..7752c7c 100644
--- a/Helper/Generic/MetaInfoHelper.cs
+++ b/Helper/Generic/MetaInfoHelper.cs
@@ -2,6 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
+using ContentApiModels;
using DataModel;
using Microsoft.AspNetCore.Identity;
using System;
diff --git a/Helper/Generic/ODHTypeHelper.cs b/Helper/Generic/ODHTypeHelper.cs
index 031ca0f..2014118 100644
--- a/Helper/Generic/ODHTypeHelper.cs
+++ b/Helper/Generic/ODHTypeHelper.cs
@@ -2,6 +2,7 @@
//
// SPDX-License-Identifier: AGPL-3.0-or-later
+using ContentApiModels;
using DataModel;
using Newtonsoft.Json;
using System;
diff --git a/Helper/Helper.csproj b/Helper/Helper.csproj
index d8c5bfb..00e478d 100644
--- a/Helper/Helper.csproj
+++ b/Helper/Helper.csproj
@@ -24,7 +24,7 @@
-
+
diff --git a/JsonLDTransformer/JsonLDTransformer.csproj b/JsonLDTransformer/JsonLDTransformer.csproj
index f0e8260..e768459 100644
--- a/JsonLDTransformer/JsonLDTransformer.csproj
+++ b/JsonLDTransformer/JsonLDTransformer.csproj
@@ -5,12 +5,13 @@
+
-
+
diff --git a/JsonLDTransformer/TransformToSchemaNet.cs b/JsonLDTransformer/TransformToSchemaNet.cs
index d671e29..086ba5a 100644
--- a/JsonLDTransformer/TransformToSchemaNet.cs
+++ b/JsonLDTransformer/TransformToSchemaNet.cs
@@ -13,6 +13,7 @@
using HtmlAgilityPack;
using DataModel;
using Newtonsoft.Json;
+using ContentApiModels;
namespace JsonLDTransformer
{
@@ -25,7 +26,7 @@ public static List