Microsoft.SmartPlaces.Facilities.IngestionManager.Mapped
0.4.13-preview
Prefix Reserved
See the version list below for details.
dotnet add package Microsoft.SmartPlaces.Facilities.IngestionManager.Mapped --version 0.4.13-preview
NuGet\Install-Package Microsoft.SmartPlaces.Facilities.IngestionManager.Mapped -Version 0.4.13-preview
<PackageReference Include="Microsoft.SmartPlaces.Facilities.IngestionManager.Mapped" Version="0.4.13-preview" />
paket add Microsoft.SmartPlaces.Facilities.IngestionManager.Mapped --version 0.4.13-preview
#r "nuget: Microsoft.SmartPlaces.Facilities.IngestionManager.Mapped, 0.4.13-preview"
// Install Microsoft.SmartPlaces.Facilities.IngestionManager.Mapped as a Cake Addin #addin nuget:?package=Microsoft.SmartPlaces.Facilities.IngestionManager.Mapped&version=0.4.13-preview&prerelease // Install Microsoft.SmartPlaces.Facilities.IngestionManager.Mapped as a Cake Tool #tool nuget:?package=Microsoft.SmartPlaces.Facilities.IngestionManager.Mapped&version=0.4.13-preview&prerelease
IngestionManager.Mapped
This library works in conjunction with and depends on the Microsoft.SmartPlaces.Facilities.IngestionManager
library, that defines interfaces and a generic implementation for ingesting building data graphs into Azure Digital Twins.
Setup
This library provides IInputGraphManager
and IGraphIngestionProcessor
implementations and a subclass of IngestionManagerOptions
that together allow solutions to ingest graphs from the Mapped API.
Those implementations are wired up using the .Net dependency injection framework, as per the common design pattern:
services.AddMappedIngestionManager(options =>
{
// Mapped Specific
options.MappedToken = hostContext.Configuration["MappedToken"];
options.MappedRootUrl = hostContext.Configuration["MappedRootUrl"];
// Ingestion Manager
options.AzureDigitalTwinsEndpoint = hostContext.Configuration["AzureDigitalTwinsEndpoint"];
});
The above sets up singleton implementations such that any code depending on IInputGraphManager
will call MappedGraphManager
, and code depending on IGraphIngestionProcessor
will call MappedGraphIngestionProcessor
.
Note that for ontology mappings to be resolved correctly, you may also want to wire up an ontology mapper instance:
services.AddLogging();
services.AddSingleton<IOntologyMappingLoader>(sp =>
{
var logger = sp.GetRequiredService<ILogger<MappedOntologyMappingLoader>>();
return new MappedOntologyMappingLoader(logger, hostContext.Configuration["ontologyMappingFilename"]);
});
services.AddSingleton<IOntologyMappingManager, OntologyMappingManager>();
Usage
The entry point to using these libraries is the base class IngestionProcessorBase.IngestFromApiAsync()
method; that method in turn calls the MappedGraphIngestionProcessor.ProcessSites()
method, which initiates ingestion of all sites (e.g., campuses/buildings or other suitable starting nodes) from the input graph.
ProcessSites()
calls out to an input graph manager to actually query the source graph for those starting nodes, and iterates over child nodes returned by said graph manager. As wired up above, that input graph manager will be our own MappedGraphManager
, which knows how to talk to the Mapped API.
The MappedGraphManager
is configured (e.g., for access credentials) using the options passed in to the services.AddMappedIngestionManager()
call shown under Setup above.
So, assuming the Dependency Injection setup as given above, ingestion from Mapped to Azure Digital Twins is achieved in a class where the MappedGraphIngestionProcessor
has been injected, as follows:
logger.LogInformation("Starting to ingest topology");
await mappedProcessor.IngestFromApiAsync(cancellationToken);
logger.LogInformation("Topology ingestion completed");
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Azure.DigitalTwins.Core (>= 1.4.0)
- Azure.Identity (>= 1.7.0)
- Azure.Messaging.EventHubs (>= 5.7.3)
- Azure.Storage.Blobs (>= 12.14.0)
- Mapped.Ontologies.Core.Dtdl (>= 1.2.499)
- Microsoft.ApplicationInsights (>= 2.21.0)
- Microsoft.Azure.DigitalTwins.Parser (>= 6.4.0-preview)
- Microsoft.Extensions.DependencyInjection (>= 6.0.1)
- Microsoft.Extensions.Http (>= 6.0.0)
- Microsoft.Extensions.Logging (>= 6.0.0)
- Microsoft.Net.Http.Headers (>= 2.2.8)
- Microsoft.SmartPlaces.Facilities.IngestionManager (>= 0.3.10-preview)
- StackExchange.Redis (>= 2.6.70)
- System.Drawing.Common (>= 5.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.7.2-preview | 59 | 9/5/2024 |
0.7.1-preview | 78 | 9/4/2024 |
0.7.0-preview | 260 | 2/2/2024 |
0.6.14-preview | 117 | 6/26/2023 |
0.6.13-preview | 106 | 6/16/2023 |
0.6.12-preview | 99 | 6/15/2023 |
0.6.3-preview | 220 | 5/4/2023 |
0.5.0-preview | 438 | 2/17/2023 |
0.4.15-preview | 188 | 1/5/2023 |
0.4.14-preview | 105 | 12/8/2022 |
0.4.13-preview | 180 | 12/2/2022 |
0.4.12-preview | 107 | 11/30/2022 |
0.4.11-preview | 114 | 11/29/2022 |
0.4.2-preview | 113 | 11/8/2022 |
0.4.1-preview | 209 | 11/4/2022 |
0.4.0-preview | 141 | 11/3/2022 |
0.3.8-preview | 139 | 11/1/2022 |
0.3.7-preview | 115 | 10/31/2022 |
0.3.6-preview | 166 | 10/27/2022 |
0.3.5-preview | 107 | 10/26/2022 |
0.3.1-preview | 125 | 10/20/2022 |
0.3.0-preview | 157 | 10/17/2022 |
0.2.0-preview | 160 | 10/15/2022 |
0.1.1-preview | 179 | 10/13/2022 |
0.1.0-preview | 152 | 10/13/2022 |