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

View File

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

View File

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

View File

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

View File

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