OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

obix-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Inheritance at instance level & contract behavior.


Hi All,

I have some question about obix standard. Specifically, about inheritance,
definition and instance of contract.

 

1)       I can inherit one contract from other through "is" contract list.
Can I do such inheritance at instance level? i.e. can I inherit one instance
from other instance?

e.g.  Following is contract

<obj href="myNs:ContractA/">

  <int name="subElement1" val="1">

    <int name="subElement1_1" val="2"/>

  </int>

</obj>

 

      Instance 1:

<obj href="http://someServer/obix/inst1"; is="myNs:ContractA/">

  <int name="subElement1" val="11">

    <int name="subElement1_1" val="12"/>

  </int>

</obj>

 

      Instance 2:

      

<obj href="http://someServer/obix/inst2"; is="/obix/inst1 myNs:ContractA/">

  <int name="subElement1" val="21"/>

</obj>

 

      Is following interpretation of instance 2 is expected by client?

<obj href="http://someServer/obix/inst2"; is="/obix/inst1 myNs:ContractA/">

  <int name="subElement1" val="21">

    <int name="subElement1_1" val="12"/>

  </int>

</obj>

 

 

2)       Contract defines structure (or data type) for communication. Doest
that mean contract defines data also (default val facet)? If yes, can server
ignore sending whole element if val is according to contract. 

 

Consider following contract

<obj href="myNs:ContractA/">

  <int name="subElement1" val="1">

    <int name="subElement1_1" val="2"/>

  </int>

</obj>

 

            If value of subElement1 is 1 & value of subElement1_1 is 2 on
server, shall client treat following response as valid response from server?

 

<obj href="http://someServer/obix/inst1"; is="myNs:ContractA/">

</obj>    

 

And make assumption that subElement1 val="1" and subElement1_1 val="2"
(because that's what contract says implicitly).

 

 

Regards,

Hemraj Chaudhari.

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]