From 55725e3f579a1c27727f6e1c6c92da975e139124 Mon Sep 17 00:00:00 2001 From: floeschau Date: Thu, 5 Jan 2023 12:09:56 +0100 Subject: [PATCH 1/2] Minor formatting --- .../Model/EarthObservation/CloudCoverMetadataExtractor.cs | 8 ++++---- .../Model/EarthObservation/FrameMetadataExtractor.cs | 4 ++-- .../EarthObservation/OrbitDirectionMetadataExtractor.cs | 8 ++++---- .../EarthObservation/OrbitNumberMetadataExtractor.cs | 4 +++- .../EarthObservation/ParentIdentifierMetadataExtractor.cs | 8 ++++---- .../PlatformShortNameMetadataExtractor.cs | 8 ++++---- .../PolarisationChannelsMetadataExtractor.cs | 4 ++-- .../EarthObservation/ProcessingLevelMetadataExtractor.cs | 4 ++-- .../EarthObservation/ProductTypeMetadataExtractor.cs | 8 ++++---- .../EarthObservation/SensorResolutionMetadataExtractor.cs | 4 ++-- .../Model/EarthObservation/SensorTypeMetadataExtractor.cs | 1 + .../EarthObservation/SwathIdentifierMetadataExtractor.cs | 4 ++-- .../Model/EarthObservation/TrackMetadataExtractor.cs | 4 ++-- .../EarthObservation/VendorSpecificMetadataExtractor.cs | 8 ++++---- .../EarthObservation/WrsLatitudeGridMetadataExtractor.cs | 4 ++-- .../EarthObservation/WrsLongitudeGridMetadataExtractor.cs | 4 ++-- .../OpenSearch/Model/GeoTime/CategoryMetadataExtractor.cs | 6 ++---- .../Model/GeoTime/EnclosureMetadataExtractor.cs | 6 ++---- .../OpenSearch/Model/GeoTime/EndDateMetadataExtractor.cs | 2 ++ .../Model/GeoTime/ExtensionMetadataExtractor.cs | 3 +-- .../Model/GeoTime/IdentifierMetadataExtractor.cs | 6 ++---- .../Model/GeoTime/PublicationDateMetadataExtractor.cs | 6 ++---- .../Model/GeoTime/StartDateMetadataExtractor.cs | 2 ++ .../OpenSearch/Model/GeoTime/TitleMetadataExtractor.cs | 8 ++++---- .../OpenSearch/Model/GeoTime/UpdatedMetadataExtractor.cs | 8 ++++---- .../Model/GeoTime/WellKnownTextMetadataExtractor.cs | 1 + 26 files changed, 66 insertions(+), 67 deletions(-) diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/CloudCoverMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/CloudCoverMetadataExtractor.cs index fb6dfe1e..f5522a0b 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/CloudCoverMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/CloudCoverMetadataExtractor.cs @@ -2,10 +2,10 @@ using Terradue.OpenSearch.Model.GeoTime; using Terradue.OpenSearch.Result; -namespace Terradue.OpenSearch.Model.EarthObservation -{ - class CloudCoverMetadataExtractor : IMetadataExtractor - { +namespace Terradue.OpenSearch.Model.EarthObservation { + + class CloudCoverMetadataExtractor : IMetadataExtractor { + #region IMetadataExtractor implementation public string GetMetadata(IOpenSearchResultItem item, string specifier) { diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/FrameMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/FrameMetadataExtractor.cs index 124469fb..e5e0bfee 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/FrameMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/FrameMetadataExtractor.cs @@ -2,8 +2,8 @@ using Terradue.OpenSearch.Model.GeoTime; using Terradue.OpenSearch.Result; -namespace Terradue.OpenSearch.Model.EarthObservation -{ +namespace Terradue.OpenSearch.Model.EarthObservation { + class FrameMetadataExtractor : IMetadataExtractor { #region IMetadataExtractor implementation diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/OrbitDirectionMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/OrbitDirectionMetadataExtractor.cs index b9505e7c..b133e70f 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/OrbitDirectionMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/OrbitDirectionMetadataExtractor.cs @@ -2,10 +2,10 @@ using Terradue.OpenSearch.Model.GeoTime; using Terradue.OpenSearch.Result; -namespace Terradue.OpenSearch.Model.EarthObservation -{ - class OrbitDirectionMetadataExtractor : IMetadataExtractor - { +namespace Terradue.OpenSearch.Model.EarthObservation { + + class OrbitDirectionMetadataExtractor : IMetadataExtractor { + #region IMetadataExtractor implementation public string GetMetadata(IOpenSearchResultItem item, string specifier) { diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/OrbitNumberMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/OrbitNumberMetadataExtractor.cs index bada5838..f3f58ec2 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/OrbitNumberMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/OrbitNumberMetadataExtractor.cs @@ -3,7 +3,9 @@ using Terradue.OpenSearch.Result; namespace Terradue.OpenSearch.Model.EarthObservation { - class OrbitNumberMetadataExtractor: IMetadataExtractor { + + class OrbitNumberMetadataExtractor : IMetadataExtractor { + #region IMetadataExtractor implementation public string GetMetadata(IOpenSearchResultItem item, string specifier) { diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/ParentIdentifierMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/ParentIdentifierMetadataExtractor.cs index b6d7979a..134ad061 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/ParentIdentifierMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/ParentIdentifierMetadataExtractor.cs @@ -2,10 +2,10 @@ using Terradue.OpenSearch.Model.GeoTime; using Terradue.OpenSearch.Result; -namespace Terradue.OpenSearch.Model.EarthObservation -{ - class ParentIdentifierMetadataExtractor : IMetadataExtractor - { +namespace Terradue.OpenSearch.Model.EarthObservation { + + class ParentIdentifierMetadataExtractor : IMetadataExtractor { + #region IMetadataExtractor implementation public string GetMetadata(IOpenSearchResultItem item, string specifier) { diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/PlatformShortNameMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/PlatformShortNameMetadataExtractor.cs index d80e19c3..f4584a2c 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/PlatformShortNameMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/PlatformShortNameMetadataExtractor.cs @@ -2,10 +2,10 @@ using Terradue.OpenSearch.Model.GeoTime; using Terradue.OpenSearch.Result; -namespace Terradue.OpenSearch.Model.EarthObservation -{ - class PlatformShortNameMetadataExtractor : IMetadataExtractor - { +namespace Terradue.OpenSearch.Model.EarthObservation { + + class PlatformShortNameMetadataExtractor : IMetadataExtractor { + #region IMetadataExtractor implementation public string GetMetadata(IOpenSearchResultItem item, string specifier) { diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/PolarisationChannelsMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/PolarisationChannelsMetadataExtractor.cs index 09c8113a..31e777c4 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/PolarisationChannelsMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/PolarisationChannelsMetadataExtractor.cs @@ -2,8 +2,8 @@ using Terradue.OpenSearch.Model.GeoTime; using Terradue.OpenSearch.Result; -namespace Terradue.OpenSearch.Model.EarthObservation -{ +namespace Terradue.OpenSearch.Model.EarthObservation { + class PolarisationChannelsMetadataExtractor : IMetadataExtractor { #region IMetadataExtractor implementation diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/ProcessingLevelMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/ProcessingLevelMetadataExtractor.cs index ef418b6e..b01ec0d2 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/ProcessingLevelMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/ProcessingLevelMetadataExtractor.cs @@ -2,8 +2,8 @@ using Terradue.OpenSearch.Model.GeoTime; using Terradue.OpenSearch.Result; -namespace Terradue.OpenSearch.Model.EarthObservation -{ +namespace Terradue.OpenSearch.Model.EarthObservation { + class ProcessingLevelMetadataExtractor : IMetadataExtractor { #region IMetadataExtractor implementation diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/ProductTypeMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/ProductTypeMetadataExtractor.cs index 0aadaf9e..52ec6adb 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/ProductTypeMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/ProductTypeMetadataExtractor.cs @@ -2,10 +2,10 @@ using Terradue.OpenSearch.Model.GeoTime; using Terradue.OpenSearch.Result; -namespace Terradue.OpenSearch.Model.EarthObservation -{ - class ProductTypeMetadataExtractor : IMetadataExtractor - { +namespace Terradue.OpenSearch.Model.EarthObservation { + + class ProductTypeMetadataExtractor : IMetadataExtractor { + #region IMetadataExtractor implementation public string GetMetadata(IOpenSearchResultItem item, string specifier) { diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/SensorResolutionMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/SensorResolutionMetadataExtractor.cs index a2442632..29c29601 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/SensorResolutionMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/SensorResolutionMetadataExtractor.cs @@ -2,8 +2,8 @@ using Terradue.OpenSearch.Model.GeoTime; using Terradue.OpenSearch.Result; -namespace Terradue.OpenSearch.Model.EarthObservation -{ +namespace Terradue.OpenSearch.Model.EarthObservation { + class SensorResolutionMetadataExtractor : IMetadataExtractor { #region IMetadataExtractor implementation diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/SensorTypeMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/SensorTypeMetadataExtractor.cs index 52e16888..3350c436 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/SensorTypeMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/SensorTypeMetadataExtractor.cs @@ -9,6 +9,7 @@ namespace Terradue.OpenSearch.Model.EarthObservation { class SensorTypeMetadataExtractor : IMetadataExtractor { + #region IMetadataExtractor implementation public string GetMetadata(IOpenSearchResultItem item, string specifier) { diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/SwathIdentifierMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/SwathIdentifierMetadataExtractor.cs index 7bf8024d..fb4fa5de 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/SwathIdentifierMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/SwathIdentifierMetadataExtractor.cs @@ -2,8 +2,8 @@ using Terradue.OpenSearch.Model.GeoTime; using Terradue.OpenSearch.Result; -namespace Terradue.OpenSearch.Model.EarthObservation -{ +namespace Terradue.OpenSearch.Model.EarthObservation { + class SwathIdentifierMetadataExtractor : IMetadataExtractor { #region IMetadataExtractor implementation diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/TrackMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/TrackMetadataExtractor.cs index 0592d9fa..1d8256eb 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/TrackMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/TrackMetadataExtractor.cs @@ -2,8 +2,8 @@ using Terradue.OpenSearch.Model.GeoTime; using Terradue.OpenSearch.Result; -namespace Terradue.OpenSearch.Model.EarthObservation -{ +namespace Terradue.OpenSearch.Model.EarthObservation { + class TrackMetadataExtractor : IMetadataExtractor { #region IMetadataExtractor implementation diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/VendorSpecificMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/VendorSpecificMetadataExtractor.cs index fea439fa..3dc44f78 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/VendorSpecificMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/VendorSpecificMetadataExtractor.cs @@ -5,10 +5,10 @@ using Terradue.ServiceModel.Ogc; using Terradue.ServiceModel.Ogc.Eop21; -namespace Terradue.OpenSearch.Model.EarthObservation -{ - class VendorSpecificMetadataExtractor : IMetadataExtractor - { +namespace Terradue.OpenSearch.Model.EarthObservation { + + class VendorSpecificMetadataExtractor : IMetadataExtractor { + #region IMetadataExtractor implementation public string GetMetadata(IOpenSearchResultItem item, string specifier) diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/WrsLatitudeGridMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/WrsLatitudeGridMetadataExtractor.cs index cfdf72b0..72a83955 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/WrsLatitudeGridMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/WrsLatitudeGridMetadataExtractor.cs @@ -2,8 +2,8 @@ using Terradue.OpenSearch.Model.GeoTime; using Terradue.OpenSearch.Result; -namespace Terradue.OpenSearch.Model.EarthObservation -{ +namespace Terradue.OpenSearch.Model.EarthObservation { + class WrsLatitudeGridMetadataExtractor : IMetadataExtractor { #region IMetadataExtractor implementation diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/WrsLongitudeGridMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/WrsLongitudeGridMetadataExtractor.cs index ee8bfc73..81f949e5 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/WrsLongitudeGridMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/WrsLongitudeGridMetadataExtractor.cs @@ -2,8 +2,8 @@ using Terradue.OpenSearch.Model.GeoTime; using Terradue.OpenSearch.Result; -namespace Terradue.OpenSearch.Model.EarthObservation -{ +namespace Terradue.OpenSearch.Model.EarthObservation { + class WrsLongitudeGridMetadataExtractor : IMetadataExtractor { #region IMetadataExtractor implementation diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/CategoryMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/CategoryMetadataExtractor.cs index 0e977ac2..6b1dcd01 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/CategoryMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/CategoryMetadataExtractor.cs @@ -7,11 +7,9 @@ using log4net; using Terradue.ServiceModel.Syndication; -namespace Terradue.OpenSearch.Model.GeoTime -{ +namespace Terradue.OpenSearch.Model.GeoTime { - class CategoryMetadataExtractor : IMetadataExtractor - { + class CategoryMetadataExtractor : IMetadataExtractor { private static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/EnclosureMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/EnclosureMetadataExtractor.cs index 28c38204..59ea0bf1 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/EnclosureMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/EnclosureMetadataExtractor.cs @@ -11,11 +11,9 @@ using Terradue.ServiceModel.Syndication; using System.Threading.Tasks; -namespace Terradue.OpenSearch.Model.GeoTime -{ +namespace Terradue.OpenSearch.Model.GeoTime { - class EnclosureMetadataExtractor : IMetadataExtractor - { + class EnclosureMetadataExtractor : IMetadataExtractor { private static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/EndDateMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/EndDateMetadataExtractor.cs index f06a5427..5b14c21b 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/EndDateMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/EndDateMetadataExtractor.cs @@ -7,7 +7,9 @@ namespace Terradue.OpenSearch.Model.GeoTime { public class EndDateMetadataExtractor : IMetadataExtractor { + #region IMetadataExtractor implementation + public virtual string GetMetadata(Terradue.OpenSearch.Result.IOpenSearchResultItem item, string specifier) { string date = null; if (date == null) { diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/ExtensionMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/ExtensionMetadataExtractor.cs index 41a141be..d6721d35 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/ExtensionMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/ExtensionMetadataExtractor.cs @@ -4,8 +4,7 @@ namespace Terradue.OpenSearch.Model.GeoTime { - class ExtensionMetadataExtractor : IMetadataExtractor - { + class ExtensionMetadataExtractor : IMetadataExtractor { private static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/IdentifierMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/IdentifierMetadataExtractor.cs index 3b484af0..1ec4dc8b 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/IdentifierMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/IdentifierMetadataExtractor.cs @@ -3,11 +3,9 @@ using System.Collections.Specialized; using Terradue.ServiceModel.Syndication; -namespace Terradue.OpenSearch.Model.GeoTime -{ +namespace Terradue.OpenSearch.Model.GeoTime { - public class IdentifierMetadataExtractor : IMetadataExtractor - { + public class IdentifierMetadataExtractor : IMetadataExtractor { #region IMetadataExtractor implementation public virtual string GetMetadata(Terradue.OpenSearch.Result.IOpenSearchResultItem item, string specifier) { string ident = null; diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/PublicationDateMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/PublicationDateMetadataExtractor.cs index 277a799c..a8ddbdbb 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/PublicationDateMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/PublicationDateMetadataExtractor.cs @@ -3,11 +3,9 @@ using System.Collections.Specialized; using Terradue.ServiceModel.Syndication; -namespace Terradue.OpenSearch.Model.GeoTime -{ +namespace Terradue.OpenSearch.Model.GeoTime { - public class PublicationDateMetadataExtractor : IMetadataExtractor - { + public class PublicationDateMetadataExtractor : IMetadataExtractor { #region IMetadataExtractor implementation public virtual string GetMetadata(Terradue.OpenSearch.Result.IOpenSearchResultItem item, string specifier) { return item.PublishDate.ToUniversalTime().ToString("O"); diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/StartDateMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/StartDateMetadataExtractor.cs index 58f0662b..750c8e72 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/StartDateMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/StartDateMetadataExtractor.cs @@ -7,7 +7,9 @@ namespace Terradue.OpenSearch.Model.GeoTime { public class StartDateMetadataExtractor : IMetadataExtractor { + #region IMetadataExtractor implementation + public virtual string GetMetadata(Terradue.OpenSearch.Result.IOpenSearchResultItem item, string specifier) { string date = null; if (date == null) { diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/TitleMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/TitleMetadataExtractor.cs index fa8c832d..be49b30d 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/TitleMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/TitleMetadataExtractor.cs @@ -3,12 +3,12 @@ using System.Collections.Specialized; using Terradue.ServiceModel.Syndication; -namespace Terradue.OpenSearch.Model.GeoTime -{ +namespace Terradue.OpenSearch.Model.GeoTime { - public class TitleMetadataExtractor : IMetadataExtractor - { + public class TitleMetadataExtractor : IMetadataExtractor { + #region IMetadataExtractor implementation + public virtual string GetMetadata(Terradue.OpenSearch.Result.IOpenSearchResultItem item, string specifier) { string title = ""; if (item.Title != null) diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/UpdatedMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/UpdatedMetadataExtractor.cs index d3cb816a..9d3ddb82 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/UpdatedMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/UpdatedMetadataExtractor.cs @@ -3,12 +3,12 @@ using System.Collections.Specialized; using Terradue.ServiceModel.Syndication; -namespace Terradue.OpenSearch.Model.GeoTime -{ +namespace Terradue.OpenSearch.Model.GeoTime { - public class UpdatedMetadataExtractor : IMetadataExtractor - { + public class UpdatedMetadataExtractor : IMetadataExtractor { + #region IMetadataExtractor implementation + public virtual string GetMetadata(Terradue.OpenSearch.Result.IOpenSearchResultItem item, string specifier) { return item.LastUpdatedTime.ToUniversalTime().ToString("O"); } diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/WellKnownTextMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/WellKnownTextMetadataExtractor.cs index b23c482b..12d97806 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/WellKnownTextMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/GeoTime/WellKnownTextMetadataExtractor.cs @@ -11,6 +11,7 @@ namespace Terradue.OpenSearch.Model.GeoTime { public class WellKnownTextMetadataExtractor : IMetadataExtractor { + #region IMetadataExtractor implementation public virtual string Description { From 1112a25fa7a50c33e935a0c1309b30ec205bd564 Mon Sep 17 00:00:00 2001 From: floeschau Date: Thu, 5 Jan 2023 12:14:07 +0100 Subject: [PATCH 2/2] Fix for operationalMode NullReferenceException issue (DATAAUTHOR-221) --- .../EarthObservation/OperationalModeMetadataExtractor.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/OperationalModeMetadataExtractor.cs b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/OperationalModeMetadataExtractor.cs index dc9df839..e9d5f0fc 100644 --- a/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/OperationalModeMetadataExtractor.cs +++ b/Terradue.OpenSearch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/OperationalModeMetadataExtractor.cs @@ -3,8 +3,8 @@ using Terradue.OpenSearch.Model.GeoTime; using Terradue.OpenSearch.Result; -namespace Terradue.OpenSearch.Model.EarthObservation -{ +namespace Terradue.OpenSearch.Model.EarthObservation { + class OperationalModeMetadataExtractor : IMetadataExtractor { #region IMetadataExtractor implementation @@ -12,6 +12,8 @@ class OperationalModeMetadataExtractor : IMetadataExtractor { public string GetMetadata(IOpenSearchResultItem item, string specifier) { var mode = Terradue.Metadata.EarthObservation.OpenSearch.Extensions.EarthObservationOpenSearchResultExtensions.FindOperationalMode(item); + if (mode == null) return null; + if ( mode.EndsWith("_SP") || mode.EndsWith("_DP") ){ mode = mode.Replace("_SP", "").Replace("_DP", ""); }