Skip to content
Snippets Groups Projects
Commit f4a2e2bb authored by Peter Niblett's avatar Peter Niblett
Browse files

enumeration tidyup

parent a496fc43
No related branches found
No related tags found
No related merge requests found
......@@ -23,9 +23,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
-->
<xs:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.onem2m.org/xml/protocols"
xmlns:m2m="http://www.onem2m.org/xml/protocols"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified" >
xmlns:m2m="http://www.onem2m.org/xml/protocols" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified">
<xs:include schemaLocation="CDT-enumerationTypes-v0_8_0.xsd" />
......@@ -33,13 +31,10 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
<xs:restriction base="xs:dateTime" />
</xs:simpleType>
<!-- TODO: it's not clear that we need both this an eventCatType -->
<xs:complexType name="eventCat">
<xs:sequence>
<xs:element name="eventCatType" type="m2m:eventCatType" />
<xs:element name="eventCatNo" type="xs:nonNegativeInteger" />
</xs:sequence>
</xs:complexType>
<!-- TODO: temp fix -->
<xs:simpleType name="eventCat">
<xs:union memberTypes="m2m:stdEventCats "/>
</xs:simpleType>
<xs:simpleType name="extendedCrontab">
<xs:restriction base="xs:string">
......@@ -66,7 +61,8 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
<!-- TODO: should this allow lower case hex ? -->
<xs:simpleType name="deviceID">
<xs:restriction base="xs:token">
<xs:pattern value="urn:((dev:ops:[\dABCDEF]{6}-[\w_%]+-[\w_%]+)|(dev:os:[\dABCDEF]{6}-[\w_%]+)|(imei:\d{15})|(esn:[\dABCDEF]{8})|(meid:[\dABCDEF]{14}))"></xs:pattern>
<xs:pattern
value="urn:((dev:ops:[\dABCDEF]{6}-[\w_%]+-[\w_%]+)|(dev:os:[\dABCDEF]{6}-[\w_%]+)|(imei:\d{15})|(esn:[\dABCDEF]{8})|(meid:[\dABCDEF]{14}))"></xs:pattern>
</xs:restriction>
</xs:simpleType>
......@@ -325,8 +321,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
<xs:complexType name="primitiveContent">
<xs:sequence>
<xs:any namespace="http://www.onem2m.org/xml/protocols"
processContents="lax" minOccurs="0" maxOccurs="unbounded" />
<xs:any namespace="http://www.onem2m.org/xml/protocols" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
......@@ -346,18 +341,18 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
<xs:element name="sizeAbove" type="xs:nonNegativeInteger" minOccurs="0" />
<xs:element name="sizeBelow" type="xs:positiveInteger" minOccurs="0" />
<xs:element name="contentType" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="attribute" type="m2m:attributeTest" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="filterUsage" type="m2m:filterUsage" minOccurs="0" />
<xs:element name="limit" type="xs:nonNegativeInteger" minOccurs="0" />
<xs:element name="attribute" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
</xs:sequence>
</xs:complexType>
<xs:complexType name="attributeTest">
<xs:sequence>
<xs:element name="name" type="xs:NCName" />
<xs:element name="value" type="xs:anyType" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="filterUsage" type="m2m:filterUsage" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<!-- TODO: consider moving this to the Enumerations file -->
<xs:simpleType name="filterUsage">
......@@ -386,7 +381,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
<xs:element name="eventCategory" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="eventCatType" type="m2m:eventCatType" />
<xs:element name="eventCatType" type="m2m:eventCat" />
<xs:element name="eventCatNo" type="xs:nonNegativeInteger" />
</xs:sequence>
</xs:complexType>
......@@ -420,33 +415,28 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
<xs:complexType name="operationResult">
<xs:sequence>
<xs:element name="content" type="m2m:primitiveContent" minOccurs="0" />
<xs:element name="eventCategory" type="m2m:eventCatType" minOccurs="0" />
<xs:element name="eventCategory" type="m2m:eventCat" minOccurs="0" />
<xs:element name="from" type="m2m:ID" minOccurs="0" />
<xs:element name="originatingTimestamp" type="m2m:timestamp" minOccurs="0" />
<xs:element name="requestIdentifier" type="m2m:requestID" />
<xs:element name="resultExpirationTimestamp" type="m2m:timestamp" minOccurs="0" />
<xs:element name="to" type="xs:anyURI" minOccurs="0" />
<xs:element name="responseStatusCode" type="m2m:responseStatus" />
<xs:element name="responseStatusCode" type="m2m:responseStatusCode" />
</xs:sequence>
</xs:complexType>
<!-- TODO: cardinality of description -->
<xs:complexType name="responseStatus">
<xs:sequence>
<xs:element name="code" type="m2m:statusCode" />
<xs:element name="description" type="m2m:eventCatType" />
</xs:sequence>
</xs:complexType>
<!-- TODO: check if m2m:ID is the correct data type for the following list elements or if xs:anyURI should be used (as used in access control rules) -->
<!-- TODO: check if m2m:ID is the correct data type for the following list elements or if xs:anyURI should be used (as used
in access control rules) -->
<!-- "listOfM2MID" is a space separated list of CSE-IDs and/or AE-IDs (i.e. elements of data type m2m:ID" -->
<xs:simpleType name="listOfM2MID">
<xs:list itemType="m2m:ID" />
</xs:simpleType>
<!-- TODO: check if the definition of "listOfMinMax" can be simplified, i.e. avoiding use of explicit type definitions for "longMin-1" and "listOflongMin-1" -->
<!-- "listOfMinMax" represents a list of min and max numbers used in attributes of the [cmdhLimits] resource
based on data type longMin-1. Unit is milliseconds -->
<!-- TODO: check if the definition of "listOfMinMax" can be simplified, i.e. avoiding use of explicit type definitions for
"longMin-1" and "listOflongMin-1" -->
<!-- "listOfMinMax" represents a list of min and max numbers used in attributes of the [cmdhLimits] resource based on data
type longMin-1. Unit is milliseconds -->
<xs:simpleType name="longMin-1">
<xs:restriction base="xs:long">
<xs:minInclusive value="-1" />
......@@ -464,9 +454,10 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
</xs:restriction>
</xs:simpleType>
<!-- TODO: check if the definition of "backOffParameters" can be simplified, i.e. avoiding use of explicit type definition for "listOfNonNegInt" -->
<!-- "backOffParameters" is an ordered list of 3 nonNegativeInteger numbers:backoffTime, backoffTimeIncrement, maximumBackoffTime (in that order!),
all units in milliseconds -->
<!-- TODO: check if the definition of "backOffParameters" can be simplified, i.e. avoiding use of explicit type definition
for "listOfNonNegInt" -->
<!-- "backOffParameters" is an ordered list of 3 nonNegativeInteger numbers:backoffTime, backoffTimeIncrement, maximumBackoffTime
(in that order!), all units in milliseconds -->
<xs:simpleType name="listOfNonNegInt">
<xs:list itemType="xs:nonNegativeInteger" />
</xs:simpleType>
......@@ -478,13 +469,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
</xs:restriction>
</xs:simpleType>
<!-- TODO: check if "eventCatType" is the correct base type for the list elements or if data type "eventCat" should be used here -->
<!-- "listOfEventCat" is a space separated list of eventCatType's -->
<xs:simpleType name="listOfEventCat">
<xs:list itemType="m2m:eventCatType" />
</xs:simpleType>
<!-- "actionStatus" is used accross mgmtObj resources -->
<!-- "actionStatus" is used across mgmtObj resources -->
<xs:complexType name="actionStatus">
<xs:sequence>
<xs:element name="action" type="xs:anyURI" minOccurs="0" />
......
......@@ -68,14 +68,16 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
<xs:enumeration value="17" />
<!-- schedule -->
<xs:enumeration value="18" />
<!-- serviceSubscribedNode -->
<!-- serviceSubscribedAppRule -->
<xs:enumeration value="19" />
<!-- statsCollect -->
<!-- serviceSubscribedNode -->
<xs:enumeration value="20" />
<!-- statsConfig -->
<!-- statsCollect -->
<xs:enumeration value="21" />
<!-- subscription -->
<!-- statsConfig -->
<xs:enumeration value="22" />
<!-- subscription -->
<xs:enumeration value="23" />
<!-- accessControlPolicyAnnc -->
<xs:enumeration value="10001" />
<!-- AEAnnc -->
......@@ -127,7 +129,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="eventCatType">
<xs:simpleType name="stdEventCats">
<xs:annotation>
<xs:documentation>Used for ec parameter in request and eventCat attribute of &lt;delivery&gt; resource and cmdh
policy resource types.</xs:documentation>
......@@ -146,7 +148,7 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
<xs:simpleType name="operation">
<xs:annotation>
<xs:documentation>Used for rt parameter in request and operation attribute in &lt;request&gt; resource
<xs:documentation>Used for Operation parameter in request and operation attribute in &lt;request&gt; resource as well as resource as well as operationMonitor
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:integer">
......@@ -200,26 +202,27 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
<xs:simpleType name="resultContent">
<xs:annotation>
<xs:documentation>Used for rc parameter in request.</xs:documentation>
<xs:documentation>Used for Result Content parameter in request.</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:integer">
<!-- Nothing -->
<xs:enumeration value="0" />
<!-- Attributes -->
<xs:enumeration value="1" />
<!-- Child Resources -->
<xs:enumeration value="2" />
<!-- Attributes + Child Resources -->
<xs:enumeration value="2" />
<!-- Attributes + Child Resource References -->
<xs:enumeration value="3" />
<!-- Original Resources -->
<!-- Child Resources -->
<xs:enumeration value="4" />
<!-- TODO: add child resource reference options (needs CR to TS0004) -->
<!-- Original Resource -->
<xs:enumeration value="5" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="discResType">
<xs:annotation>
<xs:documentation></xs:documentation>
<xs:documentation>Used in &lt;request&gt; </xs:documentation>
</xs:annotation>
<xs:restriction base="xs:integer">
<!-- hierarchical -->
......@@ -231,8 +234,8 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
</xs:restriction>
</xs:simpleType>
<!-- TODO: to be defined (needs CR) -->
<xs:simpleType name="statusCode">
<!-- TODO: to be added) -->
<xs:simpleType name="responseStatusCode">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
......@@ -251,7 +254,6 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
</xs:restriction>
</xs:simpleType>
<!-- TODO: Does this need to be different from m2m:resourceType? Can we remove it? (needs CR) -->
<xs:simpleType name="memberType">
<xs:annotation>
<xs:documentation>Used for memberType attribute in &lt;group&gt; resource.</xs:documentation>
......@@ -273,36 +275,37 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
<xs:enumeration value="7" />
<!-- execInstance -->
<xs:enumeration value="8" />
<!-- fanOutPoint -->
<!-- group -->
<xs:enumeration value="9" />
<!-- Group -->
<!-- locationPolicy -->
<xs:enumeration value="10" />
<!-- localPolicy --> <!-- TODO: shouldn't this be locationPolicy ? -->
<xs:enumeration value="11" />
<!-- m2mServiceSubscription -->
<xs:enumeration value="12" />
<xs:enumeration value="11" />
<!-- mgmtCmd -->
<xs:enumeration value="13" />
<xs:enumeration value="12" />
<!-- mgmtObj -->
<xs:enumeration value="13" />
<!-- node -->
<xs:enumeration value="14" />
<!-- Node -->
<!-- pollingChannel -->
<xs:enumeration value="15" />
<!-- nodeInfo -->
<!-- remoteCSE -->
<xs:enumeration value="16" />
<!-- pollingChannel -->
<!-- request -->
<xs:enumeration value="17" />
<!-- remoteCSE -->
<!-- schedule -->
<xs:enumeration value="18" />
<!-- Request -->
<!-- serviceSubscribedAppRule -->
<xs:enumeration value="19" />
<!-- Schedule -->
<!-- serviceSubscribedNode -->
<xs:enumeration value="20" />
<!-- statsCollect -->
<xs:enumeration value="21" />
<!-- statsConfig -->
<xs:enumeration value="22" />
<!-- Subscription -->
<!-- subscription -->
<xs:enumeration value="23" />
<!-- Mixed -->
<xs:enumeration value="24" />
</xs:restriction>
......@@ -491,32 +494,6 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
</xs:restriction>
</xs:simpleType>
<!--TODO: resolve the name clash here - needs CR -->
<xs:simpleType name="operationMonitor">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
<xs:restriction base="xs:integer">
<!-- Create -->
<xs:enumeration value="1" />
<!-- Retrieve -->
<xs:enumeration value="2" />
<!-- Update -->
<xs:enumeration value="3" />
<!-- Delete -->
<xs:enumeration value="4" />
</xs:restriction>
</xs:simpleType>
<!-- TODO: Fill in the details -->
<xs:simpleType name="attribute">
<xs:annotation>
<xs:documentation></xs:documentation>
</xs:annotation>
<xs:restriction base="xs:integer">
<xs:enumeration value="22" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="status">
<xs:annotation>
......@@ -693,11 +670,11 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
<xs:simpleType name="encodingType">
<xs:restriction base="xs:integer">
<!-- No Transfer Encoding -->
<!-- Plain -->
<xs:enumeration value="0" />
<!-- base64Binary -->
<xs:enumeration value="1" />
<!-- base64String -->
<xs:enumeration value="1" />
<!-- base64Binary -->
<xs:enumeration value="2" />
</xs:restriction>
</xs:simpleType>
......
......@@ -77,8 +77,8 @@ oneM2M EXPRESSLY ADVISES ANY AND ALL USE OF OR RELIANCE UPON THIS INFORMATION PR
<xs:element name="sizeAbove" type="xs:nonNegativeInteger" minOccurs="0" />
<xs:element name="sizeBelow" type="xs:positiveInteger" minOccurs="0" />
<xs:element name="resourceStatus" type="m2m:resourceStatus" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="operationMonitor" type="m2m:operationMonitor" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="attribute" type="m2m:attribute" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="operationMonitor" type="m2m:operation" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="attribute" type="m2m:attributeTest" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment