views:

20

answers:

0

In the OpenSocial Data specificaiton 1.0 for a Person object (social profile data) it includes the use of a generic called Plural-Field.

The spec can be found at: http://opensocial-resources.googlecode.com/svn/spec/1.0/Social-Data.xml#Person

In the 1.0 data specification there is no XSD and no examples showing the use of this generic Plural-Field.

After puzzeling the spec for some time I think I might understand the user of this generic. I was hoping that someone could confirm or correct my understanding.

For example the accounts field is a generic Plural-Field<Account> while the activities field is Plural-Field <string>. Am I right in assuming that the result XML would look like:


  <accounts>
    <Plural-Field>
      <primary>true</primary>
      <type>ntlm</type>
      <value>
        <Account>
          <domain>MYDOMAIN</domain>
          <userid>MYDOMAIN\davegraham</userid>
          <username>davegraham</username>
        </Account>
      </value>
    </Plural-Field>
    <Plural-Field>
      <primary>false</primary>
      <type>claims</type>
      <value>
        <Account>
          <domain>i:0#.f|claimsDomain</domain>
          <userid>i:0#.f|claimsDomain|davegraham</userid>
          <username>davegraham</username>
        </Account>
      </value>
    </Plural-Field>
  </accounts>
  <activities>
      <Plural-Field>
        <primary>true</primary>
        <type>ntlm</type>
        <value>cycling</value>
      </Plural-Field>
      <Plural-Field>
        <primary>false</primary>
        <type>claims</type>
        <value>swiming</value>
      </Plural-Field>
  </activities>

Am I right in my interpretation of the spec?