Schema vocabulary

List of MetaWEB schemas which describes semantic meaning of controls and actions.

Examples

document.article
document.book@create
entity.user
device.light@turnOn
device.network.router+vendor.com.mikrotik
device.phone+vendor.com.samsung

Introduction

Purpose of schema vocuabulary is to define common objects and actions so MetaWeb resources can be easily understandable by machines and search engines.

Schema ID is written in format [object]@[action]

Action is applicable in @action meta property. If object is omitted then current resource schema is used.

Objects can be combined with plus (+) sign.

Examples

document@create
entity.user@update
document.article@archive
document.article.news@create
entity.person.customer@trash

Generic actions

Schema ID Description
[object]@create Expresses that new object will be created.
[object]@update Expresses that current object will be updated.
[object]@delete Expresses that current object will be deleted.
[object]@trash Expresses that current object will be deleted but can be restored in future.
[object]@restore Expresses that current object will be restored from archived or trashed state.
[object]@archive Expresses that current object will be archived.

Generic objects

Schema ID Description
resource Generic data resource.
document Generic document (article, movie).
entity Generic entity (person, user, customer).
device Generic device (lightbulb, smoke detector, lock, router).

Documents

Schema ID Description
document.article Article document.
document.article.news News article document.
document.article.scientific Scientific paper document.
document.article Article document.
document.book Book document.

Entities

Schema ID Description
entity.person Person entity.
entity.person.user User entity.
entity.person.customer Customer entity.
entity.animal Animal entity.

Devices (IoT)

Examples

device@turnOn
device.thermostat@turnOff
device.light@turnOn

Actions

Schema ID Description
[object]@turnOn Expresses that device will be turned on.
[object]@turnOff Expresses that device will be turned off.

Objects

Schema ID Description
device Generic device.
device.phone Generic phone device.
device.light Light device, eg. lightbulb.
device.thermostat Thermostat device.
device.lock Lock device.
device.sensor Generic sensor device
device.sensor.camera Camera sensor device.
device.sensor.microphone Microphone device.
device.sensor.speaker Speaker device.
device.sensor.smokeDetector Smoke detector device.
device.network Generic network device.
device.network.router Network router device.
device.network.switch Network switch device.
device.network.port Network device generic port.
device.network.port.ethernet Network device ethernet port.
device.network.port.wireless Network device wireless port.

Examples

vendor.com.google
vendor.com.samsung
vendor.com.apple
vendor.com.mikrotik
vendor.cz.cryonix

Vendors

Vendors can help to specify document or device domain nature.

Vendor schema ID is in format vendor.[url domain].

Examples

MikroTIK Router

/devices/router.meta

application/x.meta.layout+json

{
    "@label": "MikroTIK RB 433",
    "@icon": "./icons/mikrotik.png",
    "@schema": "device.network.router+vendor.com.mikrotik",
    "@model": "./router.json",
    "controls": [
        {
            "uri": "./port1.meta",
            "group": "Ports"
        },
        {
            "uri": "./port2.meta",
            "group": "Ports"
        },
        {
            "uri": "./port3.meta",
            "group": "Ports"
        },
        {
            "uri": "./port4.meta",
            "group": "Ports"
        }
    ],
    "@actions": [
        {
            "url": "./shutDown",
            "label": "Shut down",
            "@schema": "@turnOff"
        }
    ]
}

/devices/router/portX.meta

application/x.meta.layout+json

{
    "@label": "etherX",
    "@icon": "./icons/port.png",
    "@schema": "device.network.port.ethernet",
    "@model": "./portX.json",
    "controls": [
        {
            "uri": "./counter.meta",
            "model": "model:traffic.rx"
        },
        {
            "uri": "./counter.meta",
            "model": "model:traffic.tx"
        },
        {
            "uri": "./ip.meta",
            "model": "model:config.ip_address"
        },
    ],
    "@actions": [
        {
            "url": "./disable",
            "label": "Disable",
            "@schema": "@turnOff"
        },
        {
            "url": "./enable",
            "label": "Enable",
            "@schema": "@turnOn"
        }
    ]
}