{ "title": "metadatadb.basic", "description": "Simple metatdata database to manage tags associated with devices", "lang": "en", "documentation": "http://recherche.telecom-bretagne.eu/xaal/documentation/", "ref": "http://recherche.telecom-bretagne.eu/xaal/documentation/metadatadb.basic", "license": "Copyright Christophe Lohr Telecom Bretagne 2014 - Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.", "extends": "any.any", "methods": { "getTags": { "description": "Get the list of tags", "parameters": { "tags": { "description": "Tags associated with the device", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/schema#", "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$" }, "uniqueItems": true } } }, "relatedAttributes": [ ] }, "getDevices": { "description": "Get the list of known devices", "parameters": { "devices": { "description": "Addresses of devices associated with the tag", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/schema#", "type": "array", "items": { "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" }, "uniqueItems": true } } }, "relatedAttributes": [ ] }, "getTagsWithDevice": { "description": "Get tags associated with a device", "parameters": { "device": { "description": "Address of the device", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/schema#", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" } }, "tags": { "description": "Tags associated with the device", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/schema#", "type": "array", "items": { "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$" }, "uniqueItems": true } } }, "relatedAttributes": [ ] }, "getDevicesWithTag": { "description": "Get devices associated with a tag", "parameters": { "tag": { "description": "Tag name", "unit": "", "direction": "inout", "type": { "$schema": "http://json-schema.org/schema#", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$" } }, "devices": { "description": "Addresses of devices associated with the tag", "unit": "", "direction": "out", "type": { "$schema": "http://json-schema.org/schema#", "type": "array", "items": { "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" }, "uniqueItems": true } } }, "relatedAttributes": [ ] }, "addTagOnDevice": { "description": "Insert a tag on a device", "parameters": { "tag": { "description": "Tag name", "unit": "", "direction": "inout", "type": { "$schema": "http://json-schema.org/schema#", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$" } }, "device": { "description": "Address of the device", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/schema#", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" } } }, "relatedAttributes": [ ] }, "deleteDevice": { "description": "Delete a device from the database", "parameters": { "device": { "description": "Address of the device to delete", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/schema#", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" } } }, "relatedAttributes": [ ] }, "deleteTag": { "description": "Delete a tag from the database", "parameters": { "tag": { "description": "Name of the tag to delete", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/schema#", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$" } } }, "relatedAttributes": [ ] }, "deleteTagOnDevice": { "description": "Delete a tag associated with a device", "parameters": { "devices": { "description": "Address of the device", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/schema#", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" } }, "tag": { "description": "Name of the tag to delete", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/schema#", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$" } } }, "relatedAttributes": [ ] }, "renameTag": { "description": "Update the name of a tag", "parameters": { "tag": { "description": "Old name of the tag", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/schema#", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$" } }, "newname": { "description": "New name for the tag", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/schema#", "type": "string", "pattern": "^[a-zA-Z][a-zA-Z0-9_.-]*$" } } }, "relatedAttributes": [ ] }, "renameDevice": { "description": "Update the address of a device within the database", "parameters": { "device": { "description": "Old address of the device", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/schema#", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" } }, "newaddress": { "description": "New address for the device", "unit": "", "direction": "in", "type": { "$schema": "http://json-schema.org/schema#", "type": "string", "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$" } } }, "relatedAttributes": [ ] } } }