Hi Jeff,

spin:constructor can be used to add arbitrary triples to new objects  
when they are created.

The particular template spl:ConstructDefaultValues is meant to be used  
in conjunction with spl:Argument or spl:Attribute: It will look at any  
defined default values for those arguments or attributes and make sure  
that they are copied into the new instance at creation time. Since the  
arguments and attributes are attached to a class as spin:constraint,  
the constructor's template will need to look them up there.

I hope this makes it clearer?
Holger



On Jan 7, 2009, at 8:57 AM, Schmitz, Jeffrey A wrote:

> Looking in the spl.owl ontology I'm a little confused about the  
> slp:ConstructDefaultValues Template Class.  It states:
>
> This template can be attached as spin:constructor to a root class  
> such as rdfs:Resource to ensure that SPIN processors assign default  
> values to certain properties. Looks for any templates attached as  
> spin:constraints to the types of ?this and then assigns their  
> declared spl:defaultValues.
>
> and the spin:body is:
>
> CONSTRUCT {
> ?this ?predicate ?defaultValue .
> }
> WHERE {
> ?this a ?directType .
> ?directType rdfs:subClassOf* ?type .
> ?type spin:constraint ?attribute .
> ?attribute spl:defaultValue ?defaultValue .
> ?attribute spl:predicate ?predicate .
> }
>
>  My confusion is, why is it looking for spin:constraints attached to  
> the type's (and super types') and not spin:constructor's?  I thought  
> it was spin construtors that set default values.
>
> Thanks,
> Jeff


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/topbraid-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to