#####################################################################
#####################################################################
## Copyright 2005 Steven R. Newcomb                                ##
##                                                                 ##
## This software is licensed under the Apache License, Version 2.0 ##
## (the "License"); you may not use this file except in compliance ##
## with the License.  Copies of the License are available at       ##
##        http://www.apache.org/licenses/LICENSE-2.0               ##
##                                                                 ##
## Unless required by applicable law or agreed to in writing,      ##
## software distributed under the License is distributed on an "AS ##
## IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ##
## express or implied.  See the License for the specific language  ##
## governing permissions and limitations under the License.        ##
##                                                                 ##
## Copies of the source code and the license are available at      ##
##        http://www.versavant.org                                 ##
#####################################################################
#####################################################################

####################################
cvsRevision = "$Revision: 1.6 $" ##
####################################

import sys

def OPTJoeStuff( vsv, OPT):

## > >   (5) Do you want to reify the names of people?  YES!

## To make it possible to reify names:

##    In the TMA disclosure:

##      Create an SIP class whose name is "Name":

##        Disclose that proxies that have instances of this property
##        class will merge if the values of their instances of this
##        property class are the same.  See JacksTMA/tmaconf.xml
    
##        Disclose that when instances of this property are merged into a
##        single instance, any one of the original values becomes the
##        value of the new single property instance.  See JacksTMA/tmaconf.xml

##        Etc.

## To reify the name "Joe" in the subject map:

##      Create a proxy for the name "Joe".

    proxyForTheNameJoe = vsv.newProxyObject()

##      Add an instance of the "Name" property class to that proxy.
##      Make its value "Joe".

    vsv.newPropertyInstance( 
	proxyForTheNameJoe,
        'JacksTMA',
        'Name',
        'Joe')

## > >   (I assume you want to reify Joe, so I won't ask about that.)

## To make it possible to reify persons:

##    In the TMA disclosure:

##      Create an SIP class whose name is "Person Name Proxy":

##        Disclose that proxies that have instances of this property
##        class will merge if the values of their instances of this
##        property class are the same.  See JacksTMA/tmaconf.xml
    
##        Disclose that when instances of this property are merged into a
##        single instance, any one of the original values becomes the
##        value of the new single property instance.  See JacksTMA/tmaconf.xml

##        Etc.

## To reify Joe in the subject map:

##      Create a proxy for Joe.

    proxyForJoe = vsv.newProxyObject()
    

##      Add an instance of the "Person Name Proxy" property class to that proxy.
##      Make its value the proxy whose subject is the name "Joe".  

    vsv.newPropertyInstance( 
	proxyForJoe,
        'JacksTMA',
        'Person Name Proxy',
        [ proxyForTheNameJoe.proxyId])

##      Discussion: Here's another case of theory vs. practice.  In
##                  theory, the value of the "Person Name Proxy" property
##                  is the proxy whose subject is the name "Joe".  In
##                  practice, the value is a reference to that proxy.

## > >   (6) Do you want to reify the relationships between people and their
## > >       names?  YES!

## First of all, to make it possible to reify relationships:

##    Declare that your subject map is governed by a TMA for the
##    reification of relationships.  Let's assume it's the one in the
##    TMA plan I've attached to this note.

##  (see parkdemo.py, where it says:
##  vsv.loadTMA( tmName, 'BigAssert', '${VSVEXECDIR}/Lib/BIGASSERT/tmaconf.xml')

## To allow relationships between persons and their names to be reified:

##    Create a proxy for the "namedPerson" role of all
##    namedPerson-nameOfPerson relationships.  (You'll need an SIP class
##    for that, but I'm not going to go into that detail here.  Nor am I
##    bothering to specify, in this note, the SIPs of any of the other
##    role topics.  You might want to use yet another TMA, one that's for
##    the purpose of reifying roles in relationships, to facilitate that.
##    Or you may want to do that in your own peculiar way, either as an
##    independent TMA or as part of this TMA.  Or you might want to have
##    a bunch of TMAs for reifying various roles.)

##  (see parkdemo.py, where it says:
##  vsv.loadTMA( tmName, 'Roles',     '${VSVEXECDIR}/Lib/ROLES/tmaconf.xml')
##  This is a very simple TMA for reifying subjects that are roles.

    proxyForTheNamedPersonRole = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForTheNamedPersonRole,
        'Roles',
        'role name',
        'namedPerson')

##    Create a proxy for the "nameOfPerson" role of all
##    namedPerson-nameOfPerson relationships.

    proxyForTheNameOfPersonRole = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForTheNameOfPersonRole,
        'Roles',
        'role name',
        'nameOfPerson')

## To reify the relationship between the proxy for Joe and the name
## "Joe":

##    Create a proxy for the relationship between Joe and the name "Joe".

    proxyForRelationshipBetweenJoeAndHisName = vsv.newProxyObject()

##    Add an instance of the a-sip property class (see attachments to
##    this note) to the proxy for the relationship between Joe and the
##    name "Joe".  Make its value the following list of two tuples:

##      ( [ reference to the proxy for the "namedPerson" role ],
##        [ reference to the proxy for Joe] )
##      ( [ reference to the proxy for the "nameOfPerson" role ],
##        [ reference to the proxy for name "Joe" ] )

    vsv.newPropertyInstance( 
	proxyForRelationshipBetweenJoeAndHisName,
        'BigAssert',
        'a_sip',
        [ ( proxyForTheNamedPersonRole.proxyId, proxyForJoe.proxyId),
          ( proxyForTheNameOfPersonRole.proxyId, proxyForTheNameJoe.proxyId) ])


### merge test: Make another assertion just like the above, to check
### that the BIGASSERT TMA does its job.
    proxyForRelationshipBetweenJoeAndHisName2 = vsv.newProxyObject()
    vsv.newPropertyInstance( 
	proxyForRelationshipBetweenJoeAndHisName2,
        'BigAssert',
        'a_sip',
        [ ( proxyForTheNamedPersonRole.proxyId, proxyForJoe.proxyId),
          ( proxyForTheNameOfPersonRole.proxyId, proxyForTheNameJoe.proxyId) ])
### end merge test


##    Note: Because of the conferral rules in the assertion TMA described
##          in the attachments hereto, that's all you have to do.  The
##          c-proxies, the t-proxy, and all the rest of the necessary
##          assertion properties and property value components will be
##          conferred into existence automagically.

## > >   (1) Do you want to reify shoe sizes?  YES!

## To make it possible reify shoe sizes:

##    In the TMA disclosure:

##      Create an SIP class whose name is "Shoe Size".

##        Disclose that proxies that have instances of this property
##        class will merge if the values of their instances of this
##        property class are the same.  See JacksTMA/tmaconf.xml.
    
##        Disclose that when instances of this property are merged into a
##        single instance, any one of the original values becomes the
##        value of the new single property instance.  See JacksTMA/tmaconf.xml.

##        Etc.

## To reify the shoe size "6" in the subject map:

##      Create a proxy for shoe size "6".

    proxyForShoeSize6 = vsv.newProxyObject()

##      Add an instance of the "Shoe Size" property class to that proxy.
##      Make its value "6".  

    vsv.newPropertyInstance( 
	proxyForShoeSize6,
        'JacksTMA',
        'Shoe Size',
        '6')

## > >   (2) Do you want to reify ages?  YES!

## To make it possible to reify ages:

##    In the TMA disclosure:

##      Create an SIP class whose name is "Age".

##        Disclose that proxies that have instances of this property
##        class will merge if the values of their instances of this
##        property class are the same.  See JacksTMA/tmaconf.xml.
    
##        Disclose that when instances of this property are merged into a
##        single instance, any one of the original values becomes the
##        value of the new single property instance.  See JacksTMA/tmaconf.xml.

##        Etc.

## To reify age 7 in the subject map:

##      Create a proxy for age 7.

    proxyForAge7 = vsv.newProxyObject()

##      Add an instance of the "Age" property class to that proxy.
##      Make its value "7".  

    vsv.newPropertyInstance( 
	proxyForAge7,
        'JacksTMA',
        'Age',
        '7')
    

## > >   (4) Do you want to reify the relationships between shoe sizes and
## > >       the ages at which they were observed?  YES!

## To allow relationships between shoe sizes and the ages at which
## they were observed to be reified:

##    Create a proxy for the "shoeSizeObservation" role of all
##    shoeSizeObservation-ageAtShoeSizeObservation relationships.

    proxyForTheShoeSizeObservationRole = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForTheShoeSizeObservationRole,
        'Roles',
        'role name',
        'shoeSizeObservation')

##    Create a proxy for the "ageAtShoeSizeObservation" role of all
##    shoeSizeObservation-ageAtShoeSizeObservation relationships.

    proxyForTheAgeAtShoeSizeObservationRole = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForTheAgeAtShoeSizeObservationRole,
        'Roles',
        'role name',
        'ageAtShoeSizeObservation')

## To reify the relationship between Joe's shoe size and his age
## at the time at which his shoe size was observed:

##    Create a proxy for the relationship between Joe's shoe-size and the
##    age (7 years old) at which his shoe size was observed.

    proxyForRelationshipBetweenJoesShoeSizeAndHisAgeAtObservation = vsv.newProxyObject()

##    Add an instance of the a-sip property class (see attachments to
##    this note) to the proxy for the relationship between Joe's
##    shoe-size and the age at which his shoe size was observed.  Make
##    its value the following list of two tuples:

##      ( [ reference to the proxy for the "shoeSizeObservation" role ],
##        [ reference to the proxy for Joe's shoe size] )
##      ( [ reference to the proxy for the "ageAtShoeSizeObservation" role ],
##        [ reference to the proxy for the age of 7 ] )

    vsv.newPropertyInstance( 
	proxyForRelationshipBetweenJoesShoeSizeAndHisAgeAtObservation,
        'BigAssert',
        'a_sip',
        [ ( proxyForTheShoeSizeObservationRole.proxyId, proxyForShoeSize6.proxyId),
          ( proxyForTheAgeAtShoeSizeObservationRole.proxyId, proxyForAge7.proxyId) ])

## > >   (3) Do you want to reify the relationships between shoe sizes and
## > >       the people who have them?  YES!

## To allow relationships between persons and their shoe size at some specific
## age to be reified:

##    Create a proxy for the "personWithFeet" role of all
##    personWithFeet-observedShoeSize relationships.

    proxyForThePersonWithFeetRole = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForThePersonWithFeetRole,
        'Roles',
        'role name',
        'PersonWithFeet')

##    Create a proxy for the "observedShoeSize" role of all
##    personWithFeet-observedShoeSize relationships.

    proxyForTheObservedShoeSizeRole = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForTheObservedShoeSizeRole,
        'Roles',
        'role name',
        'ObservedShoeSize')

## To reify the relationship between Joe and his shoe size as observed at
## age 7, in the subject map:

##    Create a proxy for an instance of a personWithFeet-observedShoeSize
##    relationship.

    proxyForRelationshipBetweenJoeAndHisObservedShoeSize = vsv.newProxyObject()

##    Add an instance of the a-sip property class (see attachments to
##    this note) to the proxy for the instance of the personWithFeet-observedShoeSize
##    relationship.  Make its value the following list of two tuples:

##      ( [ reference to the proxy for the "personWithFeet" role ],
##        [ reference to the proxy for Joe] )
##      ( [ reference to the proxy for the "observedShoeSize role ],
##        [ reference to the proxy for the relationship between Joe's
##          shoe-size and the age (7 years old) at which his shoe size
##          was observed ] )

    vsv.newPropertyInstance( 
	proxyForRelationshipBetweenJoeAndHisObservedShoeSize,
        'BigAssert',
        'a_sip',
        [ ( proxyForThePersonWithFeetRole.proxyId, proxyForJoe.proxyId),
          ( proxyForTheObservedShoeSizeRole.proxyId, proxyForRelationshipBetweenJoesShoeSizeAndHisAgeAtObservation.proxyId) ])

#######################################################
def OPTHarryStuff( vsv, OPT):

## This is different from OPTJoeStuff in that:
    
## (1) It's all about Harry instead of Joe.

## (2) The TRA_assert assertion model is used instead of the BigAssert Model.
##     This changes the code *only* in that the a_sip properties are
##     governed by the TRA_assert TMA, but that doesn't change the
##     code because everything about TRA_assert,,a_sip properties is
##     the same as it is for BigAssert,,a_sip properties.  The
##     TRA_assert TMA's "inferFrom_a_sip" conferral rule takes care of
##     all other differences.  (Actually, TRA_assert's inferFrom_a_sip
##     rule is a call to the same function that's used for BigAssert's
##     "inferFrom_a_sip" conferral rule, but different parameters are
##     passed to it.  Compare versavant/Lib/BigAssert/tmaconf.xml with
##     versavant/Lib/TRA_assert/tmaconf.xml to see the difference.)

    proxyForTheNameHarry = vsv.newProxyObject()
    vsv.newPropertyInstance( 
	proxyForTheNameHarry,
        'JacksTMA',
        'Name',
        'Harry')

    proxyForHarry = vsv.newProxyObject()
    vsv.newPropertyInstance( 
	proxyForHarry,
        'JacksTMA',
        'Person Name Proxy',
        [ proxyForTheNameHarry.proxyId])

    proxyForTheNamedPersonRole = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForTheNamedPersonRole,
        'Roles',
        'role name',
        vsv.versaCopy( 'namedPerson'))

    proxyForTheNameOfPersonRole = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForTheNameOfPersonRole,
        'Roles',
        'role name',
        vsv.versaCopy( 'nameOfPerson'))

    proxyForRelationshipBetweenHarryAndHisName = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForRelationshipBetweenHarryAndHisName,
        'TRA_assert',
        'a_sip',
        [ ( proxyForTheNamedPersonRole.proxyId, proxyForHarry.proxyId),
          ( proxyForTheNameOfPersonRole.proxyId, proxyForTheNameHarry.proxyId) ])

    proxyForRelationshipBetweenHarryAndHisName2 = vsv.newProxyObject()
    vsv.newPropertyInstance( 
	proxyForRelationshipBetweenHarryAndHisName2,
        'TRA_assert',
        'a_sip',
        [ ( proxyForTheNamedPersonRole.proxyId, proxyForHarry.proxyId),
          ( proxyForTheNameOfPersonRole.proxyId, proxyForTheNameHarry.proxyId) ])

    proxyForShoeSize6 = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForShoeSize6,
        'JacksTMA',
        'Shoe Size',
        vsv.versaCopy( '6'))

    proxyForAge7 = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForAge7,
        'JacksTMA',
        'Age',
        vsv.versaCopy( '7'))
    
    proxyForTheShoeSizeObservationRole = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForTheShoeSizeObservationRole,
        'Roles',
        'role name',
        vsv.versaCopy( 'shoeSizeObservation'))

    proxyForTheAgeAtShoeSizeObservationRole = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForTheAgeAtShoeSizeObservationRole,
        'Roles',
        'role name',
        vsv.versaCopy( 'ageAtShoeSizeObservation'))

    proxyForRelationshipBetweenHarrysShoeSizeAndHisAgeAtObservation = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForRelationshipBetweenHarrysShoeSizeAndHisAgeAtObservation,
        'TRA_assert',
        'a_sip',
        [ ( proxyForTheShoeSizeObservationRole.proxyId, proxyForShoeSize6.proxyId),
          ( proxyForTheAgeAtShoeSizeObservationRole.proxyId, proxyForAge7.proxyId) ])

    proxyForThePersonWithFeetRole = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForThePersonWithFeetRole,
        'Roles',
        'role name',
        vsv.versaCopy( 'PersonWithFeet'))

    proxyForTheObservedShoeSizeRole = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForTheObservedShoeSizeRole,
        'Roles',
        'role name',
        vsv.versaCopy( 'ObservedShoeSize'))

    proxyForRelationshipBetweenHarryAndHisObservedShoeSize = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForRelationshipBetweenHarryAndHisObservedShoeSize,
        'TRA_assert',
        'a_sip',
        [ ( proxyForThePersonWithFeetRole.proxyId, proxyForHarry.proxyId),
          ( proxyForTheObservedShoeSizeRole.proxyId, proxyForRelationshipBetweenHarrysShoeSizeAndHisAgeAtObservation.proxyId) ])

#######################################################
def OPTBartholomewStuff( vsv, OPT):

## (1) It's all about Bartholomew.

## (2) The A_assert assertion model is used instead of the BigAssert 
##     or TRA_assert assertion model.  This changes the code not only
##     in that the a_sip properties are governed by the A_assert TMA,
##     but also, because A_assert's a_sip properties have a different
##     structure than the one used for BigAssert/TRA_assert, there is
##     another difference.  The difference is because there are no
##     r-proxies in A_assert; A_assert doesn't reify assertion roles.
##     Therefore, in each tuple in the a_sip value, the first member,
##     instead of being a reference to an r-proxy, is a role name.
##     Otherwise, the code for this original population task is the
##     same as the original population tasks implemented in
##     OPTHarryStuff() and OPTJoeStuff(), above.

##     The A_assert TMA's "inferFrom_a_sip" conferral rule takes care
##     of all other differences.  (Actually, A_assert's
##     inferFrom_a_sip rule is a call to the same function that's used
##     for BigAssert's and TRA_assert's "inferFrom_a_sip" conferral
##     rules, but different parameters are passed to it.  Compare
##     versavant/Lib/BigAssert/tmaconf.xml or
##     versavant/Lib/TRA_assert/tmaconf.xml with
##     versavant/Lib/A_assert/tmaconf.xml to see the differences.)

    proxyForTheNameBartholomew = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForTheNameBartholomew,
        'JacksTMA',
        'Name',
        'Bartholomew')

    proxyForBartholomew = vsv.newProxyObject()
    
    vsv.newPropertyInstance( 
	proxyForBartholomew,
        'JacksTMA',
        'Person Name Proxy',
        [ proxyForTheNameBartholomew.proxyId])


    ## Roles are not reified in the A_assert assertion model.

##     proxyForTheNamedPersonRole = vsv.newProxyObject()

##     vsv.newPropertyInstance( 
## 	proxyForTheNamedPersonRole,
##         'Roles',
##         'role name',
##         'namedPerson')

##     proxyforthenameofpersonrole = vsv.newproxyobject()

##     vsv.newpropertyinstance( 
## 	proxyforthenameofpersonrole,
##         'roles',
##         'role name',
##         'nameofperson')

    proxyForRelationshipBetweenBartholomewAndHisName = vsv.newProxyObject()

##    Add an instance of the a-sip property class (see attachments to
##    this note) to the proxy for the relationship between Bartholomew and the
##    name "Bartholomew".  Make its value the following list of two tuples:

##      ( [ "namedPerson" role name ],
##        [ reference to the proxy for Bartholomew] )
##      ( [ "nameOfPerson" role name ],
##        [ reference to the proxy for name "Bartholomew" ] )

    vsv.newPropertyInstance( 
	proxyForRelationshipBetweenBartholomewAndHisName,
        'A_assert',
        'a_sip',
        [ ( 'namedPerson', proxyForBartholomew.proxyId),
          ( 'nameOfPerson', proxyForTheNameBartholomew.proxyId) ])

    proxyForRelationshipBetweenBartholomewAndHisName2 = vsv.newProxyObject()
    vsv.newPropertyInstance( 
	proxyForRelationshipBetweenBartholomewAndHisName2,
        'A_assert',
        'a_sip',
        [ ( 'namedPerson', proxyForBartholomew.proxyId),
          ( 'nameOfPerson', proxyForTheNameBartholomew.proxyId) ])

    proxyForShoeSize6 = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForShoeSize6,
        'JacksTMA',
        'Shoe Size',
        vsv.versaCopy( '6'))

    proxyForAge7 = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForAge7,
        'JacksTMA',
        'Age',
        vsv.versaCopy( '7'))
    
    ## roles are unreified in the A_assert model.

##     proxyForTheShoeSizeObservationRole = vsv.newProxyObject()

##     vsv.newPropertyInstance( 
## 	proxyForTheShoeSizeObservationRole,
##         'Roles',
##         'role name',
##         'shoeSizeObservation')

##     proxyForTheAgeAtShoeSizeObservationRole = vsv.newProxyObject()

##     vsv.newPropertyInstance( 
## 	proxyForTheAgeAtShoeSizeObservationRole,
##         'Roles',
##         'role name',
##         'ageAtShoeSizeObservation')

    proxyForRelationshipBetweenBartholomewsShoeSizeAndHisAgeAtObservation = vsv.newProxyObject()

##    Add an instance of the a-sip property class (see attachments to
##    this note) to the proxy for the relationship between Bartholomew's
##    shoe-size and the age at which his shoe size was observed.  Make
##    its value the following list of two tuples:

##      ( [ "shoeSizeObservation" role name],
##        [ reference to the proxy for Bartholomew's shoe size] )
##      ( [ "ageAtShoeSizeObservation" role name ],
##        [ reference to the proxy for the age of 7 ] )

    vsv.newPropertyInstance( 
	proxyForRelationshipBetweenBartholomewsShoeSizeAndHisAgeAtObservation,
        'A_assert',
        'a_sip',
        [ ( 'shoeSizeObservation', proxyForShoeSize6.proxyId),
          ( 'ageAtShoeSizeObservation', proxyForAge7.proxyId) ])

    ## roles are not reified in the A_assert model

##     proxyForThePersonWithFeetRole = vsv.newProxyObject()

##     vsv.newPropertyInstance( 
## 	proxyForThePersonWithFeetRole,
##         'Roles',
##         'role name',
##         'PersonWithFeet')

##     proxyForTheObservedShoeSizeRole = vsv.newProxyObject()

##     vsv.newPropertyInstance( 
## 	proxyForTheObservedShoeSizeRole,
##         'Roles',
##         'role name',
##         'ObservedShoeSize')

    proxyForRelationshipBetweenBartholomewAndHisObservedShoeSize = vsv.newProxyObject()

##    Add an instance of the a-sip property class (see attachments to
##    this note) to the proxy for the instance of the personWithFeet-observedShoeSize
##    relationship.  Make its value the following list of two tuples:

##      ( [ "personWithFeet" role name],
##        [ reference to the proxy for Bartholomew] )
##      ( [ "observedShoeSize role name],
##        [ reference to the proxy for the relationship between Bartholomew's
##          shoe-size and the age (7 years old) at which his shoe size
##          was observed ] )

    vsv.newPropertyInstance( 
	proxyForRelationshipBetweenBartholomewAndHisObservedShoeSize,
        'A_assert',
        'a_sip',
        [ ( 'PersonWithFeet', proxyForBartholomew.proxyId),
          ( 'ObservedShoeSize', proxyForRelationshipBetweenBartholomewsShoeSizeAndHisAgeAtObservation.proxyId) ])



#######################################################
def OPTUrsulaStuff( vsv, OPT):

## (1) It's all about Ursula

## (2) The U_assert assertion model is used instead of the BigAssert, 
##     TRA_assert, or A_assert assertion model.  

## (3) Since we can't reify relationships, we can't reify observations
##     as relationships between dates and shoeshizes.

##     a. We need a new SIP
##        just for observations, in JacksTMA.

    proxyForTheNameUrsula = vsv.newProxyObject()

    vsv.newPropertyInstance( 
	proxyForTheNameUrsula,
        'JacksTMA',
        'Name',
        'Ursula')

    proxyForUrsula = vsv.newProxyObject()
    
    vsv.newPropertyInstance( 
	proxyForUrsula,
        'JacksTMA',
        'Person Name Proxy',
        [ proxyForTheNameUrsula.proxyId])


    ## create an unreified assertion associating Ursula and her name
    
    vsv.newPropertyInstance( 
	proxyForUrsula,
        'U_assert',
        'x_LrnRrnRrp',
        { 'namedPerson': { 'nameOfPerson': [ proxyForTheNameUrsula.proxyId]}})
    ## (now all the other U_Assert properties will be conferred automagically)
    

    proxyForShoeSize6 = vsv.newProxyObject()
    vsv.newPropertyInstance( 
	proxyForShoeSize6,
        'JacksTMA',
        'Shoe Size',
        vsv.versaCopy( '6'))

    proxyForAge7 = vsv.newProxyObject()
    vsv.newPropertyInstance( 
	proxyForAge7,
        'JacksTMA',
        'Age',
        vsv.versaCopy( '7'))
    
    proxyForTheObservationOfUrsulasShoeSizeAtAge7 = vsv.newProxyObject()
    vsv.newPropertyInstance( 
	proxyForTheObservationOfUrsulasShoeSizeAtAge7,
        'JacksTMA',
        'shoeSizeObservation',
        [ proxyForAge7.proxyId, proxyForShoeSize6.proxyId])
    
    ## create an unreified assertion associating Ursula and her shoe size observation at age 7
    vsv.newPropertyInstance( 
	proxyForUrsula,
        'U_assert',
        'x_RrpLrnRrn',
        { proxyForTheObservationOfUrsulasShoeSizeAtAge7.proxyId: {'PersonWithFeet': [ 'ObservedShoeSize' ]}})

