你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Azure IoT Models Repository client library for Java - version 1.0.0-beta.1
This library provides functionality for interacting with the Azure IoT Models Repository. It also aims to provide a consistent experience working with digital twin model repositories following Azure IoT conventions.
Getting started
The complete Microsoft Azure SDK can be downloaded from the Microsoft Azure downloads page, and it ships with support for building deployment packages, integrating with tooling, rich command line tooling, and more.
For the best development experience, developers should use the official Microsoft Maven packages for libraries. Maven packages will be regularly updated with new functionality and hotfixes.
Include the Package
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-iot-modelsrepository</artifactId>
<version>1.0.0-beta.1</version>
</dependency>
Prerequisites
- A models repository following Azure IoT conventions
- The models repository can be located on the local filesystem or hosted on a webserver.
- Azure IoT hosts the global Azure IoT Models Repository which the client will point to by default if no URI is provided.
Authenticate the Client
Currently no authentication mechanisms are supported in the client. The global endpoint is not tied to an Azure subscription and does not support auth. All models published are meant for anonymous public consumption.
Key concepts
The Azure IoT Models Repository enables builders to manage and share digital twin models. The models are JSON-LD documents defined using the Digital Twins Definition Language (DTDL).
The repository defines a pattern to store DTDL interfaces in a directory structure based on the Digital Twin Model Identifier (DTMI). You can locate an interface in the repository by converting the DTMI to a relative path. For example, the DTMI "dtmi:com:example:Thermostat;1
" translates to /dtmi/com/example/thermostat-1.json
.
Examples
You can familiarize yourself with the client using samples for IoT Models Repository.
Troubleshooting
All events and errors that surface from the service calls will be logged with the ClientLogger.
Next steps
See implementation examples with our code samples.
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com..
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.