-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
373 additions
and
108 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ Terradue.OpenSearch.Client.sln.DotSettings.user | |
TestResult\.xml | ||
*auth.txt* | ||
.*.swp | ||
.directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM debian:buster-slim | ||
|
||
# MAINTAINER Emmanuel Mathot <[email protected]> | ||
|
||
ENV MONO_VERSION 6.8.0.123 | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends gnupg dirmngr \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& export GNUPGHOME="$(mktemp -d)" \ | ||
&& gpg --batch --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \ | ||
&& gpg --batch --export --armor 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF > /etc/apt/trusted.gpg.d/mono.gpg.asc \ | ||
&& gpgconf --kill all \ | ||
&& rm -rf "$GNUPGHOME" \ | ||
&& apt-key list | grep Xamarin \ | ||
&& apt-get purge -y --auto-remove gnupg dirmngr | ||
|
||
RUN echo "deb http://download.mono-project.com/repo/debian stable-buster/snapshots/$MONO_VERSION main" > /etc/apt/sources.list.d/mono-official-stable.list \ | ||
&& apt-get update \ | ||
&& apt-get install -y mono-complete \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* | ||
|
||
ARG OPENSEARCH_CLIENT_TGZ | ||
COPY $OPENSEARCH_CLIENT_TGZ /tmp/$OPENSEARCH_CLIENT_TGZ | ||
RUN cd / && tar xvzf /tmp/$OPENSEARCH_CLIENT_TGZ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 0 additions & 47 deletions
47
Terradue.OpenSearch.Model.Base/Terradue.OpenSearch.Model.Base.csproj.TMP
This file was deleted.
Oops, something went wrong.
57 changes: 57 additions & 0 deletions
57
...rch.Model.Base/Terradue/OpenSearch/Model/EarthObservation/CycleNumberMetadataExtractor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
using System; | ||
using System.Xml; | ||
using Terradue.OpenSearch.Result; | ||
using Terradue.ServiceModel.Ogc; | ||
|
||
namespace Terradue.OpenSearch.Model.EarthObservation { | ||
|
||
class CycleNumberMetadataExtractor : IMetadataExtractor { | ||
#region IMetadataExtractor implementation | ||
|
||
public string GetMetadata(IOpenSearchResultItem item, string specifier) { | ||
|
||
ServiceModel.Ogc.Om20.OM_ObservationType eo = null; | ||
var extensions = item.ElementExtensions; | ||
|
||
foreach (var ext in extensions) { | ||
if (ext.OuterName == "EarthObservation") { | ||
XmlReader reader = ext.GetReader(); | ||
|
||
eo = (ServiceModel.Ogc.Om20.OM_ObservationType)OgcHelpers.DeserializeEarthObservation(reader); | ||
} | ||
} | ||
|
||
if (eo != null) { | ||
if (eo is ServiceModel.Ogc.Eop21.EarthObservationType) { | ||
try { | ||
return eo.procedure.Eop21EarthObservationEquipment.acquisitionParameters.AltAcquisition.cycleNumber; | ||
} catch (Exception) { | ||
return null; | ||
} | ||
} | ||
|
||
if (eo is ServiceModel.Ogc.Eop20.EarthObservationType) { | ||
try { | ||
return eo.procedure.Eop20EarthObservationEquipment.acquisitionParameters.AltAcquisition.cycleNumber; | ||
} catch (Exception) { | ||
return null; | ||
} | ||
} | ||
} | ||
|
||
return null; | ||
} | ||
|
||
|
||
public string Description { | ||
get { | ||
return "A number representing the cycle number, if available"; | ||
} | ||
} | ||
|
||
#endregion | ||
} | ||
|
||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
...Base/Terradue/OpenSearch/Model/EarthObservation/InstrumentDescriptionMetadataExtractor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
using System; | ||
using System.Xml; | ||
using Terradue.OpenSearch.Result; | ||
using Terradue.ServiceModel.Ogc; | ||
|
||
namespace Terradue.OpenSearch.Model.EarthObservation { | ||
|
||
class InstrumentDescriptionMetadataExtractor : IMetadataExtractor { | ||
#region IMetadataExtractor implementation | ||
|
||
public string GetMetadata(IOpenSearchResultItem item, string specifier) { | ||
|
||
ServiceModel.Ogc.Om20.OM_ObservationType eo = null; | ||
var extensions = item.ElementExtensions; | ||
|
||
foreach (var ext in extensions) { | ||
if (ext.OuterName == "EarthObservation") { | ||
XmlReader reader = ext.GetReader(); | ||
|
||
eo = (ServiceModel.Ogc.Om20.OM_ObservationType)OgcHelpers.DeserializeEarthObservation(reader); | ||
} | ||
} | ||
|
||
if (eo != null) { | ||
if (eo is ServiceModel.Ogc.Eop21.EarthObservationType) { | ||
try { | ||
return eo.procedure.Eop21EarthObservationEquipment.instrument.Instrument.description; | ||
} catch (Exception) { | ||
return null; | ||
} | ||
} | ||
|
||
if (eo is ServiceModel.Ogc.Eop20.EarthObservationType) { | ||
try { | ||
return eo.procedure.Eop20EarthObservationEquipment.instrument[0].Instrument.description; | ||
} catch (Exception) { | ||
return null; | ||
} | ||
} | ||
} | ||
|
||
return null; | ||
} | ||
|
||
|
||
public string Description { | ||
get { | ||
return "A number representing the instrument description, if available"; | ||
} | ||
} | ||
|
||
#endregion | ||
} | ||
|
||
|
||
} |
23 changes: 23 additions & 0 deletions
23
...l.Base/Terradue/OpenSearch/Model/EarthObservation/InstrumentShortNameMetadataExtractor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using Terradue.OpenSearch.Result; | ||
|
||
namespace Terradue.OpenSearch.Model.EarthObservation { | ||
|
||
class InstrumentShortNameMetadataExtractor : IMetadataExtractor { | ||
#region IMetadataExtractor implementation | ||
|
||
public string GetMetadata(IOpenSearchResultItem item, string specifier) { | ||
|
||
return Terradue.Metadata.EarthObservation.OpenSearch.Extensions.EarthObservationOpenSearchResultExtensions.FindInstrumentShortName(item); | ||
} | ||
|
||
public string Description { | ||
get { | ||
return "A string identifying the instrument."; | ||
} | ||
} | ||
|
||
#endregion | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.