Hi Rishabh,
Please see the response from Wolfgang below.
--
It was a design decision taken by oneM2M not to implement in the XSD the capability for validation of the correctness of an included child resource reference. The reason was primarily to simplify the work of XSD implementation. We did never consider to make any source code which could be autogenerated from the XSD to represent a fully TS-0004 compliant implementation of resource type class objects.
So, when using the childResource element of datatype m2m:childResourceRef for any ordinary resource type or for any <flexContainer> specialization for referencing children, one could include any enumerated resourceType value, the current XSD implementation does not allow validation that only permitted values are included.
The same applies to the mgmtLink element of datatype m2m:mgmtLinkRef for <mgmtObj> specializations. There is no XSD validation of the correctness of the value of the "type" parameter provided.
Such validation mechanisms would need to be programmed in a different way in implementations of oneM2M compliant entities.
The purpose of the XSD provided by oneM2M is described in clause 6.1 of TS-0004. Especially the disclaimer in NOTE 1 needs to be noted.
--
Best regards,
Nobu
-----Original Message-----
From: oneM2M Technical Questions [mailto:[log in to unmask]] On Behalf Of Rishabh Jain
Sent: Tuesday, July 25, 2017 2:42 PM
To: [log in to unmask]
Subject: Re: Missing Enum Values for Resource Type
Hey Nobuyuki,
Thanks for the reply. I can use FlexContainer as a generic resource type for AllJoyn* resource types, however, there are places where restriction on child resource type exist, like only AllJoynSvcObject can be a child resource for AllJoynApp. Using FlexContainer resource type to check would violate this check as many other resource types come under the same umbrella.
Also, for resource types like Battery, or any other mgmtObj types, there are no enum values. MgmtObj type can again be used in this, but what happens in case of checking for valid child resources of Node resource, Battery is valid while CmdhLimits is not.
Unless I'm missing something, I think the conditions are being violated here.
Regards,
Rishabh Jain
> On 25-Jul-2017, at 7:19 AM, Nobuyuki Uchida <[log in to unmask]> wrote:
>
> Hi Rishabh,
>
> Those are <flexContainer> resource specializations, not resource types. We just use <flexContainer> resource type enum value (28) for those.
>
> Nobu
>
> -----Original Message-----
> From: oneM2M Technical Questions [mailto:[log in to unmask]] On Behalf Of Rishabh Jain
> Sent: Monday, July 17, 2017 8:54 PM
> To: [log in to unmask]
> Subject: Missing Enum Values for Resource Type
>
> For AllJoyn and OneM2M inter-networking, there were a few resource specs introduced in Rel 2. However, there are no Enum values associated with them under ResourceTypes enum (for e.g. AllJoynApp, AllJoynInterface). Logically my understanding is that for every type of resource, there has to be an associated value under ResourceType enum.
>
> Need help with this
>
> ########################################################################
>
> To unsubscribe from the oneM2M_TechQuestions list, click the following link:
> http://list.etsi.org/scripts/wa.exe?SUBED1=oneM2M_TechQuestions&A=1
>
> ########################################################################
>
> To unsubscribe from the oneM2M_TechQuestions list, click the following link:
> http://list.etsi.org/scripts/wa.exe?SUBED1=oneM2M_TechQuestions&A=1
########################################################################
To unsubscribe from the oneM2M_TechQuestions list, click the following link:
http://list.etsi.org/scripts/wa.exe?SUBED1=oneM2M_TechQuestions&A=1
########################################################################
To unsubscribe from the oneM2M_TechQuestions list, click the following link:
http://list.etsi.org/scripts/wa.exe?SUBED1=oneM2M_TechQuestions&A=1
|