Download presentation
Presentation is loading. Please wait.
Published byBarbara Horton Modified over 9 years ago
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 approaches to resolve 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 Current inheritance scheme 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 Following revisions to TS-0001 we now 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
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
7
Agreements with WG2 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 Confirmed that does not have an ExpirationTime
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 – Use Schema restriction to exclude expirationTime from the resource
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 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 could be fixed by introducing AnnouncebleManagement and AnnouncedManagement 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) – Need resolution of this issue with WG5.
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 Option 1 – Define a MgmtResource complex type containing mgmtDefinition, objectIds, objectPaths, mgmtLink and description – Each specialization XSD file declares an element / complex type for that specialization, inheriting from MgmtResource and adding the specialization-specific attributes – The resource root element will show the specialization, although we could still show mgmtObj (13) as its resourceType Option 2 – Declare a single element / complex type containing mgmtDefinition, objectIds, objectPaths, mgmtLink and description – This also contains a loosely typed XSD substitution group head element called [objectAttribute] with unbounded maxOccurs – Each specialization XSD file includes a substitution group to replace the [objectAttribute]
15
Option 1 New types for use by Management specializations
16
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.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.