Skip to content

anhlt18vn/thingweb-directory

 
 

Repository files navigation

thingweb-directory

The Thingweb Directory is an open source directory for Thing Descriptions. The Thing Description (TD) model is a proposal of W3C Web of Things working group to describe Things. The directory features an API to create, read, update and delete (CRUD) a TD. The directory can be used to browse and discover Things based on their TDs. This functionality includes but is not limited to following cases:

  • Searching for a Thing based on its metadata, properties, actions or events;
  • Creating a new Thing's TD or updating an existing one;
  • Deleting a Thing's TD;
  • CRUD operations are supported either over HTTP or CoAP;
  • Generating a servient based on a discovered Thing.

Getting Started

The Thingweb Directory requires Java 1.8.

Running the Directory

Download the project and unzip it (see releases). Then, run:

$ bin/thingweb-directory

After this step, the Directory server is running and can be accessed over HTTP or CoAP:

By default, the Directory runs an in-memory RDF store, whose content is deleted after the Directory is shut down. To persist Thing Descriptions, provide an external SPARQL endpoint as argument. Run the command above with arg -help for more details.

Known issues

On Windows, the execution will fail with a Batch error message. If Mingw is installed on your machine, try to run bin/thingweb-directory inside an emulated Bash shell. Alternatively, try java -cp lib\* org.eclipse.thingweb.directory.ThingDirectory.

Interacting with the Directory

The HTTP endpoint provides an HTML client to register and discover Thing Descriptions. This client accesses a REST API to manage Thing Descriptions that complies to the IETF Resource Directory specification. Registration is done by POSTing on /td and discovery can be performed on td-lookup/ep, td-lookup/res and td-lookup/sem (which expects a SPARQL graph pattern as query parameter).

See src/main/resources/api.json for a formal specification of the Thing Directory API. This file is exposed by the server at /api.json. It can e.g. be processed by the Swagger UI to render an online documentation. See the Open API Initiative for more details.

Building from sources

We are using Gradle as a build tool.

The following command will produce a distribution of the Thingweb Directory in the /build/distributions/ folder:

$ cd thingweb-directory
$ gradle build

About

W3C WoT Thing Directory implementation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 93.4%
  • HTML 3.8%
  • Groovy 2.8%