{"id":17133564,"url":"https://github.com/nsommer/sensorthingsclient","last_synced_at":"2025-07-25T10:32:58.415Z","repository":{"id":77217199,"uuid":"63886842","full_name":"nsommer/SensorThingsClient","owner":"nsommer","description":"Library implementing a client interface to the SensorThingsAPI. PLEASE USE THE FORK FraunhoferIOSB/SensorThingsClient INSTEAD.","archived":false,"fork":false,"pushed_at":"2016-07-21T17:33:34.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-14T19:42:52.930Z","etag":null,"topics":["iot","rest-api","sensorthingsapi-standard"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nsommer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-21T16:53:21.000Z","updated_at":"2017-04-14T06:55:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"7895696b-4737-4cf6-866f-c2f74d7ddfad","html_url":"https://github.com/nsommer/SensorThingsClient","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsommer%2FSensorThingsClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsommer%2FSensorThingsClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsommer%2FSensorThingsClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsommer%2FSensorThingsClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nsommer","download_url":"https://codeload.github.com/nsommer/SensorThingsClient/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227564805,"owners_count":17787070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iot","rest-api","sensorthingsapi-standard"],"created_at":"2024-10-14T19:42:28.512Z","updated_at":"2024-12-01T13:16:43.919Z","avatar_url":"https://github.com/nsommer.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"SensorThingsClient [![Build Status](https://travis-ci.org/nsommer/SensorThingsClient.svg?branch=master)](https://travis-ci.org/nsommer/SensorThingsClient)\n==================\n\nThis library provides a Java-based client library for the [SensorThingsAPI](https://github.com/opengeospatial/sensorthings) and aims to simplify development of SensorThings enabled client applications.\n\n**Note:** This project is still under development and therefore lacks complete support of the SensorThingsAPI.\n\n## Features\n\n* CRUD operations\n* Queries on entity sets\n* Loading of referenced entities\n\n## Unsupported\n\n* Batch requests\n* *$select*\n* MultiDatastream\n* dataArray\n* MQTT\n\n## API\n\nThe `SensorThingsService` class is central to the library. An instance of it represents a SensorThings service and is identified by an URI.\n\n### CRUD operations\n\nThe source code below demonstrates the CRUD operations for Thing objects. Operations for other entities work similarly.\n\n```java\nURI serviceEndpoint = URI.create(\"http://example.org/v1.0/\");\nSensorThingsService service = new SensorThingsService(serviceEndpoint);\n```\n\n```java\nThing thing = new Thing();\nthing.setDescription(\"I'm a thing!\");\nservice.things().create(thing);\n\nthing = service.things().find(1l);\n\nthing.setDescription(\"Things change...\");\nservice.things().update(thing);\n\nservice.things().delete(thing);\n```\n\n### Entity Sets\n\nEntity Sets are represented by instances of `EntityList\u003c\u003e`. The query parameters specified by the SensorThingsAPI standard can be applied to queries.\n\n```java\nEntityList\u003cThing\u003e things = service.things()\n\t\t\t\t\t\t\t.query()\n\t\t\t\t\t\t\t.count()\n\t\t\t\t\t\t\t.orderBy(\"description\")\n\t\t\t\t\t\t\t.filter(\"\")\n\t\t\t\t\t\t\t.skip(5)\n\t\t\t\t\t\t\t.top(10)\n\t\t\t\t\t\t\t.list();\n\nfor (Thing thing : things) {\n\tSystem.out.println(\"So many things!\");\n}\n```\n\nHowever, `$expand` does not work on queries yet.\n\n### Loading referenced objects\n\nLoading referenced objects in one operation (and therefore in one request) is supported. The *$expand* option of the SensorThingsAPI standard is used internally.\n\n```java\nThing thing = service.things().find(1l,\n\t\t\t\tExpansion.of(EntityType.THING)\n\t\t\t\t.with(ExpandedEntity.from(EntityType.LOCATIONS)));\nEntityList\u003cLocation\u003e locations = thing.getLocations();\n```\n\n## Background\n\nThis library emerged from a practical work for a lecture at [KIT](http://www.kit.edu) in collaboration with the [Fraunhofer IOSB](http://iosb.fraunhofer.de). A [server implementation](https://github.com/FraunhoferIOSB/SensorThingsServer) of the SensorThingsAPI, developed by the Fraunhofer IOSB, is available on GitHub as well.\n\n## Contributing\n\nContributions are welcome!\n\n1. Fork this repository\n2. Commit your changes\n3. Create a pull request\n\n## License\n\nThe code and the documentation of this work is available under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsommer%2Fsensorthingsclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnsommer%2Fsensorthingsclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsommer%2Fsensorthingsclient/lists"}