Presentation is loading. Please wait.

Presentation is loading. Please wait.

Group:WG3 (PRO) Source:Peter Niblett, IBM, Date:2014-11-09 Agenda:PRO#14 TS-0004 Data Representation Proposal Discussion.

Similar presentations


Presentation on theme: "Group:WG3 (PRO) Source:Peter Niblett, IBM, Date:2014-11-09 Agenda:PRO#14 TS-0004 Data Representation Proposal Discussion."— Presentation transcript:

1 Group:WG3 (PRO) Source:Peter Niblett, IBM, peter_niblett@uk.ibm.com Date:2014-11-09 Agenda:PRO#14 TS-0004 Data Representation Proposal Discussion

2 Introduction These slides discuss resolutions of some of the issues raised in PRO-536 and PRO-537 – Announced Resources – Inheritance of “Universal” and “Common attributes” – Management Resources There are some other issues under consideration, not included here: – Representation of Child Resource references – The question of Global vs Local element declaration

3 1. Announced Resources © 2014 oneM2M Partners 3 Announced Resource Types not treated properly in current XML – Need discrete enumeration for announced Resource Types (i.e., unique values in resourceType attribute) TS-0001 states that the Announced resource type takes the form, e.g. – No resource-specific XSD (yet) for announced Resource Types Resolution The enumeration for resourceType will be extended to include the Announced Types as described In contribution PRO-2014-520. The value for will be 10000 more than the value for the corresponding, The relevant XSD files will contain Announceable and Announced versions of each resource type We will need new short names for the announced variants The TS-0001 statement about does not apply

4 2. Attribute issues Inheritance scheme in 0.71 using RegularResource, SubordinateResource and Announceable resources needs revision – Doesn’t match the current version of TS-0001 – Doesn’t cope with Announced vs Announceable

5 Universal/Common Attributes In TS0001 v 1.2 we have – Five “Universal attributes” resourceType, parentID, creationTime, lastModifiedTime, labels – Three “Common attributes” relating to Announcement announceTo, announcedAttribute, link Only 9 resourceTypes (+ the management specializations) are announceable – Four other “Common attributes” resourceID, accessControlPolicyIDs, expirationTime, stateTag – Exceptions stateTag is only defined for,, and parentID is defined for everything except resourceID is defined for everything except and accessControlPolicyIDs is defined for everything except, and expirationTime is defined for everything except and

6 Changes anticipated following TP14 It is ok for the schema to contain a parentID. – Its value will point to itself TS-0001 will be updated to give a resourceID to and – In effect this makes resourceID into a Universal attribute ExpirationTime will be added to

7 Inheritance Model XML Schema allows one complex type to extend another. The extension type inherits all the XML elements / attributes of its parent. Advantages of using this mechanism to represent the universal / common attributes – Avoids having to retype the definitions into each resource – Illustrates the underlying relationship of the type definitions – When you use a tool to generate classes for an OO language (e.g. xjc to generate Java classes from an XSD) the generated classes can reflect the XML inheritance

8 Proposal Treat resourceID as a universal attribute Treate stateTag as a resource-specific attribute Use XML Schema inheritance mechanism to include universal and the remaining common attributes – is a special case and needs to have accessControlPolicyIDs as a “resource-specific” attributes

9 Inheritance model Each resource type extends one of the types listed above as shown in the following tables..

10 Resource type inheritance - 1 ResourceExtends Resource (and adds accessControlPolicyIDs itself) RegularResource RegularResource RegularResource RegularResource RegularResource RegularResource RegularResource RegularResource RegularResource RegularResource RegularResource

11 Resource type inheritance - 2 ResourceExtends AnnounceableSubordinateResource / AnnouncedSubordinateResource AnnounceableResource / AnnouncedResource AnnounceableResource / AnnouncedResource AnnounceableSubordinateResource / AnnouncedSubordinateResource AnnounceableResource / AnnouncedResource AnnounceableResource / AnnouncedResource specializationsAnnounceableResource / AnnouncedResource AnnounceableResource / AnnouncedResource AnnounceableResource / AnnouncedResource AnnounceableSubordinateResource / AnnouncedSubordinateResource

12 3 © 2014 oneM2M Partners 12 Current schema design does not serialize attributes and child resources properly for [specializations] of – Common attributes are followed by attributes and child resources, and then specialization-specific attributes (or so-called [objectAttribute]) – This will fixed by introducing MgmntResource and AnnouncedMgmtResource data types [specializations] do not have resourceType=mgmtObj in XSD – Each [specialization] is treated as a resource-specific type declaration and has a discrete element name (which is currently equivalent to resourceType) – Agreed with WG2 / WG5 that the resourceType attribute will be mgmtObj, but that the root element will give the specialization type

13 in TS-0001 Has resourceType of regardless of the specialization Specifies the type of resource e.g. software, firmware, memory. This is where the attributes specific to this specialization go. Used by cmdh resources to point to other cmdh resources. No other child types are permitted.

14 XML Schema Representation The Common Types file will include MgmtResource and AnnouncedMgmtResource data types containing the MgmtObj attributes – mgmtDefinition, objectIds, objectPaths, and description Each specialization XSD file declares original and announced elements / complex types for that specialization, inheriting from MgmtResource and adding the specialization-specific attributes, the mgmtLink references and the reference to the Subscription child resource – The resource root element will show the specialization – resourceType will be 13 (mgmtObj) – mgmtDefinition will show the specialization – vendors could add their own specializations, and provide a vendor - namespaced root element, but must set mgmtDefinition to 0

15 Inheritance model with Mgmt New types for use by Management specializations

16 4. Child Resources Recent changes to TS-0001 mean that we now have to be able to return in-lined child resources as well as URIs to child resources We need to allow the in-lining of both and children, since TS-0001 allows users to add children to an Announced Resource that are not children of the original resource.

17 Resolution Each resource that has child resources will include a 3-way choice allowing – No references or included resources – URI-style references to child resources – Inlined child resources


Download ppt "Group:WG3 (PRO) Source:Peter Niblett, IBM, Date:2014-11-09 Agenda:PRO#14 TS-0004 Data Representation Proposal Discussion."

Similar presentations


Ads by Google