Enable spotless for schema XSD (#4218)

Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
J-N-K 2024-05-18 19:23:21 +02:00 committed by GitHub
parent 352dbf2aaa
commit 895dcbb087
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 326 additions and 330 deletions

View File

@ -1,124 +1,126 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0"
targetNamespace="https://openhab.org/schemas/addon/v1.0.0">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0"
targetNamespace="https://openhab.org/schemas/addon/v1.0.0">
<xs:import namespace="https://openhab.org/schemas/config-description/v1.0.0"
schemaLocation="https://openhab.org/schemas/config-description-1.0.0.xsd"/>
<xs:import namespace="https://openhab.org/schemas/config-description/v1.0.0"
schemaLocation="https://openhab.org/schemas/config-description-1.0.0.xsd"/>
<xs:element name="addon" type="addon:addonInfo"/>
<xs:element name="addon" type="addon:addonInfo"/>
<xs:complexType name="addonInfo">
<xs:sequence>
<xs:element name="type" type="addon:addonType"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="description" type="xs:string"/>
<xs:element name="connection" type="addon:connectionType" minOccurs="0"/>
<xs:element name="countries" type="addon:countryType" minOccurs="0">
<xs:annotation>
<xs:documentation>Comma-separated list of two-letter ISO country codes.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="service-id" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>The ID (service.pid or component.name) of the main add-on service, which can be configured through OSGi configuration admin service. Should only be used in combination with a config description definition. The default value is &lt;type&gt;.&lt;name&gt;</xs:documentation>
</xs:annotation>
</xs:element>
<xs:choice minOccurs="0">
<xs:element name="config-description" type="config-description:configDescription"/>
<xs:element name="config-description-ref" type="config-description:configDescriptionRef"/>
</xs:choice>
<xs:element name="discovery-methods" type="addon:discoveryMethodsType" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="id" type="config-description:idRestrictionPattern" use="required">
<xs:annotation>
<xs:documentation>The id is used to construct the UID of this add-on to &lt;type&gt;-&lt;name&gt;</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="addonInfo">
<xs:sequence>
<xs:element name="type" type="addon:addonType"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="description" type="xs:string"/>
<xs:element name="connection" type="addon:connectionType" minOccurs="0"/>
<xs:element name="countries" type="addon:countryType" minOccurs="0">
<xs:annotation>
<xs:documentation>Comma-separated list of two-letter ISO country codes.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="service-id" type="xs:string" minOccurs="0">
<xs:annotation>
<xs:documentation>The ID (service.pid or component.name) of the main add-on service, which can be configured
through OSGi configuration admin service. Should only be used in combination with a config description definition.
The default value is &lt;type&gt;.&lt;name&gt;</xs:documentation>
</xs:annotation>
</xs:element>
<xs:choice minOccurs="0">
<xs:element name="config-description" type="config-description:configDescription"/>
<xs:element name="config-description-ref" type="config-description:configDescriptionRef"/>
</xs:choice>
<xs:element name="discovery-methods" type="addon:discoveryMethodsType" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="id" type="config-description:idRestrictionPattern" use="required">
<xs:annotation>
<xs:documentation>The id is used to construct the UID of this add-on to &lt;type&gt;-&lt;name&gt;</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:simpleType name="addonType">
<xs:restriction base="xs:string">
<xs:enumeration value="automation"/>
<xs:enumeration value="binding"/>
<xs:enumeration value="misc"/>
<xs:enumeration value="persistence"/>
<xs:enumeration value="transformation"/>
<xs:enumeration value="ui"/>
<xs:enumeration value="voice"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="addonType">
<xs:restriction base="xs:string">
<xs:enumeration value="automation"/>
<xs:enumeration value="binding"/>
<xs:enumeration value="misc"/>
<xs:enumeration value="persistence"/>
<xs:enumeration value="transformation"/>
<xs:enumeration value="ui"/>
<xs:enumeration value="voice"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="connectionType">
<xs:restriction base="xs:string">
<xs:enumeration value="none">
<xs:annotation>
<xs:documentation>No interaction with external systems at all</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="local">
<xs:annotation>
<xs:documentation>Interaction with external systems, without internet access</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="hybrid">
<xs:annotation>
<xs:documentation>Interaction with external systems, internet access required only for extended functionality (such as discovery)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="cloud">
<xs:annotation>
<xs:documentation>Interaction with external systems, internet access required for normal operation</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="connectionType">
<xs:restriction base="xs:string">
<xs:enumeration value="none">
<xs:annotation>
<xs:documentation>No interaction with external systems at all</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="local">
<xs:annotation>
<xs:documentation>Interaction with external systems, without internet access</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="hybrid">
<xs:annotation>
<xs:documentation>Interaction with external systems, internet access required only for extended functionality (such
as discovery)</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="cloud">
<xs:annotation>
<xs:documentation>Interaction with external systems, internet access required for normal operation</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="countryType">
<xs:restriction base="xs:string">
<xs:pattern value="[a-z]{2}(,[a-z]{2})*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="countryType">
<xs:restriction base="xs:string">
<xs:pattern value="[a-z]{2}(,[a-z]{2})*"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="discoveryMethodsType">
<xs:sequence>
<xs:element type="addon:discoveryMethodType" name="discovery-method" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="discoveryMethodsType">
<xs:sequence>
<xs:element type="addon:discoveryMethodType" name="discovery-method" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="discoveryMethodType">
<xs:sequence>
<xs:element type="xs:string" name="service-type"/>
<xs:element type="addon:ParametersType" name="discovery-parameters" minOccurs="0"/>
<xs:element type="addon:matchPropertiesType" name="match-properties" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="discoveryMethodType">
<xs:sequence>
<xs:element type="xs:string" name="service-type"/>
<xs:element type="addon:ParametersType" name="discovery-parameters" minOccurs="0"/>
<xs:element type="addon:matchPropertiesType" name="match-properties" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ParametersType">
<xs:sequence>
<xs:element type="addon:parameterType" name="discovery-parameter" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ParametersType">
<xs:sequence>
<xs:element type="addon:parameterType" name="discovery-parameter" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="parameterType">
<xs:sequence>
<xs:element type="xs:string" name="name"/>
<xs:element type="xs:string" name="value"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="parameterType">
<xs:sequence>
<xs:element type="xs:string" name="name"/>
<xs:element type="xs:string" name="value"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="matchPropertiesType">
<xs:sequence>
<xs:element type="addon:matchPropertyType" name="match-property" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="matchPropertiesType">
<xs:sequence>
<xs:element type="addon:matchPropertyType" name="match-property" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="matchPropertyType">
<xs:sequence>
<xs:element type="xs:string" name="name"/>
<xs:element type="xs:string" name="regex"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="matchPropertyType">
<xs:sequence>
<xs:element type="xs:string" name="name"/>
<xs:element type="xs:string" name="regex"/>
</xs:sequence>
</xs:complexType>
</xs:schema>

View File

@ -1,23 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xmlns:addon-info-list="https://openhab.org/schemas/addon-info-list/v1.0.0"
targetNamespace="https://openhab.org/schemas/addon-info-list/v1.0.0">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:addon="https://openhab.org/schemas/addon/v1.0.0"
xmlns:addon-info-list="https://openhab.org/schemas/addon-info-list/v1.0.0"
targetNamespace="https://openhab.org/schemas/addon-info-list/v1.0.0">
<xs:import namespace="https://openhab.org/schemas/addon/v1.0.0" schemaLocation="addon-1.0.0.xsd"/>
<xs:import namespace="https://openhab.org/schemas/addon/v1.0.0" schemaLocation="addon-1.0.0.xsd"/>
<xs:element name="addon-info-list">
<xs:complexType>
<xs:sequence>
<xs:element name="addons" type="addon-info-list:addons"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addon-info-list">
<xs:complexType>
<xs:sequence>
<xs:element name="addons" type="addon-info-list:addons"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="addons">
<xs:sequence>
<xs:element name="addon" type="addon:addonInfo" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="addons">
<xs:sequence>
<xs:element name="addon" type="addon:addonInfo" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:schema>

View File

@ -6,79 +6,72 @@
<xs:element name="config-descriptions">
<xs:complexType>
<xs:sequence>
<xs:element name="config-description" type="config-description:configDescription"
minOccurs="1" maxOccurs="unbounded" />
<xs:element name="config-description" type="config-description:configDescription" minOccurs="1"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="config-description" type="config-description:configDescription" />
<xs:element name="config-description" type="config-description:configDescription"/>
<xs:simpleType name="idRestrictionPattern">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Za-z0-9\-_]+" />
<xs:pattern value="[A-Za-z0-9\-_]+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="uriRestrictionPattern">
<xs:restriction base="xs:string">
<xs:pattern value="[A-Za-z0-9\-_]+(:[A-Za-z0-9\-_]+){1,2}" />
<xs:pattern value="[A-Za-z0-9\-_]+(:[A-Za-z0-9\-_]+){1,2}"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="configDescription">
<xs:sequence>
<xs:element name="parameter-group" type="config-description:parameterGroup"
minOccurs="0" maxOccurs="unbounded" />
<xs:element name="parameter" type="config-description:parameter"
minOccurs="0" maxOccurs="unbounded" />
<xs:element name="parameter-group" type="config-description:parameterGroup" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="parameter" type="config-description:parameter" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="uri"
type="config-description:uriRestrictionPattern" use="optional" />
<xs:attribute name="uri" type="config-description:uriRestrictionPattern" use="optional"/>
</xs:complexType>
<xs:complexType name="parameter">
<xs:all>
<xs:element name="context" type="xs:string" minOccurs="0" />
<xs:element name="context" type="xs:string" minOccurs="0"/>
<!-- deprecated element "required" -->
<xs:element name="required" type="xs:boolean" default="false"
minOccurs="0" />
<xs:element name="default" type="xs:string" minOccurs="0" />
<xs:element name="label" type="xs:string" minOccurs="0" />
<xs:element name="description" type="xs:string" minOccurs="0" />
<xs:element name="options" type="config-description:optionsType"
minOccurs="0" />
<xs:element name="limitToOptions" type="xs:boolean"
minOccurs="0" />
<xs:element name="filter" type="config-description:filterType"
minOccurs="0" />
<xs:element name="advanced" type="xs:boolean" minOccurs="0" />
<xs:element name="verify" type="xs:boolean" minOccurs="0" />
<xs:element name="multipleLimit" type="xs:integer" minOccurs="0" />
<xs:element name="unitLabel" type="xs:string" minOccurs="0" />
<xs:element name="required" type="xs:boolean" default="false" minOccurs="0"/>
<xs:element name="default" type="xs:string" minOccurs="0"/>
<xs:element name="label" type="xs:string" minOccurs="0"/>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="options" type="config-description:optionsType" minOccurs="0"/>
<xs:element name="limitToOptions" type="xs:boolean" minOccurs="0"/>
<xs:element name="filter" type="config-description:filterType" minOccurs="0"/>
<xs:element name="advanced" type="xs:boolean" minOccurs="0"/>
<xs:element name="verify" type="xs:boolean" minOccurs="0"/>
<xs:element name="multipleLimit" type="xs:integer" minOccurs="0"/>
<xs:element name="unitLabel" type="xs:string" minOccurs="0"/>
</xs:all>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="type" type="config-description:parameterType"
use="required" />
<xs:attribute name="groupName" type="xs:string" />
<xs:attribute name="min" type="xs:decimal" />
<xs:attribute name="max" type="xs:decimal" />
<xs:attribute name="step" type="xs:decimal" />
<xs:attribute name="pattern" type="xs:string" />
<xs:attribute name="required" type="xs:boolean" />
<xs:attribute name="readOnly" type="xs:boolean" />
<xs:attribute name="multiple" type="xs:boolean" />
<xs:attribute name="unit" type="config-description:unitType" />
<xs:attribute name="name" type="xs:string" use="required"/>
<xs:attribute name="type" type="config-description:parameterType" use="required"/>
<xs:attribute name="groupName" type="xs:string"/>
<xs:attribute name="min" type="xs:decimal"/>
<xs:attribute name="max" type="xs:decimal"/>
<xs:attribute name="step" type="xs:decimal"/>
<xs:attribute name="pattern" type="xs:string"/>
<xs:attribute name="required" type="xs:boolean"/>
<xs:attribute name="readOnly" type="xs:boolean"/>
<xs:attribute name="multiple" type="xs:boolean"/>
<xs:attribute name="unit" type="config-description:unitType"/>
</xs:complexType>
<xs:complexType name="parameterGroup">
<xs:all>
<xs:element name="label" type="xs:string" minOccurs="0" />
<xs:element name="description" type="xs:string" minOccurs="0" />
<xs:element name="context" type="xs:string" minOccurs="0" />
<xs:element name="advanced" type="xs:boolean" minOccurs="0" />
<xs:element name="label" type="xs:string" minOccurs="0"/>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="context" type="xs:string" minOccurs="0"/>
<xs:element name="advanced" type="xs:boolean" minOccurs="0"/>
</xs:all>
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
<xs:complexType name="optionsType">
@ -87,7 +80,7 @@
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="value" type="xs:string" use="required" />
<xs:attribute name="value" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
@ -101,7 +94,7 @@
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
@ -111,63 +104,62 @@
<xs:simpleType name="parameterType">
<xs:restriction base="xs:string">
<xs:enumeration value="text" />
<xs:enumeration value="integer" />
<xs:enumeration value="decimal" />
<xs:enumeration value="boolean" />
<xs:enumeration value="text"/>
<xs:enumeration value="integer"/>
<xs:enumeration value="decimal"/>
<xs:enumeration value="boolean"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="unitType">
<xs:restriction base="xs:string">
<xs:enumeration value="A"/>
<xs:enumeration value="cd"/>
<xs:enumeration value="K"/>
<xs:enumeration value="kg"/>
<xs:enumeration value="m"/>
<xs:enumeration value="mol"/>
<xs:enumeration value="s"/>
<xs:enumeration value="Bq"/>
<xs:enumeration value="C"/>
<xs:enumeration value="F"/>
<xs:enumeration value="Gy"/>
<xs:enumeration value="H"/>
<xs:enumeration value="Hz"/>
<xs:enumeration value="J"/>
<xs:enumeration value="kat"/>
<xs:enumeration value="lm"/>
<xs:enumeration value="lx"/>
<xs:enumeration value="N"/>
<xs:enumeration value="Pa"/>
<xs:enumeration value="rad"/>
<xs:enumeration value="S"/>
<xs:enumeration value="sr"/>
<xs:enumeration value="Sv"/>
<xs:enumeration value="T"/>
<xs:enumeration value="V"/>
<xs:enumeration value="W"/>
<xs:enumeration value="Wb"/>
<xs:enumeration value="Cel"/>
<xs:enumeration value="Ω"/>
<xs:enumeration value="g"/>
<xs:enumeration value="m/s2"/>
<xs:enumeration value="m2v"/>
<xs:enumeration value="m3"/>
<xs:enumeration value="kph"/>
<xs:enumeration value="%"/>
<xs:enumeration value="l"/>
<xs:enumeration value="ms"/>
<xs:enumeration value="min"/>
<xs:enumeration value="h"/>
<xs:enumeration value="d"/>
<xs:enumeration value="week"/>
<xs:enumeration value="y"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="unitType">
<xs:restriction base="xs:string">
<xs:enumeration value="A"/>
<xs:enumeration value="cd"/>
<xs:enumeration value="K"/>
<xs:enumeration value="kg"/>
<xs:enumeration value="m"/>
<xs:enumeration value="mol"/>
<xs:enumeration value="s"/>
<xs:enumeration value="Bq"/>
<xs:enumeration value="C"/>
<xs:enumeration value="F"/>
<xs:enumeration value="Gy"/>
<xs:enumeration value="H"/>
<xs:enumeration value="Hz"/>
<xs:enumeration value="J"/>
<xs:enumeration value="kat"/>
<xs:enumeration value="lm"/>
<xs:enumeration value="lx"/>
<xs:enumeration value="N"/>
<xs:enumeration value="Pa"/>
<xs:enumeration value="rad"/>
<xs:enumeration value="S"/>
<xs:enumeration value="sr"/>
<xs:enumeration value="Sv"/>
<xs:enumeration value="T"/>
<xs:enumeration value="V"/>
<xs:enumeration value="W"/>
<xs:enumeration value="Wb"/>
<xs:enumeration value="Cel"/>
<xs:enumeration value="Ω"/>
<xs:enumeration value="g"/>
<xs:enumeration value="m/s2"/>
<xs:enumeration value="m2v"/>
<xs:enumeration value="m3"/>
<xs:enumeration value="kph"/>
<xs:enumeration value="%"/>
<xs:enumeration value="l"/>
<xs:enumeration value="ms"/>
<xs:enumeration value="min"/>
<xs:enumeration value="h"/>
<xs:enumeration value="d"/>
<xs:enumeration value="week"/>
<xs:enumeration value="y"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="configDescriptionRef">
<xs:attribute name="uri"
type="config-description:uriRestrictionPattern" use="required" />
<xs:attribute name="uri" type="config-description:uriRestrictionPattern" use="required"/>
</xs:complexType>
</xs:schema>

View File

@ -1,119 +1,121 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0"
xmlns:update-description="https://openhab.org/schemas/update-description/v1.0.0"
xmlns:thing-description="https://openhab.org/schemas/thing-description/v1.0.0"
xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0"
targetNamespace="https://openhab.org/schemas/update-description/v1.0.0">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
jaxb:version="2.0" xmlns:update-description="https://openhab.org/schemas/update-description/v1.0.0"
xmlns:thing-description="https://openhab.org/schemas/thing-description/v1.0.0"
xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0"
targetNamespace="https://openhab.org/schemas/update-description/v1.0.0">
<xs:import namespace="https://openhab.org/schemas/config-description/v1.0.0"
schemaLocation="https://openhab.org/schemas/config-description-1.0.0.xsd"/>
<xs:import namespace="https://openhab.org/schemas/thing-description/v1.0.0"
schemaLocation="https://openhab.org/schemas/thing-description-1.0.0.xsd"/>
<xs:import namespace="https://openhab.org/schemas/config-description/v1.0.0"
schemaLocation="https://openhab.org/schemas/config-description-1.0.0.xsd"/>
<xs:import namespace="https://openhab.org/schemas/thing-description/v1.0.0"
schemaLocation="https://openhab.org/schemas/thing-description-1.0.0.xsd"/>
<xs:element name="update-descriptions">
<xs:annotation>
<xs:documentation>The root element of an update description. It contains the update instructions for managed
things after thing-type changes. Instructions are grouped by thing-type and (internal) version.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="thing-type" type="update-description:thingType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="update-descriptions">
<xs:annotation>
<xs:documentation>The root element of an update description. It contains the update instructions for managed
things
after thing-type changes. Instructions are grouped by thing-type and (internal) version.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="thing-type" type="update-description:thingType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="thingType">
<xs:sequence>
<xs:element name="instruction-set" type="update-description:instructionSet" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="uid" type="update-description:thingTypeUid" use="required"/>
</xs:complexType>
<xs:complexType name="thingType">
<xs:sequence>
<xs:element name="instruction-set" type="update-description:instructionSet" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="uid" type="update-description:thingTypeUid" use="required"/>
</xs:complexType>
<xs:complexType name="instructionSet">
<xs:choice maxOccurs="unbounded">
<xs:annotation>
<xs:appinfo>
<jaxb:property name="instructions"/>
</xs:appinfo>
</xs:annotation>
<xs:element name="add-channel" type="update-description:addChannel" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="update-channel" type="update-description:updateChannel" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="remove-channel" type="update-description:removeChannel" minOccurs="0"
maxOccurs="unbounded"/>
</xs:choice>
<xs:attribute name="targetVersion" type="xs:int" use="required"/>
</xs:complexType>
<xs:complexType name="instructionSet">
<xs:choice maxOccurs="unbounded">
<xs:annotation>
<xs:appinfo>
<jaxb:property name="instructions"/>
</xs:appinfo>
</xs:annotation>
<xs:element name="add-channel" type="update-description:addChannel" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="update-channel" type="update-description:updateChannel" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="remove-channel" type="update-description:removeChannel" minOccurs="0"
maxOccurs="unbounded"/>
</xs:choice>
<xs:attribute name="targetVersion" type="xs:int" use="required"/>
</xs:complexType>
<xs:complexType name="addChannel">
<xs:sequence>
<xs:element name="type" type="update-description:channelTypeUid"/>
<xs:element name="label" type="xs:string" minOccurs="0"/>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="tags" type="thing-description:tags" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="id" type="update-description:channelId" use="required"/>
<xs:attribute name="groupIds" type="update-description:groupIds" />
</xs:complexType>
<xs:complexType name="addChannel">
<xs:sequence>
<xs:element name="type" type="update-description:channelTypeUid"/>
<xs:element name="label" type="xs:string" minOccurs="0"/>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="tags" type="thing-description:tags" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="id" type="update-description:channelId" use="required"/>
<xs:attribute name="groupIds" type="update-description:groupIds"/>
</xs:complexType>
<xs:complexType name="updateChannel">
<xs:annotation>
<xs:documentation>Update a channel (e.g. change channel-type, label, description). By default, the old
configuration and tags are copied to the new channel.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="type" type="update-description:channelTypeUid"/>
<xs:element name="label" type="xs:string" minOccurs="0"/>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="tags" type="thing-description:tags" minOccurs="0">
<xs:annotation>
<xs:documentation>If set, already existing tags are overwritten.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="update-description:channelId" use="required"/>
<xs:attribute name="groupIds" type="update-description:groupIds" />
<xs:attribute name="preserveConfiguration" type="xs:boolean" default="true"/>
</xs:complexType>
<xs:complexType name="updateChannel">
<xs:annotation>
<xs:documentation>Update a channel (e.g. change channel-type, label, description). By default, the old
configuration
and tags are copied to the new channel.
</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="type" type="update-description:channelTypeUid"/>
<xs:element name="label" type="xs:string" minOccurs="0"/>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="tags" type="thing-description:tags" minOccurs="0">
<xs:annotation>
<xs:documentation>If set, already existing tags are overwritten.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="update-description:channelId" use="required"/>
<xs:attribute name="groupIds" type="update-description:groupIds"/>
<xs:attribute name="preserveConfiguration" type="xs:boolean" default="true"/>
</xs:complexType>
<xs:complexType name="removeChannel">
<xs:annotation>
<xs:documentation>Remove a channel from a thing.</xs:documentation>
</xs:annotation>
<xs:attribute name="id" type="update-description:channelId" use="required"/>
<xs:attribute name="groupIds" type="update-description:groupIds" />
</xs:complexType>
<xs:complexType name="removeChannel">
<xs:annotation>
<xs:documentation>Remove a channel from a thing.</xs:documentation>
</xs:annotation>
<xs:attribute name="id" type="update-description:channelId" use="required"/>
<xs:attribute name="groupIds" type="update-description:groupIds"/>
</xs:complexType>
<xs:simpleType name="channelId">
<xs:annotation>
<xs:documentation>The simple id of the channel (i.e. without the thing UID).</xs:documentation>
</xs:annotation>
<xs:restriction base="config-description:idRestrictionPattern"/>
</xs:simpleType>
<xs:simpleType name="channelId">
<xs:annotation>
<xs:documentation>The simple id of the channel (i.e. without the thing UID).</xs:documentation>
</xs:annotation>
<xs:restriction base="config-description:idRestrictionPattern"/>
</xs:simpleType>
<xs:simpleType name="groupIds">
<xs:annotation>
<xs:documentation>A comma-separated list of channel-group-ids.</xs:documentation>
</xs:annotation>
<xs:restriction base="thing-description:namespaceIdListRestrictionPattern"/>
</xs:simpleType>
<xs:simpleType name="groupIds">
<xs:annotation>
<xs:documentation>A comma-separated list of channel-group-ids.</xs:documentation>
</xs:annotation>
<xs:restriction base="thing-description:namespaceIdListRestrictionPattern"/>
</xs:simpleType>
<xs:simpleType name="channelTypeUid">
<xs:annotation>
<xs:documentation>The fully qualified UID of the channel type (e.g. "system:color",
"viessmann:lastErrorMessage").
</xs:documentation>
</xs:annotation>
<xs:restriction base="config-description:uriRestrictionPattern"/>
</xs:simpleType>
<xs:simpleType name="channelTypeUid">
<xs:annotation>
<xs:documentation>The fully qualified UID of the channel type (e.g. "system:color",
"viessmann:lastErrorMessage").
</xs:documentation>
</xs:annotation>
<xs:restriction base="config-description:uriRestrictionPattern"/>
</xs:simpleType>
<xs:simpleType name="thingTypeUid">
<xs:annotation>
<xs:documentation>The fully qualified UID of the thing type.</xs:documentation>
</xs:annotation>
<xs:restriction base="config-description:uriRestrictionPattern"/>
</xs:simpleType>
<xs:simpleType name="thingTypeUid">
<xs:annotation>
<xs:documentation>The fully qualified UID of the thing type.</xs:documentation>
</xs:annotation>
<xs:restriction base="config-description:uriRestrictionPattern"/>
</xs:simpleType>
</xs:schema>

View File

@ -562,6 +562,7 @@ Import-Package: \\
<!-- *.xml -->
<includes>
<include>src/**/*.xml</include>
<include>schema/**/*.xsd</include>
</includes>
<excludes>
<exclude>**/feature.xml</exclude>